Solve by substitution

49 Views Asked by At

I am trying to solve the following by substitution:

$$ y''(t)+y(t)=\cos(wt) $$

I know that the general solution to the homogeneous part is $y=A\sin(t)+B\cos(t)$ for some constants $A,B$ but I am unsure which substitution to use.

Normally I would approach this using variation of parameters but the question says substitution so I am unsure.

1

There are 1 best solutions below

9
On BEST ANSWER

Hint:

Try to substitute $y(t)=C\sin(\omega t)+D\cos(\omega t)$, and solve for $C$ and $D$.
For $\omega^2 \neq 1$:
$y''(t)=-\omega^2(C\sin(\omega t)+D\cos(\omega t))$, so: $$-\omega^2(C\sin(\omega t)+D\cos(\omega t))+C\sin(\omega t)+D\cos(\omega t)=\cos(\omega t)$$ $$D\cos(\omega t) (-\omega^2+1)+C\sin(\omega t) (-\omega^2+1)=\cos(\omega t)$$ From this, we can see that $C=0$: $$D\cos(\omega t) (-\omega^2+1)=\cos(\omega t)$$ $$D(-\omega^2+1)=1$$ $$D=\frac{1}{-\omega^2+1}$$ So the solution is $y(t)=\frac{1}{-\omega^2+1}\cos(\omega t)$.
For $\omega^2=1$, try to do the same with $y(t)=Ct\sin(\omega t)+Dt\cos(\omega t)$, as John Ma suggested it (It will require a bit more differentiation).