用Octave求不定积分基本公式(20)
广告
{{v.name}}
不定积分基本公式(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⎠