# 一阶线性微分方程的积分因子法

$y’+p(x)y=f(x)$

$u(x)y’+u(x)p(x)y=u(x)f(x)$

$(u(x)y)’=u(x)f(x)$

$u(x)y’+u'(x)y=u(x)f(x)$

$\frac{u'(x)}{u(x)}=p(x),\quad \ln|u(x)|=\int p(x)dx+C,\quad u(x)=Ce^{\int p(x)dx}$

$e^{\int p(x)dx}y’+e^{\int p(x)dx}p(x)y=e^{\int p(x)dx}f(x)$

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

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

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

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

$y=\frac{1}{x}\left(\frac{1}{5}x^5+C\right)$

$p(x)=\tan x, f(x)=\sin 2x=2\sin x\cos x$

$u(x)=e^{\int p(x)dx}=e^{\int \tan xdx}=e^{-\ln|\cos x|}=\frac{1}{|\cos x|}=|\sec x|$

$\sec x y’+y\tan x\sec x=2\sin x\cos x\sec x=2\sin x$

$(\sec xy)’=2\sin x$

$\sec xy=-2\cos x +C$

$y=-2\cos^2x+C\cos x$