matlab课后习题答案 (附图)

相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

习题2.1

画出下列常见曲线的图形

y (1)立方抛物线3x 命令:syms x y;

ezplot('x.^(1/3)')

(2)高斯曲线y=e^(-X^2);

命令:clear

syms x y;

ezplot('exp(-x*x)')

(3)笛卡尔曲线

命令:>> clear

>> syms x y;

>> a=1;

>> ezplot(x^3+y^3-3*a*x*y)

(4)蔓叶线

命令:>> clear

>> syms x y;

>> a=1 ezplot(y^2-(x^3)/(a-x))

(5)摆线:()()t b y t t a x cos 1,sin -=-=

命令:>> clear

>> t=0:0.1:2*pi;

>> x=t-sin(t);

>>y=2*(1-cos(t)); >> plot(x,y)

7螺旋线

命令:>> clear >> t=0:0.1:2*pi; >> x=cos(t); >> y=sin(t);

>> z=t;

>>plot3(x,y,z) (8)阿基米德螺线

>> theta=0:0.1:2*pi;

>> rho1=(theta);

>> subplot(1,2,1),polar(theta,rho1)

(9) 对数螺线

命令:clear

theta=0:0.1:2*pi;

rho1=exp(theta);

subplot(1,2,1),polar(theta,rho1) (12)心形线

>> theta=0:0.1:2*pi;

>> rho1=1+cos(theta);

>> subplot(1,2,1),polar(theta,rho1)

练习2.2

1. 求出下列极限值

(1)n

n n n 3lim 3+∞→

命令:>>syms n

>>limit((n^3+3^n)^(1/n))

ans =

3

(2))121(lim n n n n ++-+∞

命令:>>syms n

>>limit((n+2)^(1/2)-2*(n+1)^(1/2)+n^(1/2),n,inf)

ans =

(3)x x x 2cot lim 0

命令:syms x ;

>> limit(x*cot(2*x),x,0)

ans =

1/2

(4))(cos lim c m x

x ∞→ 命令:syms x m ;

limit((cos(m/x))^x,x,inf)

ans =

1

(5))111(lim 1

--→e x x x 命令:syms x

>> limit(1/x-1/(exp(x)-1),x,1)

ans =

(exp(1)-2)/(exp(1)-1)

(6))(

2lim x x x x -+∞→

命令:syms x

>> limit((x^2+x)^(1/2)-x,x,inf)

ans =

1/2

练习2.4

1. 求下列不定积分,并用diff 验证:

(1)⎰+x

dx cos 1 >>Clear

>> syms x y

>> y=1/(1+cos(x));

>> f=int(y,x)

f =

tan(1/2*x)

>> y=tan(1/2*x);

>> yx=diff(y,x);

>> y1=simple(yx)

y1 =

1/2+1/2*tan(1/2*x)^2 (2)⎰+e x dx 1

clear

syms x y

y=1/(1+exp(x));

f=int(y,x)

f =

-log(1+exp(x))+log(exp(x))

syms x y

y=-log(1+exp(x))+log(exp(x));

yx=diff(y,x);

y1=simple(yx)

y1 =

1/(1+exp(x))

(3)dx x x ⎰sin 2

syms x y

y=x*sin(x)^2;

>> f=int(y,x)

f =

x*(-1/2*cos(x)*sin(x)+1/2*x)-1/4*cos(x)^2-1/4*x^2

clear

syms x y y=x*(-1/2*cos(x)*sin(x)+1/2*x)-1/4*cos(x)^2-1/4*x^2;

yx=diff(y,x);

>> y1=simple(yx)

y1 =

x*sin(x)^2

(4) xdx ⎰sec 3

syms x y

y=sec(x)^3;

f=int(y,x)

f =

1/2/cos(x)^2*sin(x)+1/2*log(sec(x)+tan(x))

clear

syms x y

y=1/2/cos(x)^2*sin(x)+1/2*log(sec(x)+tan(x));

yx=diff(y,x);

y1=simple(yx)

y1 =

1/cos(x)^3

2. 求下列积分的数值解

1)dx x x ⎰-10

clear

syms x

y=int(x^(-x),x,0,1)

y =

相关文档
最新文档