find the general solution of the given differential equation
u''+$\displaystyle w^2$u=cos$\displaystyle w$t
I assumed U to be Acoswt+Bsinwt but it didn't work out.
Thanks in advance.
What you found is the solution to $\displaystyle u''+ w^2 u = 0$. You have to add to this a particular solution of $\displaystyle u''+ w^2 u = \cos (wt)$.