2023年12月10日发(作者:高职数学数学试卷)

贵州师范学院

2012级数本一班 李刚

数学实验课后练习答案

习题2.1

1. syms x y;

>> x=-5:0.01:5;

>> y=x.^1/2;

>> plot(x,y)

2. fplot(\'exp(-x.^2)\',[-5,5])

3. ezplot(\'x.^3+y.^3-3*x*y\',[-5,5])

4

.

ezplot(\'y.^2-x.^3/(1-x)\',[-5,5])

5.

t=0:0.1:2*pi;

x=t-sin(t);

y=2*(1-cos(t));

plot(x,y)

6. t=0:0.1:2*pi; x=cos(t).^3;

>> y=sin(t).^3;

>> plot(t,y) >>

7:

t=0:0.1:2*pi; x=cos(t); y=2*sin(t); z=3*t; plot3(x,y,z)

8:

x =0:0.1:2*pi; r=x; polar(x,r)

9: x =0:0.1:2*pi; r=exp(x); polar(x,r)

10:

x=0:0.1:2*pi; r=sqrt(cos(2*x)); polar(x,r)

11: x=0:0.1:2*pi; r=sqrt(sin(2*x)); polar(x,r)

12:

x =0:0.1:2*pi; r=1+cos(x); polar(x,r)

练习2.2

1:(1)

(2):syms n; limit(\'sqrt(n+2)-2*(sqrt(n+1))+sqrt(n)\',n,inf)

Ans=

0

(3):

:

(4):

(5):

(6):

2:

3:

fplot(\'x.^2*sin(x.^2-x-2)\',[-2,2])

练习 2.3

1:

(2):

2:

练习2.4

1:

(1)

(2):

(3)

(4):

2:

(1):

syms x; int(x^(-x),x,0,1)

ans =

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

vpa(ans,10)

ans =

1.291285997

(2):

syms x;

int(exp(2*x)*cos(x)^3,x,0,2*pi)

ans =

-22/65+22/65*exp(4*pi)

(3):

syms x; int(exp(x^2/2)/sqrt(2*pi),x,0,1)

ans =

-42624/5644425081792261*i*erf(1/2*i*2^(1/2))*pi^(1/2)*2^(1/2)

>> vpa(ans,10)

ans =

.4767191345

(4):

syms x;

int(x*log(x^4)*asin(1/x^2),x,1,3)

ans =

int(x*log(x^4)*asin(1/x^2),x = 1 .. 3)

>> vpa(ans,10)

ans =

2.459772128

(5):

syms x ;

int(exp(x^2/2)/sqrt(2*pi),x,-inf,inf)

ans =

Inf

(6):

syms x ;

int(sin(x)/x,x,0,inf)

ans =

1/2*pi

(7):

syms x ;

int(tan(x)/sqrt(x),x,0,1)

Warning: Explicit integral could not be found.

> In at 58

ans =

int(tan(x)/x^(1/2),x = 0 .. 1)

>> vpa(ans,10)

ans =

.7968288892

(8):

syms x ;

int(exp(-x^2/2)/(1+x^4),x,-inf,inf)

ans =

1/4*pi^(3/2)*2^(1/2)*(AngerJ(1/2,1/2)-2/pi^(1/2)*sin(1/2)+2/pi^(1/2)*cos(1/2)-WeberE(1/2,1/2))

>> vpa(ans,10)

ans =

1.696392536

(9):

syms x ;

int(sin(x)/sqrt(1-x^2),x,0,1)

ans =

1/2*pi*StruveH(0,1)

>> vpa(ans,10)

ans =

.8932437410

练习2.5

(1):syms n;

symsum(1/n^2^n,n,1,inf)

ans =

sum(1/((n^2)^n),n = 1 .. Inf)

(2):syms n ;

symsum(sin(1/n),n,1,inf)

ans =

sum(sin(1/n),n = 1 .. Inf) (3):

syms n ;

symsum(log(n)/n^3,n,1,inf)

ans =

-zeta(1,3)

(4):

syms n ;

symsum(1/(log(n))^n,n,3,inf)

ans =

sum(1/(log(n)^n),n = 3 .. Inf)

(5):

syms n;

symsum(1/(n*log(n)),n,2,inf)

ans =

sum(1/n/log(n),n = 2 .. Inf)

(6):

yms n;

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

ans =

-1/4*Psi(1-1/2*i)+1/4*Psi(1/2-1/2*i)-1/4*Psi(1+1/2*i)+1/4*Psi(1/2+1/2*i)

第三章

练习3.1

1:

(1): a=-30:1:30;

b=-30:1:30;

[x,y]=meshgrid(a,b);

z=10*sin(sqrt(x.^2+y.^2))./(sqrt(1+x.^2+y.^2));

meshc(x,y,z)

(2):

a=-30:1:30;

b=-30:1:30;

[x,y]=meshgrid(a,b);

z=4*x.^2/9+y.^2;

meshc(x,y,z)

(3):

(4):

a=-30:1:30;

b=-30:1:30;

[x,y]=meshgrid(a,b);

z=x.^2/3-y.^2/3;

meshc(x,y,z) (5):

a=-30:1:30;

>> b=-30:1:30;

>> [x,y]=meshgrid(a,b);

>> z=x*y;

>> meshc(x,y,z)

(6):

(7):a=-30:1:30;

>> b=-30:1:30;

>> [x,y]=meshgrid(a,b);

>> z=sqrt(x.^2+y.^2);

>> meshc(x,y,z)

(8):

(9):

a=-30:1:30;

>> b=-30:1:30;

>> [x,y]=meshgrid(a,b);

>> z=atan(x./y);

>> meshc(x,y,z)

练习 3.2

1;

a=-1:0.1:1;

>> b=0:0.1:2;

>> [x,y]=meshgrid(a,b);

>> z=x.*exp(-x.^2-y.^2);

>> [px,py]=gradient(z,0.1,0.1);

>> contour(a,b,z)

>> hold on

>> quiver(a,b,px,py)

2:

a=-2:0.1:1;

>> b=-7:0.1:1;

>> [x,y]=meshgrid(a,b);

>> z=y.^3/9+3*x.^2.*y+9*x.^2+y.^2+x.*y+9;

>> plot3(x,y,z)

>> grid on

3:

[x,y]=meshgrid(-2*pi:0.2:2*pi);

z=x.^2+2*y.^2;

plot3(x,y,z)

hold on

ezplot(\'x^2+y^2-1\',[-2*pi,2*pi]) ;

grid on

4:

t=0:0.03:2*pi;

>> s=[0:0.03:2*pi]\';

>> x=(0*s+1)*cos(t);y=(0*s+1)*sin(t);z=s*(0*t+1);

>> mesh(x,y,z)

>> hold on

>> [x,y]=meshgrid(-1:0.1:1);

>> z=1-x+y;

>> mesh(x,y,z)

5:

syms x y z dx dy

z=75-x^2-y^2+x*y;

zx=diff(z,x),zy=diff(z,y)

zx =

-2*x+y

zy =

-2*y+x

练习 3.3 1:

ezplot(\'x^2+y^2-2*x\',[-2,2]);

>> grid on

syms x y ;

s=int(int(x+y+1,y,-sqrt(1-(x-1)^2),sqrt(1-(x-1)^2)),x,0,2)

s =

2*pi

2:

syms r t ;

>> s=int(int(sqrt(1+r^2*sin(t)),r,0,1),t,0,2*pi)

s =

int(1/2*((1+sin(t))^(1/2)*sin(t)^(1/2)+log(sin(t)^(1/2)+(1+sin(t))^(1/2)))/sin(t)^(1/2),t = 0 .. 2*pi)

3:

syms x y z ;

>> s=int(int(int(1/(1+x+y+z)^3,z,0,1-x-y),y,0,1-x),x,0,1)

s =

-5/16+1/2*log(2)

4:s=vpa(int(int(x*exp(-x^2-y^2),y,0,2),x,-1,10))

s =

0.16224985

练习 3.4

1:(1):y=dsolve(\'Dy=x+y\',\'y(0)=1\',\'x\')

得:y =

-1-x+2*exp(x)

(2):y=dsolve(\'Dy=2*x+y^2\',\'y(0)=0\')

y =

tan(t*x^(1/2)*2^(1/2))*x^(1/2)*2^(1/2)

练习 4.1

1:(1):p=[5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -6 8 0 0 0 -5 0 0];

>> x=roots(p)

x =

0

0

0.9768

0.9388 + 0.2682i

0.9388 - 0.2682i

0.8554 + 0.5363i

0.8554 - 0.5363i

0.6615 + 0.8064i

0.6615 - 0.8064i

0.3516 + 0.9878i

0.3516 - 0.9878i

-0.0345 + 1.0150i

-0.0345 - 1.0150i

-0.4609 + 0.9458i

-0.4609 - 0.9458i

-0.1150 + 0.8340i

-0.1150 - 0.8340i -0.7821 + 0.7376i

-0.7821 - 0.7376i

-0.9859 + 0.4106i

-0.9859 - 0.4106i

-1.0416

-0.7927

(2): p=[8 36 54 23];

x=roots(p)

x =

-1.8969 + 0.6874i

-1.8969 - 0.6874i

-0.7063

2:

p1=[1 0 -3 -2 -1];p2=[1 -2 5];

[q2,r2]=deconv(p1,p2)

q2 =

1 2 -4

r2 =

0 0 0 -20

3:

syms x;

f=x^4+3*x^3-x^2-4*x-3;

g=3*x^3+10*x^2+2*x-3;

p1=factor(f),p2=factor(g)

p1 =

(x+3)*(x^3-x-1)

p2 =

19

(x+3)*(3*x^2+x-1)

4:

syms x ;

f=x^12-1;

p=factor(f)

p =

(-1+x)*(1+x^2+x)*(1+x)*(1-x+x^2)*(1+x^2)*(x^4-x^2+1)

5: (1):

p=[1 0 1];

q=[1 0 0 0 1];

[a,b,r]=residue(p,q)

a =

-0.0000 - 0.3536i

-0.0000 + 0.3536i

0.0000 - 0.3536i

0.0000 + 0.3536i

b =

0.7071 + 0.7071i

0.7071 - 0.7071i

-0.7071 + 0.7071i

-0.7071 - 0.7071i

r =

[]

(2):

p=[1];

q=[1 0 0 0 1];

[a,b,r]=residue(p,q)

a = -0.1768 - 0.1768i

-0.1768 + 0.1768i

0.1768 - 0.1768i

0.1768 + 0.1768i

b =

0.7071 + 0.7071i

0.7071 - 0.7071i

-0.7071 + 0.7071i

-0.7071 - 0.7071i

r =

[]

(3):

p=[1 0 1];

q=[1 1 -1 -1];

[a,b,r]=residue(p,q)

a =

0.5000

-1.0000

0.5000

b =

-1.0000

-1.0000

1.0000

r =

[]

(4): p=[1 1 0 0 0 -8]; q=[1 0 -1 0];

[a,b,r]=residue(p,q)

a =

-4

-3

8

b =

-1

1

0

r =

1 1 1

练习1:(1):

D=[2 1 3 1;3 -1 2 1;1 2 3 2;5 0 6 2];

det(D)

ans =

6

(2):

syms a b c d

D=[a 1 0 0 ;-1 b 1 0;0 -1 c 1;0 0 -1 d];

det(D)

ans =

a*b*c*d+a*b+a*d+c*d+1

2:(1):

4.2 syms a b c d

D=[1 1 1 1; a b c d;a^2 b^2 c^2 d^2;a^3 b^3 c^3 d^3];

det(D)

ans =

b*c^2*d^3-b*d^2*c^3-b^2*c*d^3+b^2*d*c^3+b^3*c*d^2-b^3*d*c^2-a*c^2*d^3+a*d^2*c^3+a*b^2*d^3-a*b^2*c^3-a*b^3*d^2+a*b^3*c^2+a^2*c*d^3-a^2*d*c^3-a^2*b*d^3+a^2*b*c^3+a^2*b^3*d-a^2*b^3*c-a^3*c*d^2+a^3*d*c^2+a^3*b*d^2-a^3*b*c^2-a^3*b^2*d+a^3*b^2*c

(2): syms a b x y z

D=[a*x+b*y a*y+b*z a*z+b*x; a*y+b*z a*z+b*x a*x+b*y;a*z+b*x a*x+b*y a*y+b*z];

det(D)

ans =

3*a^3*x*z*y+3*b^3*y*x*z-a^3*x^3-a^3*y^3-b^3*z^3-a^3*z^3-b^3*x^3-b^3*y^3

3: (1): D=[1 1 1 1;1 2 -1 4;2 -3 -1 -5;3 1 2 11];

D1=[5 1 1 1;-2 2 -1 4;-2 -3 -1 -5;0 1 2 11];

D2=[1 5 1 1;1 -2 -1 4;2 -2 -1 -5;3 0 2 11];

D3=[1 1 5 1;1 2 -2 4;2 -3 -2 -5;3 1 0 11];

D4=[1 1 1 5;1 2 -1 -2;2 -3 -1 -2;3 1 2 0];

x1=det(D1)/det(D);

x2=det(D2)/det(D);

x3=det(D3)/det(D);

x4=det(D4)/det(D);

x1,x2,x3,x4

x1 =

1

x2 =

2

x3 =

3

x4 =

-1

(2):

D=[5 6 0 0 0;1 5 6 0 0;0 1 5 6 0;0 0 1 5 6;0 0 0 1 5];

D1=[1 6 0 0 0;0 5 6 0 0;0 1 5 6 0;0 0 1 5 6;1 0 0 1 5];

D2=[5 1 0 0 0;1 0 6 0 0;0 0 5 6 0;0 0 1 5 6;0 1 0 1 5];

D3=[5 6 1 0 0;1 5 0 0 0;0 1 0 6 0;0 0 0 5 6;0 0 1 1 5];

D4=[5 6 0 1 0;1 5 6 0 0;0 1 5 0 0;0 0 1 0 6;0 0 0 1 5];

D5=[5 6 0 0 1;1 5 6 0 0;0 1 5 6 0;0 0 1 5 0;0 0 0 1 1];

x1=det(D1)/det(D);

x2=det(D2)/det(D);

x3=det(D3)/det(D);

x4=det(D4)/det(D);

x5=det(D5)/det(D);

x1,x2,x3,x4,x5

x1 =

2.2662

x2 =

-1.7218

x3 =

1.0571

x4 =

-0.5940

x5 =

0.3188

练习 4.3

1:A=[1 2 0;3 4 -1; 1 1 -1];

B=[1 2 3;-1 0 1;-2 4 -3];

A\',2+A,2*A-B,A*B,A^2,A^(-1)

ans =

1 3

2 4

0 -1

ans =

3 4

5 6

3 3

ans =

1 2

7 8

4 -2

ans =

-1 2

1 2

2 -2

ans =

7 10

14 21

3 5

1

1

-1

2

1

1

-3

-3

1

5

16

7

-2

-3

0

ans =

-3.0000 2.0000 -2.0000

2.0000 -1.0000 1.0000

-1.0000 1.0000 -2.0000

2:(1):

B=[2 4 3];

B\'

ans =

2

4

3

(2):

A=[1 2 3];

B=[2 4 3];

A.*B,B.*A

ans =

2 8 9

ans =

2 8 9

3:(1):

A=[0 1 0;1 0 0;0 0 1];

B=[1 0 0;0 0 1;0 1 0];

C=[1 -4 3;2 0 -1;1 -2 0];

A^(-1),B^(-1),X=A^(-1)*C*B^(-1)

ans =

0 1 0

1 0 0 0 0 1

ans =

1 0 0

0 0 1

0 1 0

X =

2 -1 0

1 3 -4

1 0 -2

(2):

>> A=[1 2 3;2 2 3;3 5 1];B=[1 0 0;2 0 0;3 0 0];

A^(-1),x=A^(-1)*B

ans =

-1.0000 1.0000

0.5385 -0.6154

0.3077 0.0769

x =

1 0 0

0 0 0

0 0 0

1:(1):

A=[4 2 -1;3 -1 2;11 3 0];

b=[2;10;8];

B=[A,b];

rank(A),rank(B)

0.0000

0.2308

-0.1538

练习4.4

ans =

2

ans =

3

(2):A=[2 1 -1 1;3 -2 1 -3;1 4 -3 5];

b=[1;4;-2];

B=[A,b];

rank(A),rank(B)

ans =

2

ans =

2

(3):A=[ 1 1 1 1; 1 2 -1 4;2 -3 -1 -5;3 1 2 11];

b=[5;-2;-2;0];

B=[A,b];

rank(A),rank(B)

ans =

4

ans =

4

(4):A=[ 1 1 2 -1; 2 1 1 -1;2 2 1 2];

b=[0;0;0];

B=[A,b];

rank(A),rank(B) ans =

3

ans =

3

2:syms a;

A=[-2 1 1;1 -2 1;1 1 -2];

b=[-2;a;a^2];

B=[A,b];

rank(A),rank(B)

ans =

2

ans =

3

练习1:(1):A=[0 1;-1 0];

[a,b]=eig(A)

a =

0.7071 0.7071

0 + 0.7071i 0 - 0.7071i

b =

0 + 1.0000i 0

0 0 - 1.0000i

4.5

(2):

A=[0 0 1;0 1 0;1 0 0];

[a,b]=eig(A)

a =

0.7071 0.7071 0

0 0 -1.0000

-0.7071 0.7071 0

b =

-1 0 0

0 1 0

0 0 1

(3):

A=[4 1 -1;3 2 -6;1 -5 3];

[a,b]=eig(A)

a =

0.0185 -0.9009 -0.3066

-0.7693 -0.1240 -0.7248

-0.6386 -0.4158 0.6170

b =

-3.0527 0 0

0 3.6760 0

0 0 8.3766

(4):

A=[1 1 1 1;1 1 -1 -1;1 -1 1 -1;1 1 -1 1];

[a,b]=eig(A)

a =

0.5615 0.3366 0.2673 -0.7683

-0.5615 -0.3366 0.0000 -0.0000 -0.5615 -0.3366 -0.5345 -0.6236

-0.2326 0.8125 0.8018 -0.1447

b =

-1.4142 0 0 0

0 1.4142 0 0

0 0 2.0000 0

0 0 0 2.0000

(5):

A=[5 7 6 5;7 10 8 7;6 8 10 9;5 7 9 10];

[a,b]=eig(A)

a =

0.8304 0.0933 0.3963 0.3803

-0.5016 -0.3017 0.6149 0.5286

-0.2086 0.7603 -0.2716 0.5520

0.1237 -0.5676 -0.6254 0.5209

b =

0.0102 0 0 0

0 0.8431 0 0

0 0 3.8581 0

0 0 0 30.2887

(6):

A=[5 6 0 0 0;1 5 6 0 0 ;0 1 5 6 0 ;0 0 1 5 6; 0 0 0 1 5 ];

[a,b]=eig(A)

a =

0.7843 -0.7843 -0.9860 -0.9237 -0.9237

0.5546 0.5546 0.0000 0.3771 -0.3771

0.2614 -0.2614 0.1643 -0.0000 0.0000

0.0924 0.0924 0.0000 -0.0628 0.0628

0.0218 -0.0218 -0.0274 0.0257 0.0257

b =

9.2426 0 0 0 0

0 0.7574 0 0 0

0 0 5.0000 0 0

0 0 0 2.5505 0

0 0 0 0 7.4495

2: (1):

A=[0 1;-1 0];

[a,b]=eig(A)

a =

0.7071 0.7071

0 + 0.7071i 0 - 0.7071i

b =

0 + 1.0000i 0

0 0 - 1.0000i

>> P=orth(a),B=P\'*A*P,P*P\'

P =

-0.7071 -0.7071

0 - 0.7071i 0 + 0.7071i

B =

0 + 1.0000i 0 - 0.0000i

0 - 0.0000i 0 - 1.0000i

ans =

1.0000 0 + 0.0000i

0 - 0.0000i 1.0000

>> inv(a)*A*a

ans =

0 + 1.0000i 0

0 0 - 1.0000i

3:(1): A=[2 0 0;0 3 2;0 2 3];

[a,b]=eig(A)

a =

0 1.0000 0

-0.7071 0 0.7071

0.7071 0 0.7071

b =

1.0000 0 0

0 2.0000 0

0 0 5.0000

>> P=orth(a),B=P\'*A*P,P*P\'

P =

-1.0000 0 -0.0000

0.0000 0.7071 0.7071

-0.0000 -0.7071 0.7071

B =

2.0000 0.0000 0.0000

0.0000 1.0000 0

0.0000 0 5.0000

ans =

1.0000 -0.0000 0.0000

-0.0000 1.0000 -0.0000

0.0000 -0.0000 1.0000

(2):

A=[1 1 0 -1;1 1 -1 0;0 -1 1 1;-1 0 1 1];

[a,b]=eig(A)

a =

-0.5000 0.7071 0.0000 0.5000

0.5000 -0.0000 0.7071 0.5000

0.5000 0.7071 0.0000 -0.5000

-0.5000 0 0.7071 -0.5000

b =

-1.0000 0 0 0

0 1.0000 0 0

0 0 1.0000 0

0 0 0 3.0000

>> P=orth(a),B=P\'*A*P,P*P\'

P =

-0.5000 -0.4998 -0.4783 -0.5210

0.5000 -0.4822 0.5212 -0.4958

0.5000 0.4998 -0.4964 -0.5037

-0.5000 0.5175 0.5031 -0.4786

B =

-1.0000 0.0000 0.0000 0.0000

0.0000 2.9988 -0.0362 0.0344

0.0000 -0.0362 1.0007 -0.0006

0.0000 0.0344 -0.0006 1.0006

ans =

1.0000 0.0000 0.0000 -0.0000

0.0000 1.0000 -0.0000 0

0.0000 -0.0000 1.0000 0.0000

-0.0000 0 0.0000 1.0000

练习 5.3

1:

[m,v]=unifstat(1,11)

m =

6

v =

8.3333

2: [m,v]=normstat(0,16)

m =

0

v =

256

>> s=sqrt(v)

s =

16

3:

x=randn(200,6);

s=std(x) s =

0.9094 0.9757 0.9702 0.9393 0.9272 1.0982

4:

x=normrnd(0,16,300,1);

hist(x,10)

练习 5.6

1:x=[352 373 411 441 462 490 529 577 641 692 743];

y=[166 153 177 201 216 208 227 238 268 268 274];

plot(x,y,\'*\')

4: (1):

x=[10 10 10 15 15 15 20 20 20 25 25 25 30 30 30];

y=[25.2 27.3 28.7 29.8 31.1 27.8 31.2 32.6 29.7 31.7 30.1 32.3 29.4 30.8 32.8];

plot(x,y,\'*\')


更多推荐

数学,贵州,师范学院,高职,课后练习