Maple计算微积分问题
来源:网络收集 点击: 时间:2024-04-07计算sin(x)的原函数。
f:=x-sin(x);
Integrate(f(x),x)=integrate(f(x),x);
Maple也把后面的常数项C忽略了。

加上常数项:
f:=x-sin(x);
Integrate(f(x),x)=integrate(f(x),x)+C;
对比一下。

有些函数是求不出原函数的:
f:=x-1/sin(x^2);
Integrate(f(x),x)=integrate(f(x),x)+C;

还有些函数的原函数很复杂,不能表示为初等函数:
g:=x-sin(x^2);
Integrate(g(x),x)=integrate(g(x),x)+C;
和
g:=x-sin(x^3);
Integrate(g(x),x)=integrate(g(x),x)+C:
simplify(%);

计算sin(x)在a到b之间的定积分:
f := x- sin(x) ;
Integrate(f(x), x = a .. b) = integrate(f(x), x = a .. b)
a..b,就是a到b的意思。

给a和b赋上具体的数值:
f := x- sin(x) ;
a:=0:b:=pi:
Integrate(f(x), x = a .. b) = integrate(f(x), x = a .. b)

一般都有定积分:
f := x- sin(x^2) ;
a:=0:b:=pi:
Integrate(f(x), x = a .. b) = integrate(f(x), x = a .. b)

除非函数值出界:
f := x- 1/sin(x) ;
a:=0:b:=pi:
Integrate(f(x), x = a .. b) = integrate(f(x), x = a .. b)

调整一下求积区间:
f := x- 1/(1+sin(x+1)) ;
a:=1:b:=2:
Integrate(f(x), x = a .. b) = integrate(f(x), x = a .. b)

给出数值解:
f := x- 1/(1+sin(x+1)) ;
a:=1:b:=2.:
Integrate(f(x), x = a .. b) = integrate(f(x), x = a .. b)
大家看看上下文的代码有什么区别吗?

计算广义积分:
f:=x-1/(c^2+x^2):
a:=-infinity:b:=infinity:
Integrate(f(x),x=a..b)=integrate(f(x),x=a..b);
答案是:π/abs(c)。

integrate(1/(1-x^2),x=a..b);
出界了。

求y(x)= 2*x*y(x)的通解:
with(DEtools):
de:=diff(y(x),x)=2*x*y(x);
dsolve(de, y(x));
通解是:y(x) = C1*e^(x^2)。

求y(x)=exp(a*x-y(x))满足y(0)=0的特解:
with(DEtools):
de:= diff(y(x),x)=exp(2*x-y(x));
dsolve({de,y(0)=0}, y(x));

Maple运行结果的可读性很好,但是代码就比较难读了。
MAPLE微积分原函数微分方程版权声明:
1、本文系转载,版权归原作者所有,旨在传递信息,不代表看本站的观点和立场。
2、本站仅提供信息发布平台,不承担相关法律责任。
3、若侵犯您的版权或隐私,请联系本站管理员删除。
4、文章链接:http://www.1haoku.cn/art_452003.html