How Can I Solve This Second-Order Differential Equation?

  • Thread starter Thread starter Exulus
  • Start date Start date
Exulus
Messages
50
Reaction score
0
Could anyone help me with this? I need to solve this equation:

\frac{d^2y}{dx^2} + 4y = \sin{2x}

Everything I seem to try for y ends up canceling itself out, as the second diffferential is always the negative of what you begin with, and the 2x part of the sin means you get a factor of 4 in the second differential, which then cancels with the 4y. Eg:

Trying y = c \sin{2x}

\frac{dy}{dx} = 2c \cos{2x}
\frac{d^2y}{dx^2} = -4c \sin{2x}

Substituting these into the LHS of my question gives:

-4c \sin{2x} + 4c \sin{2x} = 0

The only thing i can think of now is that its a complex solution..but we haven't been taught that yet!

Any help appreciated :(

(ps no idea why the itex stuff is coming out so small..sorry about that).
 
Physics news on Phys.org
You'll have to find the homogeneous solution first before applying the method of undetermined coefficients. Let (D^2+4)y=r^2+4=0. hence r=2i,-2i
Thus y(homogenous)=Acos2x+Bsin2x
Therefore, let the trial function be y=AxSin2x+BxCos2x
You should get the answer from here. =)
 
*Ammendments:Trial solution=CxSin2x+DxCos2x
 
Last edited:
Hi,

I tried your trial solution but it still comes out as 0 :(

y = Cx\sin{2x} + Dx\cos{2x}

\frac{dy}{dx} = 2Cx\cos{2x} + C\sin{2x} - 2Dx\sin{2x} + D\cos{2x}

\frac{d^2y}{dx^2} = -4Cx\sin{2x} + 2C\cos{2x} - 2C\cos{2x} - 4Dx\cos{2x} - 2D\sin{2x} - 2D\sin{2x} =
= -4x(C\sin{2x} + D\cos{2x}) - 4D\sin{2x}

Subbing back into question:

-4x(C\sin{2x} + D\cos{2x}) + 4Cx\sin{2x} + 4Dx\cos{2x} = 0

:(
 
Try Lagrange's method (of constant variation)

Assume the inhomogenous solution

y_{p}=C(x)\sin 2x+D(x)\cos 2x

And solve for the unknown functions,by plugging it in the original ODE.

Daniel.
 
doh, it looks like i did my sums wrong i think. I've now got y = -\frac{1}{4}\cos{2x} which looks like the right answer (haven't tested yet).

Cheers for the help guys! :)
 
Last edited:
If you multiplicate it by x I'll believe you...
 
Anyways,there's an alternative to 'trial solutions'.Lagrange's method is suitable for these problems.

Daniel.
 
After subbing the values of d^2y/dx^2,dy/dx and y into the differential equation, the RHS of the equation should be sin2x, then you'll have to do comparing of the coefficients to determine the value of the constants =)
 
  • #10
Palindrom said:
If you multiplicate it by x I'll believe you...
Sorry yeah i typed it wrong, whoops. I did actually have it with the x written down..honest ;)

Thanks for the other method as well, dextercioby :)
 
Back
Top