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

Unable to solve this differential equation

  1. Feb 24, 2012 #1
    1. The problem statement, all variables and given/known data
    y'' - 4y' + 2y = 4 + sin⁡(2x) - cos⁡(2x)

    2. Relevant equations

    3. The attempt at a solution

    I have solved both the homogenous solutions:

    And I think they should be right.
    I ran into problems trying to figure the particular solutions out though.

    After calculating the wronskians I ended up with the first particular solution looking like this:

    I'm not sure what to do with this integral, I don't think that integration by parts would help. (The 4 in (4+sin(2x)-cos(2x)) is giving me a hard time getting anywhere)

    Does anyone see what I could be doing wrong?

    If it's not understandable what I've done I could post my full solution, but I'm finding it a bit hard to format everything properly on here. (I have my full solution in a word document that I could attach if anyone is interested)

    (I hope my termology is somewhat understandable, I don't normally deal with math in english. If any of my words seem out of place and you can't understand what I mean, please let me know and I'll try to explain!
  2. jcsd
  3. Feb 24, 2012 #2


    User Avatar
    Homework Helper

    Mattiasmath, it is not sure that you did something wrong, but this variational method is rather complicated, I make errors again and again myself. The trial function method of undetermined coefficients is much easier: Try the particular solution in the form Yp=A+Bsin(2x)+Ccos(2x).

  4. Feb 24, 2012 #3
    I'm on my first calculus course and this method is the only one I've been introduced to. (According to the prof, the method our book mentions is obsolete compared to this one) I'll have a look at the method the book describes anyway, since I suspect that's the one you're suggesting that I use. Hopefully I'll be able to solve it with that.
  5. Feb 24, 2012 #4

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    First, you can simplify [tex]\frac{Be^{(2-\sqrt{2})x}}{-2\sqrt{2}ABe^{4x}}[/tex] to the form [itex] C e^{cx},[/itex] for some constants C and c. Now you have [itex] \int C e^{cx}[4 + \sin(2x) -\cos(2x)] \,dx. [/itex] What is stopping you from writing this as [itex] 4C \int e^{cx}\, dx + C \int e^{cx} \sin(2x)\,dx - C \int e^{cx} \cos(2x)\, dx [/itex]?

  6. Feb 25, 2012 #5
    Thanks for your input!
    What I did was simplifying
    [itex]\int \frac{Be^{(2-\sqrt{2})x}(4+sin(2x)-cos(2x))}{-2\sqrt{2}ABe^{4x}}[/itex]dx
    [itex]C(4\int e^{ax}dx + \int e^{ax}sin(2x)dx - \int e^{ax}cos(2x)dx )[/itex]
    Where [itex]a = -2-\sqrt{2}[/itex]

    I then started integrating the 3 integrals. First one was no problem, and I thought the second one was rather easy too. However when I checked my answer on wolfram, it seems like I'm way off. This is what I did:

    Does anyone see what I've done wrong?
    Last edited: Feb 25, 2012
  7. Feb 25, 2012 #6

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    [tex] \int(e^{ax}\sin(2x)\,dx = \frac{1}{a} e^{ax} \sin(2x) - \frac{2}{a} \int e^{ax} \cos(2x)\,dx. [/tex] so you started off making a basic error and it went on from there. Anyway, you don't need to check using Wolfram; all you need to do is differentiate your answer to see if it reproduces the integrand. You should always perform such a check whenever possible.

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook