常系数非齐次线性微分方程（二）

$\begin{cases}e^{i\theta}=\cos\theta+i\sin\theta\\ e^{-i\theta}=\cos\theta-i\sin\theta\end{cases}\quad\Rightarrow\quad \begin{cases}\cos\theta=\frac{1}{2}(e^{i\theta}+e^{i\theta})\\ \sin\theta=\frac{1}{2i}(e^{i\theta}-e^{-i\theta})\end{cases}$

\begin{align*}e^{\lambda x}P_m(x)\cos(wx)&=e^{\lambda x}P_m(x)(e^{iwx}+e^{-iwx})\\ &=\frac{1}{2}\left(P_m(x)e^{(\lambda+iw) x}+P_m(x)e^{(\lambda-iw) x}\right)\end{align*}

\begin{align*}e^{\lambda x}P_n(x)\sin(wx)&=e^{\lambda x}P_n(x)(e^{iwx}+e^{-iwx})\\ &=\frac{1}{2i}\left(P_n(x)e^{(\lambda+iw) x}+P_n(x)e^{(\lambda-iw) x}\right)\\ &=\frac{-i}{2}\left(P_n(x)e^{(\lambda+iw) x}-P_n(x)e^{(\lambda-iw) x}\right)\end{align*}

$y^{\prime\prime}+py’+qy=f_1(x), y^{\prime\prime}+py’+qy=f_2(x)$

• 若 $$\lambda+iw$$ 不是特征方程的根，则 $u(x)=a_kx^m+a_{k-1}x^{k-1}+\cdots+a_1x+a_0$
• 若 $$\lambda+iw$$ 是特征方程的根，则 $u(x)=a_kx^m+a_{k-1}x^{k-1}+\cdots+a_1x+a_0$

3，结论：原方程的特解为

\begin{align*}y_p&=u(x)e^{(\lambda+iw)x}+\overline{u(x)}e^{(\lambda-iw)x}\\ &=e^{\lambda x}x^t(P(x)\cos(wx)+Q(x)\sin(wx))\end{align*}

$y_p=(Ax+B)\cos 2x+(Cx+D)\sin 2x$

\begin{align*}y’_p&=A\cos 2x-2(Ax+B)\sin2x+C\sin 2x+2(Cx+D)\cos2x\\ &=(A+2Cx+2D)\cos2x+(C-2Ax-2B)\sin2x\end{align*}

\begin{align*}y^{\prime\prime}&=2C\cos2x-2A\sin2x-2(A+2Cx+2D)\sin2x+2(C-2Ax-2B)\cos2x\\ &=\cos2x(2C+2C-4Ax-4B)+\sin2x(-2A-2A-4Cx-4D))\\ &=\cos2x(4C-4Ax-4B)+\sin2x(-4A-4Cx-4D)\end{align*}

\begin{align*}y^{\prime\prime}+y&=\cos2x(4C-4Ax-4B)+\sin2x(-4A-4Cx-4D)\\ &\quad+(Ax+B)\cos 2x+(Cx+D)\sin 2x\\ &=\cos2x(4C-3Ax-3B)+\sin2x(-4A-3Cx-3D)\\ &=x\cos2x\end{align*}

$\begin{cases}4C-3Ax-3B=x\\ -4A-3Cx-3D=0\end{cases}$

$A=-\frac{1}{3}, B=0,C=0,D=\frac{4}{9}$

$y_p=-\frac{1}{3}x\cos2x+\frac{4}{9}\sin2x$

$y_p=Ax\cos x+Bx\sin x$

\begin{align*}y_p’&=A\cos x-Ax\sin x+B\sin x+Bx\cos x\\ &=\cos x(A+Bx)+\sin x(-Ax+B)\end{align*}

\begin{align*}y_p^{\prime\prime}&=B\cos x-\sin x(A+Bx)-A\sin x+\cos x(-Ax+B)\\ &=\cos x(B-Ax+B)+\sin x(-A-A-Bx)\\ &=\cos x(-Ax+2B)+\sin x(-2A-Bx)\end{align*}

\begin{align*}y^{\prime\prime}+y&=\cos x(-Ax+2B)+\sin x(-2A-Bx)+Ax\cos x+Bx\sin x\\ &=2B\cos x-2A\sin x=\cos x\end{align*}

$y=y_h+y_p=C_1\cos x+C_2\sin x+\frac{1}{2}x\sin x$