高等数学实验报告答案
温柔似野鬼°
995次浏览
2021年01月30日 00:46
最佳经验
本文由作者推荐
妈妈的唠叨-学生个人总结
MATLAB
与数学实验
实验
1
函数及其图像
实验目的:用
fplot()
、
plot( )
、
ezplot()
命令编程作出函数图像
1
、使用不 同的命令绘出函数
f
(
x
)
e
sin
x
1
e
sin
x
及其反函数的图像。
①
>> clear
>> ezplot('exp(sin(x))+1/(exp(sin(x)))')
exp(sin( x))+1/(exp(sin(x)))
3.2
3
2.8
2.6
2 .4
2.2
2
-6
-4
-2
0
x
2
4
6
②
>> clear
>> lims=[-6,6];
>>fplot('exp(sin(x))+1/(exp(sin(x )))',lims)
3.4
3.2
3
2.8
2.6
2.4
2.2
2
-6
-4
-2
0
2
4
6
③
>> clear
>> x=-6:0.001:6;
>> y=exp(sin(x))+1./(exp(sin(x)));
>> plot(x,y,'r',y,x,'b')
6
4
2
0
-2-4
-6
-6
-4
-2
0
2
4
6
2
、使用
ezplot()
命令绘出下列函数的图像:
(
1
)
f
(
x
,
y
)
(
x
2
y
2
)sin(
1
)
(
2
)
f
(
x
,
y
)
x
2
y
3
6
xy
2
x
3
y
xy
>> clear
>> ezplot('(x^2+y^2)*sin(1/(x*y))')
(x
2
+y
2
) sin(1/(x y)) = 0
6< br>4
2
0
y
-2
-4
-6
-6
-4< br>-2
0
x
2
4
6
>> figure,ezplot('x^2+y^3+6*x*y+2*x+3*y')
x
2
+y
3
+6 x y+2 x+3 y = 0
64
2
0
y
-2
-4
-6
-6
-4-2
0
x
2
4
6
实验
2
极限
实验目的:用
limit()
命令编程求极限
求下列函数的极限
:
1
1
(1)lim(
)< br>x
1
1
x
1
x
3< br>1
(3)lim
x
2
sin
x
0
x
(2)
lim
(
x
1)(
x
2)(
x
3)
x
5
x
3
arctan
x
(4)
lim
x
x
> > clear
>> F1=sym('1/(1-x)-1/(1-x^3)');
>> F2=sym('(x+1)*(x+2)*(x+3)/(5*x^3)');
>> F3=sym('x^2*sin(1/x)');
>> F4=sym('atan(x)/x');
>> limit(F1,1)
ans =
NaN
>> limit(F2,inf)
ans =
1/5
>> limit(F3)
ans =
0
>> limit(F4,inf)
ans =
0
实验
3
导数与微分
实验目的:用
diff()
命令编程求导数
1
、
(1)
y
求下列函数的导数:
sin
x
(2)
y
x
2
ln
x
cos
x
x
2
3
5
x
3
x
4
2ln
x
x
(3)
y
(4)
y
x
2
1
3ln
x
x
2
>> clear
>> syms x y1 y2 y3 y4
>> y1=sin(x)/x;
>> y2=x^2*log(x)*cos(x);
>> y3=(5*x^2-3*x+4)/(x^2-1);
>> y4=(2*log(x)+x^3)/(3*log(x)+x^2);
>> diff(y1)
ans =
cos(x)/x-sin(x)/x^2
>> diff(y2)
ans =
2*x*log(x)*cos(x)+x*cos(x)-x^2*log(x)*sin(x)
>> diff(y3)
ans =
(10*x-3)/(x^2-1)-2*(5*x^2-3*x+4)/(x^2-1)^2*x
>> diff(y4)
ans =
(2/x+3*x^2)/(3*log( x)+x^2)-(2*log(x)+x^3)/(3*log(x)+x^2)^2*(3/x+2*x)
2
、求高阶导数:
(1)
y
e
xcos
x
,
计算
y
(4)
,(2)
y
x
2
sin
2
x
,
计算
y
(1 0)
>> clear
>> syms x y1 y2
>> y1=exp(x)*cos(x);
>> y2=x^2*sin(2*x);
>> diff(y1,4)
ans =
-4*exp(x)*cos(x)
>> diff(y2,10)
ans =
23040*sin(2*x)+10240*x*c os(2*x)-1024*x^2*sin(2*x)
实验
4
导数的应用
实验目的:用
solve()
命令编程解符号方程、方 程组,判断函数的单
调性、凹凸性和求极值
1
求函数
f
(
x
)
x
3
3
x
2
9
x
5
的极值,
绘出函数的图像,
分析函数的单 调区间。
>> clear
>> syms x y
>> y=x^3+3*x^2-9*x+5;
>> dy=diff(y);
>> px=solve(dy)
px =
1
-3
>> ezplot(y)
>> fmax=1^3+3*1^2-9*1+5
fmax =
0
>> fmin=(-3)^3+3*(-3)^2-9*(-3)+5
fmin =
32
x
3
+3 x
2
-9 x+5
250
200
150
100
50
0
-50
-6
-4
-2
0
x
2
4
6
求函数
y
< br>x
4
(12ln
x
7)
图像的拐点和凹凸区间。< br>
>> clear
>> syms x y
>> y=x^4*(12*log(x)-7);
>> dy=diff(y);
>> d2y=diff(y,2);
>> px=solve(d2y)
px =
1
>> ezplot(y)
x 10
4
x
4
(12 l og(x)-7)
2
1.5
1
0.5
0
1
2
3
x
4
5
6
实验
5
不定积分与定积分
实验目的:用
int()
命令编程求不定积分和定积分
1
、计算下列不定积分:
(1)
(4)
dx
4
x
2
9
(2)
dx
2
5cos
x
3
(3)
3
x
1
x
dx
1
x
x
1
cos
x
x
cos
x
e
e
dx
(5)
dx
(6)
dx
x
4
x< br>2
x
sin
x
e
e
e
1
>> clear
>> syms x y1 y2 y3 y4 y5 y6
>> y1=1/sqrt(4*x^2-9);
>> y2=1/(2+5*cos(x));
>> y3=sqrt((1-x)/(1+x));
>> y4=sqrt(1+cos(x))/sin(x);
>> y5=x^3*cos(x)/exp(x);
>> y6=(exp(3*x)+exp(x))/(exp(4*x)-exp(2*x)+1);
>> int(y1)
ans =
1/4*log(x*4^(1/2)+(4*x^2-9)^(1/2))*4^(1/2)
>> int(y2)
ans =
2/21*21^(1/2)*atanh(1/7*tan(1/2*x)*21^(1/2))
>> int(y3)
ans =
(-(x-1)/(1+x))^(1/2)* (1+x)/(-(x-1)*(1+x))^(1/2)*((1-x^2)^(1/2)+asin(
x))
>> int(y4)
ans =
-2^(1/2)/(cos(1/ 2*x)^2)^(1/2)*cos(1/2*x)*atanh(cos(1/2*x))
>> int(y5)
ans =
(-1/2*x^3+3/2*x+3/2)*exp(-x) *cos(x)-(-1/2*x^3-3/2*x^2-3/2*x)*exp(-x)
*sin(x )
>> int(y6)
ans =
atan(2*exp(x)-3^(1/2))+atan(2*exp(x)+3^(1/2))
2
、计算下列定积分
:
x
sin
x
(1)
2
dx
(2)
2
1
sin
2
xdx
(3)
sin
3x
sin
5
xdx
0
1
cos< br>x
0
0
1
4
x
2< br>xdx
(4)
dx
(5)
2
arcsi n
xdx
(6)
4
0
0
0
1
cos
2
x
2
x
1
>> clear
>> syms x y1 y2 y3 y4 y5 y6
>> y1=(x+sin(x))/(1+cos(x));
>> y2=sqrt(1-sin(2*x));
>> y3=sqrt((sin(x))^3-(sin(x))^5);
>> y4=(x+2)/sqrt(2*x+1);
>> y5=asin(x);
>> y6=x/(1+cos(2*x));
>> int(y1,0,pi/2)
ans =
1/2*pi
>> int(y2,0,pi/2)
ans =
-2+2*2^(1/2)
>> int(y3,0,pi)
ans =
1/5*2^(1/2)*8^(1/2)
>> int(y4,0,4)
ans =
22/3
>> int(y5,0,1/2)
ans =
1/12*pi+1/2*3^(1/2)-1
>> int(y6,0,pi/4)
ans =
1/8*pi-1/4*log(2)
实验
6
微分方程
实验目的:用
dsolve()
命令编程解微分方程
1
、求解微分方程
dy
2
y
4
x
(2)
xy
'
y
x
2
3
x
2
dx
(3)(1
x
2
)
y
'
2
xy
(1
x
2
)
2
(1)
>> clear
>> syms x y
>> y1=dsolve('Dy+2*y=4*x')
y1 =
2*x+exp(-2*t)*C1
>> y2=dsolve('x*Dy+y=x^2+3*x+2')
y2 =
x^2+3*x+2+exp(-1/x*t)*C1
>> y3=dsolve('(1+x^2)*Dy-2*x*y=(1+x^2)^2')