2022-03-22

Solve this nonhomegenous ode
$y{}^{″}+4y=\mathrm{cos}\left(2x\right)$

Aarlenlsi1

Step 1
Then by variation of parameters we have the particular solution is given by
${y}_{p}=\mathrm{cos}\left(2x\right){u}_{1}+\mathrm{sin}\left(2x\right){u}_{2}$
where
${u}_{1}=-\frac{1}{2}\int \mathrm{cos}\left(2x\right)\mathrm{sin}\left(2x\right)\left\{rmd\right\}x=\frac{1}{16}\mathrm{cos}\left(4x\right)$
and
${u}_{2}=\frac{1}{2}\int \mathrm{cos}\left(2x\right)\mathrm{cos}\left(2x\right)\left\{rmd\right\}x=\frac{x}{4}+\frac{\mathrm{sin}\left(4x\right)}{16}.$
Simplify, we have the general solution
$y={c}_{1}\mathrm{cos}\left(2x\right)+{c}_{2}\mathrm{sin}\left(2x\right)+\frac{1}{4}x\mathrm{sin}\left(2x\right).$

clarkchica44klt

Step 1
Null space solution
${m}^{2}+4=0$
$⇒m=±2i$
Hence, ${y}_{N}={C}_{1}\mathrm{sin}2x+{C}_{2}\mathrm{cos}2x$
Since, $\mathrm{cos}2x$ already in null space solution, take particular integral as
${y}_{p}=x\left(A\mathrm{sin}2x+B\mathrm{cos}2x\right)$
Then,
${y}_{p}^{\prime }\left\{=A\mathrm{sin}2x+B\mathrm{cos}2x+2x\left(A\mathrm{cos}2x-B\mathrm{sin}2x\right)\right\}$
Then,
${y}_{p}^{\prime }\left\{=A\mathrm{sin}2x+B\mathrm{cos}2x+2x\left(A\mathrm{cos}2x-B\mathrm{sin}2x\right)\right\}$
$y{{}^{″}}_{p}=4A\mathrm{cos}2x-4B\mathrm{sin}2x-4x\left(A\mathrm{sin}2x+B\mathrm{cos}2x\right)$
$y{{}^{″}}_{p}=4A\mathrm{cos}2x-4B\mathrm{sin}2x-4x\left(A\mathrm{sin}2x+B\mathrm{cos}2x\right)$
$y{{}^{″}}_{p}+4{y}_{p}^{\prime }=\mathrm{cos}2x$
$4A\mathrm{cos}2x-4B\mathrm{sin}2x-4x\left(A\mathrm{sin}2x+B\mathrm{cos}2x\right)+4x\left(A\mathrm{sin}2x+B\mathrm{cos}2x\right)=\mathrm{cos}2x$
$4A\mathrm{cos}2x-4B\mathrm{sin}2x=\mathrm{cos}2x$

Hence, ${y}_{p}=\frac{1}{4}x\mathrm{sin}2x$
So,
${y}_{\text{complete}}={y}_{N}+{y}_{p}$
${y}_{\text{complete}}={C}_{1}\mathrm{sin}2x+{C}_{2}\mathrm{cos}2x+\frac{1}{4}\left\{x\mathrm{sin}2x\right\}$

Do you have a similar question?