加上常数项: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运行结果的可读性很好,但是代码就比较难读了。