Solve y''+s^{2}y=b \cos sx where s and b are constants. I have tried undetermined coefficients

Pamela Meyer

Pamela Meyer

Answered question

2022-01-17

Solve y+s2y=bcossx where s and b are constants. I have tried undetermined coefficients, but it makes such a mess that I keep getting lost, I also tried variation of parameters. Really my issue is staying organized enough to get the solution, my solutions are always just a little off from the book.
I have solved the complementary homogenous equation, this gave me a solution with cossx in it... So that's off limits in the particular solution. I looked for a solution in xsinsx and xcossx, but as I said, it was a mess.

Answer & Explanation

sukljama2

sukljama2

Beginner2022-01-18Added 32 answers

You need to differentiate eg y=Axcossx twice using the chain rule.
So y=AcossxAsxsinsx
And y=2AssinsxAs2xcossx
Then y+s2y=2Assinsx
But you need cossx and I'm sure you can see how to do that now.
Because the equation is linear, if the expressions get messy you can deal with the sin and cos terms from y=Axsinsx+Bxcossx separately and get the right linear combination at the end. Sometimes it can be easier to convert everything to exponential functions.
Matthew Rodriguez

Matthew Rodriguez

Beginner2022-01-19Added 32 answers

You might find the Second Order Linear Equations sections of my differential equations notes helpful. In this case you start with the complex version of your equation,
P(D)y=beisx where
P(D)=D2+s2=(D+is)(Dis), D being the derivative operator. Here is is one of the two roots of P: we write y=eisxu, and by the Exponential Shift Theorem P(D)eisxu=eisxP(D+is)u=eisx(D+2is)Du. With v=Du we now want (D+2is)v=b. That has a constant solution v=b2is=ib2s. Integrating, u=ibx2s (we can disregard the arbitrary constant, which leads to a solution of the homogeneous equation). So y=ibx2seisx is a solution of y+s2y=beisx. Writing eisx=cos(sx)+isin(sx) and taking the real part, y=bx2ssin(sx) is a solution of your differential equation.
alenahelenash

alenahelenash

Expert2022-01-24Added 556 answers

Here is an ad-hoc method to solve this (which was derived from my answer here: What is the quickest way to solve this 2nd Order Linear ODE?) First notice that
(ycossx+sysinsx)=ycossxsysinx+sysinsx+s2ycossx=cossx(y+s2y)
Thus (ycossx+sysinsx)=bcos2sx+A
Now (ycossx+sysinsx)=(ycossx)cos2sx
Thus ycossx=sec2sx(bcos2sx+A)+B
For a more general method, you can also try Laplace Transform (it might be easier to bring in complex numbers first, as in D Lim's answer). The method in D Lim's answer is what I would recommend reading first, though.

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Differential Equations

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?