实验一 曲线绘图 【练习与思考】
画出下列常见曲线的图形。 以直角坐标方程表示的曲线:
1. clear;
x=-2:0.1:2; y=x.^3; plot(x,y)
3
y x立方曲线
y=3*a*t.^3./(1+t.^2);
plot(x,y)
8. 摆线x a(t sint),yclear;clc; a=1;b=1;
t=0:pi/50:6*pi; x=a*(t-sin(t)); y=b*(1-cos(t)); plot(x,y); axis equal grid on
9. 内摆线(星形线)
b(1 cost)
2. 立方抛物线clear;
y=-2:0.1:2; x=y.^3; plot(x,y) grid on
y x
x acost,y asint(x y a)
2
33
232323
3. clear;
x=-3:0.1:3; y=exp(-x.^2); plot(x,y); grid on
%axis equal
以参数方程表示的曲线
4. 奈尔抛物线clear;
t=-3:0.05:3; x=t.^3;y=t.^2; plot(x,y) axis equal grid on
x
y e高斯曲线
clear; a=1;
t=0:pi/50:2*pi; x=a*cos(t).^3; y=a*sin(t).^3; plot(x,y)
10. 圆的渐伸线(渐开线)
x a(cost tsint),y a(sint tcost)
clear; a=1;
t=0:pi/50:6*pi;
x=a*(cos(t)+t.*sin(t)); y=a*(sin(t)+t.*cos(t)); plot(x,y) grid on 11. 空间螺线
x t,y t(y x)
32
23
x acost,y bsint,z ct
t2,y t3(y2 x3)
clear
a=3;b=2;c=1; t=0:pi/50:6*pi; x=a*cos(t); y=b*sin(t); z=c*t;
plot3(x,y,z) grid on
以极坐标方程表示的曲线:
12. 阿基米德线r a ,rclear; a=1;
phy=0:pi/50:6*pi; rho=a*phy;
polar(phy,rho,'r-*') 13. 对数螺线r eclear; a=0.1;
phy=0:pi/50:6*pi; rho=exp(a*phy); polar(phy,rho) 14. 双纽线
a
5. 半立方抛物线xclear;
t=-3:0.05:3; x=t.^2;y=t.^3; plot(x,y) %axis equal grid on
6. 迪卡尔曲线
x
3at3at33
,y (x y 3axy 0)22
1 t1 t
2
0
clear;
a=3;t=-6:0.1:6; x=3*a*t./(1+t.^2); y=3*a*t.^2./(1+t.^2); plot(x,y) 7. 蔓叶线
at2at3x32
x ,y (y )
1 t21 t2a x
clear;
a=3;t=-6:0.1:6;
x=3*a*t.^2./(1+t.^2);
r2 a2cos2 ((x2 y2)2 a2(x2 y2))
clear; a=1;
phy=-pi/4:pi/50:pi/4; rho=a*sqrt(cos(2*phy)); polar(phy,rho) hold on
polar(phy,-rho) 15. 双纽线
16. 四叶玫瑰线r clear;close a=1;
phy=0:pi/50:2*pi; rho=a*sin(2*phy); polar(phy,rho)
17. 三叶玫瑰线r clear;close a=1;
phy=0:pi/50:2*pi; rho=a*sin(3*phy); polar(phy,rho) 18. 三叶玫瑰线rclear;close
asin2 ,r 0
asin3 ,r 0
r2 a2sin2 ((x2 y2)2 2a2xy)
clear; a=1;
phy=0:pi/50:pi/2;
rho=a*sqrt(sin(2*phy)); polar(phy,rho) hold on
polar(phy,-rho)
a=1;
phy=0:pi/50:2*pi; rho=a*cos(3*phy); polar(phy,rho)
acos3 ,r 0
实验二 极限与导数
【练习与思考】
1. 求下列各极限
(1)lim(1
n
1n
) (2)limn3 3n
n n
(3)lim(
n
n 2 2n 1 n)
clear;
syms n
y1=limit((1-1/n)^n,n,inf)
y2=limit((n^3+3^n)^(1/n),n,inf)
y3=limit(sqrt(n+2)-2*sqrt(n+1)+sqrt(n),n,inf)
y1 =1/exp(1) y2 =3 y3 =0
(4)lim(
x 1
21
) (5)limxcot2x (6)
x 0x2 1x 1
syms x m
y7=limit(cos(m/x),x,inf)
y8=limit(1/x-1/(exp(x)-1),x,1) y9=limit(((1+x)^(1/3)-1)/x,x,0)
y7 =1
y8 =(exp(1) - 2)/(exp(1) - 1) y9 =1/3
2. 考虑函数
lim(x2 3x x)
x
clear; syms x ;
y4=limit(2/(x^2-1)-1/(x-1),x,1) y5=limit(x*cot(2*x),x,0)
y6=limit(sqrt(x^2+3*x)-x,x,inf)
y4 =-1/2 y5 =1/2 y6 =3/2
(7)lim(cos
f(x) 3x2sin(x3), 2 x 2
作出图形,并说出大致单调区间;使用diff求f'(x),并求f(x)确切的单调区间。
clear;close; syms x;
f=3*x^2*sin(x^3); ezplot(f,[-2,2]) grid on
大致的单调增区间:[-2,-1.7],[-1.3,1.2],[1.7,2]; 大致的单点减区间:[-1.7,-1.3],[1.2,1.7] f1=diff(f,x,1) ezplot(f1,[-2,2]) line([-5,5],[0,0]) grid on
axis([-2.1,2.1,-60,120])
f1 =
6*x*sin(x^3) + 9*x^4*cos(x^3)
mx11
) (8)lim( x) (9)
x x 1xxe 1 x 1lim x 0x
clear;
用fzero函数找f'(x)的零点,即原函数f(x)的驻点 x1=fzero('6*x*sin(x^3) + 9*x^4*cos(x^3)',[-2,-1.7]) x2=fzero('6*x*sin(x^3) + 9*x^4*cos(x^3)',[-1.7,-1.5]) x3=fzero('6*x*sin(x^3) + 9*x^4*cos(x^3)',[-1.5,-1.1]) x4=fzero('6*x*sin(x^3) + 9*x^4*cos(x^3)',0)
x5=fzero('6*x*sin(x^3) + 9*x^4*cos(x^3)',[1,1.5]) x6=fzero('6*x*sin(x^3) + 9*x^4*cos(x^3)',[1.5,1.7]) x7=fzero('6*x*sin(x^3) + 9*x^4*cos(x^3)',[1.7,2]) x1 =
-1.9948 x2 =
-1.6926 x3 =
-1.2401 x4 = 0 x5 =
1.2401 x6 =
1.6926 x7 =
1.9948
确切的单调增区间:[-1.9948,-1.6926],[-1.2401,1.2401],[1.6926,1.9948]
确切的单调减区间:[-2,-1.9948],[-1.6926,-1.2401],[1.2401,1.6926],[1.9948,2]
3. 对于下列函数完成下列工作,并写出总结报告,评论极
值与导数的关系,
(i) 作出图形,观测所有的局部极大、局部极小和全局最大、全局最小值点的粗略位置;
(iI) 求
f'(x)所有零点(即f(x)的驻点); (iii) 求出驻点处f(x)的二阶导数值;
(iv) 用fmin求各极值点的确切位置; (v) 局部极值点与f'(x),f"(x)有何关系?
(1) f(x) x2
sin(x2
x 2),x [ 2,2] (2) f(x) 3x5 20x3 10,x [ 3,3] (3)
f(x) x3
x2
x 2,x [0,3]
clear;close; syms x;
f=x^2*sin(x^2-x-2) ezplot(f,[-2,2]) grid on
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说医药卫生数学实验课后习题解答在线全文阅读。
相关推荐: