第一次作业
例1.1
>> x=0:pi/50:4*pi;
>> y=cos(x);
plot(x,y)
例1.2
>> ezplot('cos(t)+cos(7*t)/2+cos(17*t)/3','sin(t)+sin(7*t)/2+sin(17*t)/3',[0,2*pi])
>>ezplot('3*cos(t)^3','3*sin(t)^3',[0,2*pi])
例1.4
>> theta=0:pi/20:2*pi;
>> rho=2*(1-cos(theta));
>> polar(theta,rho)
>> x1=-pi*3/8:0.1:pi*3/8;
>> y1=tan(x1);
>> x2=-2.4:0.1:2.4;
>> y2=x2;
>> x3=-2.4:0.1:2.4;
>> y3=atan(x3);
>> plot(x1,y1,'-',x2,y2,'k',x3,y3,':')
例2.1
(1)>> syms n
>> limit(tan(pi/4+1/n)^n,n,+inf)
ans =
exp(2)
(2)>> syms n
>> limit(n^(1/n),n,+inf)
ans =
1
(3)>> syms x
>> limit(x*(pi/2-asin(x/sqrt(x^2+1))),x,+inf) ans =
1
(4)>> syms x
>> limit(1/(1+exp(1/x)),x,1,'left') ans =
1/(exp(1) + 1)
例3.1
>> syms x n
>> diff(x^n,x)
ans =
n*x^(n - 1)
例3.2
>> syms x y
>> F=y-x-log(y);
>> Fx=diff(F,x);
>> Fy=diff(F,y);
>> yx=-Fx/Fy;
>> y1=simplify(yx)
ans=
y/(y-1)
例3.3
>> syms t
>> x=log(2+3*t^2);
>> y=5*t-4*atan(t);
>> yx=diff(y,t)/diff(x,t);
>>y1=simplify(yx)
y1 =
-((4/(t^2 + 1) - 5)*(3*t^2 + 2))/(6*t)
第二次作业
例1.6
方法一:
>> y=[];
>> for x=-3:0.1:5; if x<1
y=[y,x-1];
end
if x>=1
y=[y,x^2+1];
end
end
>> x=-3:0.1:5;
>> plot(x,y)
方法二:
>> x=-3:0.1:5;
>> plot(x,y)
>> x1=-3:0.1:1; >> y1=x1-1;
>> x2=1:0.1:5; >> y2=1+x2.^2; >> plot(x1,y1,x2,y2)
另附习
题
快递公司问题件快递公司问题件货款处理关于圆的周长面积重点题型关于解方程组的题及答案关于南海问题
:
>> ezplot('3*cos(t)','2*sin(t)',[0,2*pi])
3.1
>> syms x
>> diff('tan(x)',x,2)
ans =
2*tan(x)*(tan(x)^2 + 1)
3.2
>> syms x y
>> F=x^y-y^x
>> Fx=diff(F,x);
>> Fy=diff(F,y);
>> yx=-Fx/Fy;
>> y1=simplify(yx)
y1 =
(y*(x^y*y - x*y^x*log(y)))/(x*(x*y^x - x^y*y*log(x)))