用Octave求不定积分基本公式(22)
广告
{{v.name}}
不定积分基本公式(22) \(\int{ \sqrt{a^2-x^2} }{\rm d}x=\frac{a^2}{2}{\rm arcsin} \frac{x}{a}+\frac{x}{2}\sqrt{a^2-x^2}+C\)
求\(\int{ \frac{1}{x^2-a^2 } }{\rm d}x\).
程序代码如下
function [text_result, numeric_result] = func76()
    pkg load symbolic;
    x = sym('x');
    a = sym('a');
    f = int(sqrt(a^2 - x^2), x);
    text_result = ["\n", disp(f)];
    numeric_result = eval(f);
endfunction
结果如下
>> [text_result, numeric_result] = func76()
text_result =
    ⎧     2      ⎛x⎞
    ⎪   ⅈ⋅a ⋅acosh⎜─⎟                                 3              │ 2│
    ⎪            ⎝a⎠          ⅈ⋅a⋅x                ⅈ⋅x               │x │
    ⎪- ───────────── - ───────────────── + ───────────────────  for │──│ > 1
    ⎪        2                 _________             _________      │ 2│
    ⎪                         ╱       2             ╱       2       │a │
    ⎪                        ╱       x             ╱       x
    ⎪                  2⋅    ╱   -1 + ──    2⋅a⋅   ╱   -1 + ──
    ⎪                      ╱          2          ╱          2
    ⎨                    ╲╱          a         ╲╱          a
    ⎪
    ⎪                                    ________
    ⎪                                   ╱      2
    ⎪                                  ╱      x
    ⎪              2     ⎛x⎞   a⋅x⋅   ╱   1 - ──
    ⎪             a ⋅asin⎜─⎟         ╱         2
    ⎪                    ⎝a⎠       ╲╱         a
    ⎪             ────────── + ──────────────────                otherwise
    ⎩                 2                2

numeric_result = (sym)

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