文章目录
0.0 题目
0.1 求解下面的微积分问题
(1)试求出下面的单边极限问题,如果根号的有十重,重新求解极限问题
由于题目包括五重和十重两种情况,考虑编写n重的程序进行数值计算来模拟不同情况的极限问题
function f = sqrtf(f,times,varargin)
% sqrtf(f),the default mode means iteration is 1
% sqrtf(f,times),means iteration is 't'
% for example, f(1)=f(1,1)=0,f(1,2k+1)=0,k is a positive integer.k=0,1,2...
if nargin < 1 || nargin > 2
error('Please enter the correct number of parameters.')
end
if nargin == 1
f = 0
else
if nargin == 2
f1 = f
f2 = f
for i = 1: times-1
f1 = f + sqrt(f1)
f2 = f + (-1)^(i-1)*sqrt(f2)
end
f = sqrt(f1) - sqrt(f2)
end
end
函数包括两种输入模式,默认的sqrtf(f)
表示进行求解一重根号的情况,而sqrtf(f,times)
表示求解n重根号的情况。
而此时的输入 t t t为 x x x的倒数, t = 1 x t=\frac {1}{x} t=x1因此在x趋近于0时, t t t为正无穷.。
- 五重根号
syms t
y = sqrtf(t,5)
latex(y)
L = limit(y, t, inf)
实验结果如下:
t
+
t
+
t
+
t
+
t
−
t
−
t
+
t
−
t
+
t
\sqrt{t+\sqrt{t+\sqrt{t+\sqrt{t+\sqrt{t}}}}}-\sqrt{t-\sqrt{t+\sqrt{t-\sqrt{t+\sqrt{t}}}}}
t+t+t+t+t−t−t+t−t+t
L = 1
即五重根号时候的右极限为1
- 十重根号
syms t
y = sqrtf(t,10)
latex(y)
L = limit(y, t, inf)
实验结果如下:
t
+
t
+
t
+
t
+
t
+
t
+
t
+
t
+
t
+
t
−
t
+
t
−
t
+
t
−
t
+
t
−
t
+
t
−
t
+
t
\sqrt{t+\sqrt{t+\sqrt{t+\sqrt{t+\sqrt{t+\sqrt{t+\sqrt{t+\sqrt{t+\sqrt{t+\sqrt{t}}}}}}}}}}-\sqrt{t+\sqrt{t-\sqrt{t+\sqrt{t-\sqrt{t+\sqrt{t-\sqrt{t+\sqrt{t-\sqrt{t+\sqrt{t}}}}}}}}}}
t+t+t+t+t+t+t+t+t+t−t+t−t+t−t+t−t+t−t+t
L = 0
即十重根号时候的右极限为0
可以验证有以下结论,
- 当根号的重数为奇数次时,右极限为1
- 当根号的重数为偶数次时,右极限为0
(2)已知如下的向量场 F ( x , y , z ) F(x,y,z) F(x,y,z)函数,试找出MATLAB的函数,直接求出向量场的势函数 f ( x , y , z ) f(x,y,z) f(x,y,z)
查找后,发现MATLAB的potential函数可以求得原函数
其数学形式为:
∂
F
∂
x
=
y
1
+
x
2
y
2
∂
F
∂
y
=
x
1
+
x
2
y
2
+
z
(
1
−
y
2
z
2
)
∂
F
∂
z
=
y
(
1
−
y
2
z
2
)
+
1
z
\begin{aligned} \frac {\partial F}{\partial x}&=\frac{y}{1+x^2y^2} \\ \frac {\partial F}{\partial y}&=\frac{x}{1+x^2y^2} + \frac{z}{\sqrt{(1-y^2z^2)}} \\ \frac {\partial F}{\partial z}&=\frac{y}{\sqrt{(1-y^2z^2)}} + \frac{1}{z} \\ \end{aligned}
∂x∂F∂y∂F∂z∂F=1+x2y2y=1+x2y2x+(1−y2z2)z=(1−y2z2)y+z1
因此编写代码如下:
syms x y z
dx = y / (1+x^2*y^2)
dy = x / (1+x^2*y^2) + z / sqrt(1-y^2*z^2)
dz = y / (sqrt(1-y^2*z^2)) + 1 / z
P = potential([dx,dy,dz], [x y z])
latex(P)
将latex结果复制来如下:
P
=
a
t
a
n
(
x
y
)
+
ln
(
z
)
+
z
a
s
i
n
h
(
y
−
z
2
)
−
z
2
P=\mathrm{atan}\left(x\,y\right)+\ln\left(z\right)+\frac{z\,\mathrm{asinh}\left(y\,\sqrt{-z^2}\right)}{\sqrt{-z^2}}
P=atan(xy)+ln(z)+−z2zasinh(y−z2)
检验一下:
dx1 = simplify(diff(P,x))
dy1 = simplify(diff(P,y))
dz1 = simplify(diff(P,z))
latex(dx1)
latex(dy1)
latex(dz1)
d x 1 = y x 2 y 2 + 1 d y 1 = x x 2 y 2 + 1 + z 1 − y 2 z 2 d z 1 = y z + 1 − y 2 z 2 z 1 − y 2 z 2 \begin{aligned} dx1&=\frac{y}{x^2\,y^2+1} \\ dy1&=\frac{x}{x^2\,y^2+1}+\frac{z}{\sqrt{1-y^2\,z^2}} \\ dz1&=\frac{y\,z+\sqrt{1-y^2\,z^2}}{z\,\sqrt{1-y^2\,z^2}} \\ \end{aligned} dx1dy1dz1=x2y2+1y=x2y2+1x+1−y2z2z=z1−y2z2yz+1−y2z2