高分悬赏 matlab试题解答!!!!!!帮忙解答后加100分 决不食言!!!!!周二前急求!!!
1.Graphthefunctionf(x)=x5-20x4+40x2-10x-18inawaythatdisplaysalltheinterestingfeatures...
1. Graph the function f(x) = x5 - 20x4 + 40x2 - 10x - 18 in a way that displays all the interesting features of the graph. Compute all the zeros and critical points, using both solve and fzero. How can you be sure you are not missing any zeros or critical points?
2. Compute the integral of (1 - x4)1/2 from 0 to 1, both numerically and symbolically. The symbolic integral comes out in terms of a function you may not know much about --- what is it? Apply double to the symbolic integral to get a numerical value. Use format long to look at many decimal places. Compare with the result of using quadl. Are the answers the same?
请写出在matlab应该写什么....万分感谢!!!!! 展开
2. Compute the integral of (1 - x4)1/2 from 0 to 1, both numerically and symbolically. The symbolic integral comes out in terms of a function you may not know much about --- what is it? Apply double to the symbolic integral to get a numerical value. Use format long to look at many decimal places. Compare with the result of using quadl. Are the answers the same?
请写出在matlab应该写什么....万分感谢!!!!! 展开
展开全部
%第一道题
x=linspace(-100,100,4000);
y=x.^5-20*x.^4+40*x.^2-10*x-8;
plot(x,y,'r-');
xlabel('x轴');
ylabel('y轴');
title('5阶多项式');
result1=fzero('x.^5-20*x.^4+40*x.^2-10*x-8',-50);
syms x;
result2=solve(x.^5-20*x.^4+40*x.^2-10*x-8);
%对于如何减少丢失临界点和零点的问题,首先作图的时候尽量把范围做的大一些,这样
%可以宏观的把握图像。fzero函数使用的过程中可以多次选择初始点。
%第二道题
%用矩形公式求解积分
l=1/30;
x=0:l:1;
y=(1-x.^4).^(1/2);
Z1=sum(y(1:30))*l;
%用quadl求解
Z2=quadl('(1-x.^4).^(1/2)',0,1);
%总体来说还是第二种方法好,毕竟是开发人员编出来的函数!
x=linspace(-100,100,4000);
y=x.^5-20*x.^4+40*x.^2-10*x-8;
plot(x,y,'r-');
xlabel('x轴');
ylabel('y轴');
title('5阶多项式');
result1=fzero('x.^5-20*x.^4+40*x.^2-10*x-8',-50);
syms x;
result2=solve(x.^5-20*x.^4+40*x.^2-10*x-8);
%对于如何减少丢失临界点和零点的问题,首先作图的时候尽量把范围做的大一些,这样
%可以宏观的把握图像。fzero函数使用的过程中可以多次选择初始点。
%第二道题
%用矩形公式求解积分
l=1/30;
x=0:l:1;
y=(1-x.^4).^(1/2);
Z1=sum(y(1:30))*l;
%用quadl求解
Z2=quadl('(1-x.^4).^(1/2)',0,1);
%总体来说还是第二种方法好,毕竟是开发人员编出来的函数!
2011-09-05
展开全部
第1题是先画出能显示函数f(x)曲线特性的图,然后两种求解器solve和fzero计算出所有零点和临界点。
第2题是求函数的积分,一种要采用数值计算方法,另一种采用符号函数方法。最后比较两种方法计算的结果。
第2题是求函数的积分,一种要采用数值计算方法,另一种采用符号函数方法。最后比较两种方法计算的结果。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询