用Octave求不定积分基本公式(4)
广告
{{v.name}}
微积分知识点
不定积分是导数的逆运算,是微积分基本定理的重要组成部分。微积分知识点是微积分学习中的重要内容,理解其数学原理是掌握后续知识的基础。
数学上,这一概念通过严格的极限语言来定义,符号计算工具可以帮助我们快速验证和计算相关问题。
用Octave计算
在Octave中,使用 int(f, x) 可以计算函数 f 关于变量 x 的不定积分。符号计算引擎能自动应用各种积分法则。
通过下面的代码示例,你可以学习如何用Octave来计算。Octave的Symbolic包提供了强大的符号计算能力,让我们能够专注于理解数学概念,而不是繁琐的手工计算。
不定积分基本公式(4) \(\int{a^{x} }{\rm d}x=\frac{a^{x} }{ {\rm ln}a }+C\),特别地,\(\int{ {\rm e}^{x} }{\rm d}x={\rm e}^{x}+C\)
求\(\int{2^{x} }{\rm d}x\).
程序代码如下
function [text_result, numeric_result] = func58()
pkg load symbolic;
x = sym('x');
f = int(2^x, x);
text_result = ["\n", disp(f)];
numeric_result = eval(f);
endfunction
结果如下
>> [text_result, numeric_result] = func58()
warning: passing floating-point values to sym is dangerous, see "help sym"
warning: called from
double_to_sym_heuristic at line 50 column 7
sym at line 384 column 13
rdivide at line 105 column 5
ldivide at line 56 column 5
mldivide at line 95 column 7
mrdivide at line 72 column 5
function_handle>@<anonymous> at line 1 column 10
eval at line 101 column 7
func58 at line 6 column 20
text_result =
x
2
──────
log(2)
numeric_result = (sym)
x
2291⋅2
───────
1588