MATLAB在数学教学中的应用(3)
发布时间:2021-06-11
发布时间:2021-06-11
hold off;
【Step2】求出函数的驻点
syms x;
f=3/5*x^5-3/4*x^4-2*x^3+1;
df1=diff(f,x);
df1=factor(df1)
x0=solve(df1,x)
【Step3】判断驻点是否为极值点
df2=diff(f,x,2)
x20=subs(df2,x,0)
x22=subs(df2,x,2)
x21=subs(df2,x,-1)
y0=subs(f,x,0)
y2=subs(f,x,2)
y1=subs(f,x,-1)
(4)计算定积分:
① 34
10tan I xdx π
=⎰;② 120I =⎰;③ 2
140x I e dx -=⎰ 【程序】:
syms x;
I1=int(tan(x)^3,0,pi/4)
I2=int(1/((3+6*x-x^2)^(1/2)),0,1)
I3=int(exp(-x^2),0,1)
I1D=double(I1)
I2D=double(I2)
I3D=double(I3)
(5)求方程组()()0,()4()0x t y t y t x t ''''+=-=满足条件(0)(0)0x y ==,(0)1,(0)2x y ''==的特解。
【程序】:
syms x y;
f='D2x+y=0,D2y-4*x=0';