Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Probably a really easy problem

  1. Apr 11, 2005 #1
    Could anyone help me with this? I need to solve this equation:

    [itex]\frac{d^2y}{dx^2} + 4y = \sin{2x}[/itex]

    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 [itex]y = c \sin{2x}[/itex]

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

    Substituting these into the LHS of my question gives:

    [itex] -4c \sin{2x} + 4c \sin{2x} = 0[/itex]

    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).
     
  2. jcsd
  3. Apr 11, 2005 #2
    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. =)
     
  4. Apr 11, 2005 #3
    *Ammendments:Trial solution=CxSin2x+DxCos2x
     
    Last edited: Apr 11, 2005
  5. Apr 11, 2005 #4
    Hi,

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

    [itex]y = Cx\sin{2x} + Dx\cos{2x}[/itex]

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

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

    Subbing back into question:

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

    :(
     
  6. Apr 11, 2005 #5

    dextercioby

    User Avatar
    Science Advisor
    Homework Helper

    Try Lagrange's method (of constant variation)

    Assume the inhomogenous solution

    [tex] y_{p}=C(x)\sin 2x+D(x)\cos 2x [/tex]

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

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

    Cheers for the help guys! :)
     
    Last edited: Apr 11, 2005
  8. Apr 11, 2005 #7
    If you multiplicate it by x I'll believe you...
     
  9. Apr 11, 2005 #8

    dextercioby

    User Avatar
    Science Advisor
    Homework Helper

    Anyways,there's an alternative to 'trial solutions'.Lagrange's method is suitable for these problems.

    Daniel.
     
  10. Apr 11, 2005 #9
    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 =)
     
  11. Apr 11, 2005 #10
    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 :)
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Probably a really easy problem
  1. Easy ODE (Replies: 3)

  2. Very easy question (Replies: 6)

Loading...