1、
f=@(x)exp(x)-3*x.^2;
a1=fsolve(f,1);
a2=fsolve(f,0);
x=-2:0.01:2;
y=f(x);
figure
plot(x,y,x,zeros(1,length(x)))
hold on
plot(a1,0,'r*',a2,0,'r*')
2、
f=@(x)x.*sin(x)-1/2;
a1=fsolve(f,1);
a2=fsolve(f,3);
a3=fsolve(f,5);
x=0:pi/100:3*pi;
y=f(x);
figure
plot(x,y,x,zeros(1,length(x)))
hold on
plot(a1,0,'r*',a2,0,'r*',a3,0,'r*')
3、
f=@(x)sin(x).*cos(x)-x.^2;
a1=fsolve(f,0);
a2=fsolve(f,3);
x=-1:0.001:1;
y=f(x);
figure
plot(x,y,x,zeros(1,length(x)))
hold on
plot(a1,0,'r*',a2,0,'r*')
4、
f=inline('exp(811*x.^2)');
jifen=quad(f,0,1/2);
5、
syms x
f=sqrt(0.811+x);
f8=taylor(f,9)
祝你学习愉快!
温馨提示:答案为网友推荐,仅供参考