数学实验课后作业

发布 2022-07-02 02:52:28 阅读 6024

实验一曲线绘制。

1、 立方曲线。

> x=-10:0.02:10;

> y=x.^3;

> plot(x,y)

2、 立方抛物线。

x=-10:0.02:10;

> y=x.^3;

> plot(x,y)

> x=-10:0.02:10;

> y=x.^(1/3);

>plot(x, y)

3、 高斯曲线。

> x=-10:0.02:10;

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

> plot(x,y)

以参数形式表示的曲线:

4、 奈尔抛物线,()

> t=-10:0.02:10;

> x=t.^3;

> y=t.^2;

> plot(x,y)

5、 半立方抛物线,()

> t=-10:0.02:10;

> x=t.^2;

> y=t.^3;

> plot(x,y)

6、 笛卡尔曲线,()

> syms t

> x=3*t/(1+t.^2);

> y=3*t.^2/(1+t.^2);

> ezplot(x,y)

7、 蔓叶线。

t=-10:0.01:10;

> a=1;

> x=a*t.^2/(1+t.^2);

> y=a*t.^3/(1+t.^2);

> plot(t,x,t,y,':

8、 摆线。

> t=-10:0.01:10;

> x=t-sin(t);

> y=1-cos(t);

> plot(x,y)

9、 内摆线(星形线)

> syms t

> x=cos(t).^3;

> y=sin(t).^3;

> ezplot(x,y)

10、 圆的渐伸线(渐开线)

> t=0:2*pi/30:2*pi;

> x=cos(t)+t.*sin(t);

> y=sin(t)-t.*cos(t);

> plot(x,y)

11、 空间螺线。

> t=0:2*pi/30:2*pi;

> a=1;b=1;c=1;

> x=a*cos(t);

> y=b*sin(t);

> z=c*t;

> plot3(x,y,z);

以极坐标方程表示的曲线:

12、 阿基米德线。

theta=0:0.1:2*pi;

> a=1;

> r=a*theta;

> polar(theta,r)

13、 对数螺线。

> theta=0:0.1:2*pi;

> a=1;

> r=exp(a*theta);

> semilogx(theta,r)

14、 双扭线。

> t=0:0.1:2*pi;

> a=1;

> x=cos(t).*sqrt(cos(2*t));

> y=sin(t).*sqrt(cos(2*t));

> plot(x,y)

warning: imaginary parts of complex x and/or y arguments ignored.

15、 双扭线。

> t=0:0.1:2*pi;

> a=1;

> x=cos(t).*sqrt(sin(2*t));

> y=sin(t).*sqrt(sin(2*t));

> plot(x,y)

warning: imaginary parts of complex x and/or y arguments ignored.

16、 四叶玫瑰线。

> t=0:0.1:2*pi;

> a=1;

> x=cos(t).*sin(2*t);

> y=sin(t).*sin(2*t);

> plot(x,y)

17、 三叶玫瑰线。

> t=0:0.1:2*pi;

> x=cos(t).*sin(3*t);

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

> plot(x,y)

18、 三叶玫瑰线。

> t=0:0.1:2*pi;

> x=cos(t).*cos(3*t);

> y=sin(t).*cos(3*t);

> plot(x,y)

实验二级数与导数。

1. 求下列各极限。

> syms n

> f=(1-1/n)^n;

> limit(f,n,inf)

ans =exp(-1)

> syms n

> f=(n^3+3^n)^(1/n);

> limit(f,n,inf)

ans =3

> syms n

> f=(n+2).^1/2)-(n+1).^1/2)*2+n.^(1/2);

> limit(f,n,inf)

ans =0

> clear

> syms x

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

ans =-1/2

> clear

> syms x

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

ans =1/2

> clear

> syms x

> limit(sqrt(x^2+x*3)-x,x,inf)

ans =3/2

> clear

> syms x m

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

ans =1

> clear

> syms x

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

ans =(exp(1)-2)/(exp(1)-1)

> clear

> syms x

> limit(((1+x)^(1/3)-1)/x,x,0)

ans =1/3

2. 作出函数f(x)=,2(1) >x=-2:0.1:2;

> y=3*x.^2.*sin(x.^3);

> grid on;

2)>>clear

> syms x

> diff(3*x^2*sin(x^3),x,1)

ans = 6*x*sin(x^3)+9*x^4*cos(x^3)

3) >x=-2:0.1:2;

> y=6*x.*sin(x.^3)+9*x.^4.*cos(x.^3);

> plot(x,y)

> grid on

实验四积分。

1.(不定积分)用int计算下列不定积分,并diff用验证。

> clear;syms x;

> int(x*sin(x^2))

ans=-1/2*cos(x^2) 用微分命令diff验证积分正确性,matlab**为。

> clear;syms x;

> diff(-1/2*cos(x^2))

ans = x*sin(x^2)

>> clear;syms x;

> int(1/(1+cos(x)))

ans =tan(1/2*x)

>> clear;syms x;

> diff(tan(1/2*x))

ans =1/2+1/2*tan(1/2*x)^2

> clear;syms x;

> int(1/(exp(x)+1))

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

>> clear;syms x;

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

ans =1-exp(x)/(exp(x)+1)

> clear;syms x;

> int(asin(x))

ans =x*asin(x)+(1-x^2)^(1/2)

>> clear;syms x;

> diff(x*asin(x)+(1-x^2)^(1/2))

ans =asin(x)

> clear;syms x;

> int((sec(x))^3)

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

>> clear;syms x;

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

ans =1/cos(x)^3*sin(x)^2+1/2/cos(x)+1/2*(sec(x)*tan(x)+1+tan(x)^2)/(sec(x)+tan(x))

2.(定积分)用trapz,quad8,int计算下列定积分。

a.>>x=eps:0.01:1;

>y=sin(x)./x;

>trapz(x,y)

ans=0.9461

y=fun1(x)

y=sin(x)./x;

> quadl('fun1',eps,1)

ans =0.9461

c.. clear;symsx;

>int(sin(x)/x,x,eps,1)

ans=sinint(1)-sinint(1/4503599627370496)

>> clear;x=0:0.01:1;y=x.^x;

> trapz(x,y)

ans =0.7835

> clear;x=0:0.01:2*pi;y=exp(x).*sin(2*x);

>trap(x,y) ans=-213.7824

> clear;

> syms x;

> int(exp(-x.^2),x,0,1)

ans =1/2*erf(1)*pi^(1/2)

3、 (椭圆的周长).用定积分计算椭圆的周长。

function s=db1quad2(z=1-x^2/9-y^2/4,-3,3,-2*sqrt(1-x^2/9),2*sqrt(1-x^2/9);

function z=eg3_fun(x,y)

z=1-x^2/9-y^2/4;

function y=eg3_low(x)

y=-2*sqrt(1-x^2/9);

function y=eg3_up(x)

y=2*sqrt(1-x^2/9);

> clear;

> db1quad2('eg3_fun',-3,3,'eg3_low','eg3_up',1000,1000)

4、 (二重积分)计算数值积分。

> syms x y;

> iy=int(1+x+y,-sqrt(2*y-x^2),sqrt(2*y-x^2));

> int(iy,x,-1,1)

ans =2*y^(1/2)*(1+y)/pi^(1/2)/(1/y)^(1/2)*(pi^(1/2)/y+(-log(2)-1-log(-1/y))*pi^(1/2)+1/8*pi^(1/2)/y*(8*y-8)+pi^(1/2)/y*(1-2*y)^(1/2)-2*pi^(1/2)*log(1/2+1/2*(1-2*y)^(1/2)))

vb实验课后作业

实验名称 算术运算符的简单应用 实验目的 进一步熟悉visual basic 6.0的友好界面,掌握常用控件的布局与使用,理解并熟练应用八个算术运算符号,并创建一个名为 将一个三位正整数逆序输出 的应用程序。实验要求 在第一个textbox中任意输入一个三位的正整数,在第二个textbox中显示其逆...

数学课后作业

课后作业1一我会算。二我会填。三补画。四 应用题 6分 1 7个小朋友堆雪人,又来了3个,一共有多少个小朋友?2 树上有9只小鸟,飞走了6只,还剩多少只小鸟?课后作业2一我会算。二我会连。三我会比较大小。家长督促写拼音。课后作业3一我会算。二我会填。1个位上是9,十位上是1,这个数是 它的前面是 后...

数学课后作业

例1 学校的篮球比足球数的2倍少3个,篮球数与足球数的比为3 2,求这两种球队各是多少个?解 设篮球x个,足球y个。x 2y 3 2x 3y例2 某商品标价为165元,若降价以九折 即优惠10 仍可获利10 相对于进货价 则该商品的进货价是多少?解 设该商品的成本价是x元,根据题意列方程得 165 ...