Stacie Worsley

2022-01-02

Non-Homogeneous Linear Differential Equation (The Method of Undetermined Coefficients).
Solve the equation $\left(D+1\right)y=\mathrm{sin}x$

Alex Sheppard

Expert

$\left({D}^{2}+1\right)y=\mathrm{sin}x$
${m}^{2}+1=0$
${m}^{2}=-1$
$m=±i$
$C.f={C}_{1}\mathrm{cos}x+{C}_{2}\mathrm{sin}x$
${y}_{t}=x\left(a\mathrm{cos}x+b\mathrm{sin}x\right)$ (1)
${y}_{t}{y}_{t}=\mathrm{sin}x$ (2)
equation (1) D.w.r. to x
${y}_{t}^{\prime }=x\left(-a\mathrm{sin}x+b\mathrm{cos}x\right)+\left(a\mathrm{cos}x+b\mathrm{sin}x\right)$
again D.w.r. to x
${y}_{t}x\left(-a\mathrm{cos}x-b\mathrm{sin}x\right)+\left(-a\mathrm{sin}x+v\mathrm{cos}x\right)±a\mathrm{sin}x+b\mathrm{cos}x$
$=x\left(-a\mathrm{cos}x-b\mathrm{sin}x\right)-2a\mathrm{sin}x+2b\mathrm{cos}x$ (3)
eq (1) and eq (3) put in eq (2)
$x\left(-a\mathrm{cos}x-b\mathrm{sin}x\right)-2a\mathrm{sin}x+2b\mathrm{cos}x+x\left(\mathrm{cos}x+b\mathrm{sin}x\right)=\mathrm{sin}x$
equat the coefficient
$-2a\mathrm{sin}x+2b\mathrm{cos}x=\mathrm{sin}x$
$-2a=1$
$a=-\frac{1}{2}$
$2b=0$
$b=0$
P.I is ${y}_{t}=\frac{1}{2}x\mathrm{cos}x$
$y={c}_{1}\mathrm{cos}x+{c}_{2}\mathrm{sin}x-\frac{1}{2}x\mathrm{sin}x$

Alex Sheppard

Expert

Here A.E. is
${m}^{2}+1=0$ and its roots are $m=±i$
Hence $C.F.={C}_{1}\mathrm{cos}x+{C}_{2}\mathrm{sin}x$
Note that sin x is common in the C.F. and the R.H.S. of the given equation. ($±$ i is the root of the A.E.)
Therefore P.I. is y the form $yp=x\left(a\mathrm{cos}x+b\mathrm{sin}x\right)$ ...(1)
Since $±$ i is root of the A.E.
We have to find a and b such that ${y}_{p}+{y}_{p}=\mathrm{sin}x$ ...(2)
From Eqn. (1) ${y}_{p}^{\prime }=x\left(-a\mathrm{sin}x+b\mathrm{cos}x\right)+\left(a\mathrm{cos}x+b\mathrm{sin}x\right)$
${y}_{p}=x\left(-a\mathrm{cos}x-b\mathrm{sin}x\right)+\left(-a\mathrm{sin}x+b\mathrm{cos}x\right)-a\mathrm{sin}x+b\mathrm{cos}x$
$=x\left(-a\mathrm{cos}x-b\mathrm{sin}x\right)-2a\mathrm{sin}x+2b\mathrm{cos}x$
Then the given equation reduces to using the Eqn. (1) $x\left(-a\mathrm{cos}x-b\mathrm{sin}x\right)-2a\mathrm{sin}x+2b\mathrm{cos}x+x\left(a\mathrm{cos}x+b\mathrm{sin}x\right)=\mathrm{sin}x$
Equating the coefficients, we get
$i.e.,-2a\mathrm{sin}x+2b\mathrm{cos}x=\mathrm{sin}x$
$-2a=1,2b=0$
$a=\frac{-1}{2},b=0$
Thus P.I. is ${y}_{p}=\frac{-1}{2}x\mathrm{cos}x$
$y=C.F.+P.I.$
$={C}_{1}\mathrm{cos}x+{C}_{2}\mathrm{sin}x-\frac{1}{2}x\mathrm{sin}x$.

karton

Expert