题目
Problem
Obtain the general solution of the equation
x2dxdy+(xcotx+2)xy=4sinx,0<x<π
Give your answer in the form y=f(x)
(8)
解答
解法一
思路
展开
先把方程除以 x2,写成一阶线性方程:
y′+P(x)y=Q(x).
这里 0<x<π,所以 x>0 且 sinx>0,后面使用 lnx 和 ln(sinx) 都是自然的。
答题过程
展开
The differential equation is
x2dxdy+(xcotx+2)xy=4sinx.
Divide by x2:
dxdy+xxcotx+2y=dxdy+(cotx+x2)y=x24sinxx24sinx.
The integrating factor is
e∫(cotx+x2)dx==eln(sinx)+2lnxx2sinx.
Multiplying through by x2sinx gives
dxd(yx2sinx)==x2sinx⋅x24sinx4sin2x.
Integrate both sides:
yx2sinx===∫4sin2xdx∫2(1−cos2x)dx2x−sin2x+C.
Therefore
y=x2sinx2x−sin2x+C.
解法二
思路
展开
观察原微分方程的左边(LHS)形式:x2dxdy+(xcotx+2)xy。如果将括号展开,可得 x2y′+x2(cotx)y+2xy。
注意到 x2y′+2xy 正好是 x2y 的导数,因此可以引入新变量 z=x2y,将方程改写为关于 z 的一阶线性微分方程,其形式比直接处理 y 要精简得多。
答题过程
展开
Expand and group the left-hand side of the differential equation:
x2dxdy+(x2cotx+2x)y=(x2dxdy+2xy)+x2(cotx)y=4sinx4sinx
Let z=x2y. By the Product Rule:
dxdz=x2dxdy+2xy
Substitute z=x2y and dxdz into the equation:
dxdz+(cotx)z=4sinx
This is a first-order linear differential equation in z. The integrating factor is:
I.F.===e∫cotxdxeln(sinx)sinx
(which is strictly positive on the interval 0<x<π).
Multiply the differential equation through by sinx:
sinxdxdz+(cosx)z=dxd(zsinx)=4sin2x4sin2x
Integrate both sides with respect to x:
zsinx===∫4sin2xdx∫2(1−cos2x)dx2x−sin2x+C
Substitute z=x2y back into the equation:
x2ysinx=2x−sin2x+C
Therefore, the general solution is:
y=x2sinx2x−sin2x+C