用Octave求不定积分基本公式(20)
广告
{{v.name}}
微积分知识点

不定积分是导数的逆运算,是微积分基本定理的重要组成部分。微积分知识点是微积分学习中的重要内容,理解其数学原理是掌握后续知识的基础。

数学上,这一概念通过严格的极限语言来定义,符号计算工具可以帮助我们快速验证和计算相关问题。

用Octave计算

在Octave中,使用 int(f, x) 可以计算函数 f 关于变量 x 的不定积分。符号计算引擎能自动应用各种积分法则。

通过下面的代码示例,你可以学习如何用Octave来计算。Octave的Symbolic包提供了强大的符号计算能力,让我们能够专注于理解数学概念,而不是繁琐的手工计算。

不定积分基本公式(20) \(\int{ \frac{1}{\sqrt{x^2-a^2} } }{\rm d}x={\rm ln}\lvert x+\sqrt{x^2-a^2}\rvert+C\)
求\(\int{ \frac{1}{\sqrt{x^2-a^2} } }{\rm d}x\).
程序代码如下
function [text_result, numeric_result] = func74()
    pkg load symbolic;
    x = sym('x');
    a = sym('a');
    f = int(1 / sqrt(x^2 - a^2), x);
    text_result = ["\n", disp(f)];
    numeric_result = eval(f);
endfunction
结果如下
>> [text_result, numeric_result] = func74()
text_result =
    ⎧                 │ 2│
    ⎪      ⎛x⎞       │x │
    ⎪ acosh⎜─⎟   for │──│ > 1
    ⎪      ⎝a⎠       │ 2│
    ⎨                 │a │
    ⎪
    ⎪       ⎛x⎞
    ⎪ -ⅈ⋅asin⎜─⎟   otherwise
    ⎩       ⎝a⎠

numeric_result = (sym)

    ⎧                 │ 2│
    ⎪      ⎛x⎞       │x │
    ⎪ acosh⎜─⎟   for │──│ > 1
    ⎪      ⎝a⎠       │ 2│
    ⎨                 │a │
    ⎪
    ⎪       ⎛x⎞
    ⎪ -ⅈ⋅asin⎜─⎟   otherwise
    ⎩       ⎝a⎠
友链