Maple计算微积分问题
1、计算sin(x)的原函数。
f:=x->sin(x);
Integrate(f(x),x)=integrate(f(x),x);
Maple也把后面的常数项C忽略获绵了。
2、加上常数项:
f:=x->sin(x);
Integrate(f(x),x)=integrate(f(x),x)+C;
对比一下芬久。
3、有些函数是求不出原函数的:
f:=x->1/sin(x^2);
Integrate(f(x),x)=integrate(f(x),x)+C;
4、还有些函数的原函数很复杂,不能表示为初夏鬼痕等函数:
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(%);
1、计算sin(x)在a到b之间的定积分:
f := x-> sin(x) ;
Integrate(f(x), x = a .. b) = integrate(f(x), x = a .. b)
a..b,就是a到b的意思。
2、给a和b赋上具体的数值:
f := x-> sin(x) ;
a:=0:b:=pi:
Integrate(f(x), x = a .. b) = integrate(f(x), x = a .. b)
3、一般都有定积分:
f := x-> sin(x^2) ;
a:=0:b:=pi:
Integrate(f(x), x = a .. b) = integrate(f(x), x = a .. b)
4、除非函数值出界:
f := x-> 1/sin(x) ;
a:=0:b:=pi:
Integrate(f(x), x = a .. b) = integrate(f(x), x = a .. b)
5、调整一下求积区间:
f := x-> 1/(1+sin(x+1)) ;
a:=1:b:=2:
Integrate(f(x), x = a .. b) = integrate(f(x), x = a .. b)
6、给出数值解:
f := x-> 1/(1+sin(x+1)) ;
a:=1:b:=2.:
Integrate(f(x), x = a .. b) = integrate(f(x), x = a .. b)
大家看看上下文的代码有什么区别吗?
7、计算广义积分:
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)。
8、integrate(1/(1-x^2),x=a..b);
出界了。
1、求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)。
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));