# 一阶线性微分方程的常数变易法

$\frac{dy}{dx}+p(x)y=f(x)$

$\frac{dy}{dx}+p(x)y=0$

$y=Ce^{-\int p(x)dx}$

$y=u(x)e^{-\int p(x)dx}$

\begin{align*}y’&=u'(x)e^{-\int p(x)dx}-u(x)p(x)e^{-\int p(x)dx}\\ &=u'(x)e^{-\int p(x)dx}-p(x)y\end{align*}

\begin{align*}\frac{dy}{dx}+p(x)y&=u'(x)e^{-\int p(x)dx}-p(x)y+p(x)y\\ &=u'(x)e^{-\int p(x)dx}=f(x)\end{align*}

$u'(x)=f(x)e^{\int p(x)dx}$

$u(x)=\int f(x)e^{\int p(x)dx}+C$

$y=e^{-\int p(x)dx}\left(\int f(x)e^{\int p(x)dx}+C\right)$

$p(x)=-\frac{2}{x+1}, f(x)=(x+1)^{\frac{5}{2}}$

\begin{align*}y&=e^{-\int p(x)dx}\left(\int f(x)e^{\int p(x)dx}+C\right)\\ &=e^{\int \frac{2}{x+1}dx}\left(\int (x+1)^{\frac{5}{2}}e^{-\int \frac{2}{x+1}dx}+C\right)\\ &=e^{2\ln|x+1|}\left(\int(x+1)^{\frac{5}{2}}e^{-2\ln|x+1|}\right)\\ &=(x+1)^2\left(\int(x+1)^{\frac{1}{2}}dx+C\right)\\ &=(x+1)^2\left(\frac{2}{3}(x+1)^{\frac{3}{2}}+C\right)\end{align*}

$\frac{dx}{dy}=\frac{2x-y^2}{y}=\frac{2}{y}x-y$

$\frac{dx}{dy}-\frac{2}{y}x=-y$

\begin{align*}x&=e^{-\int p(y)dy}\left(\int f(y)e^{\int p(y)dy}+C\right)\\ &=e^{\int \frac{2}{y}dy}\left(\int -ye^{-\int \frac{2}{y}dy}+C\right)\\ &=e^{2\ln|y|}\left(\int-ye^{-2\ln|y|}dy+C\right)\\ &=y^2\left(\int-y\frac{1}{y^2}dy+C\right)\\ &=y^2\left(\int-\frac{1}{y}dy+C\right)\\ &=y^2\left(-\ln|y|+C\right)\end{align*}

$x=y^2(-\ln|y|+C)$