1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Simple second-order ODE

  1. Mar 28, 2008 #1
    1. The problem statement, all variables and given/known data

    Solve the initial value problem:
    y''+2y'+2y=0
    y([tex]\pi[/tex]/4)=2
    y'([tex]\pi[/tex]/4)=-2

    2. Relevant equations

    Included in 1

    3. The attempt at a solution

    I assumed that y=e^rt and came up with the characteristic polynomial r^2+2r+2=0 but when solving it for the two roots, they come back as non-real. Where have I gone wrong? thanks
     
  2. jcsd
  3. Mar 28, 2008 #2

    Hootenanny

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    You've done nothing wrong, the solutions to ODE's may be complex. However, one may transform them into real solutions using Euler's identity.
     
  4. Mar 28, 2008 #3
    I have never done one with complex numbers before. Mind walking me through this one?
     
  5. Mar 28, 2008 #4

    Hootenanny

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    No problem, what are your two solutions?
     
  6. Mar 28, 2008 #5
    Assuming a=1, b=2 c=2 and r1= [tex]\lambda[/tex]+i[tex]\mu[/tex] r2=[tex]\lambda[/tex]-i[tex]\mu[/tex]

    r1=(-1+(-4)^1/2)/2
    = -(1/2)+i(2)^(1/2)
    r2 = -(1/2)-i(2)^(1/2)

    Correct?
     
  7. Mar 28, 2008 #6

    Hootenanny

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I have different solutions. In your solution, you make the error of assuming that,

    [tex]\sqrt{4} = 2\sqrt{2}[/tex]

    Which is not the case. Using the quadratic formula,

    [tex]r = \frac{-2\pm\sqrt{4-4\cdot1\cdot2}}{2} = \frac{-2\pm i\sqrt{4}}{2}[/tex]

    [tex]r = -1\pm i[/tex]

    Do you agree?
     
  8. Mar 28, 2008 #7
    Indeed, that's a mistake I commonly make.

    So with those solutions, the general solution of the IVP would be:

    y=c1(e^-t)cos(1)+c2(e^-t)sin(-1)

    ?
     
  9. Mar 28, 2008 #8

    Hootenanny

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I think that you've made a mistake somewhere (perhaps missing a t here and there...?). Let's start from the top,

    [tex]y(t) = A\exp\left\{t\left(i-1\right)\right\} + B\exp\left\{-t\left(i+1\right)\right\}[/tex]

    Which may be re-written,

    [tex]y(t) = e^{-t}\left[Ae^{it}+Be^{-it}\right][/tex]

    Now, can you write the two complex exponentials in terms of sines and cosine?
     
    Last edited: Mar 28, 2008
  10. Mar 28, 2008 #9
    Ah, I think I see my mistake. If u=1 then:

    y=(Ae^-t)cos(t)+(Be^-t)sin(-t)
     
  11. Mar 28, 2008 #10

    Hootenanny

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Almost there, note that,

    [tex]\sin\left(-\theta\right) = -\sin\theta[/tex]

    Furthermore, one must not use the same constants (if you work through the full solution you will see why). Hence, the general solution will be of the form,

    [tex]y(t) = e^{-t}C\cos t + e^{-t}D\sin t[/tex]
     
  12. Mar 28, 2008 #11
    Just figured out how to use the tex feature to make it easier on your eyes. I'm a little confused about the variables:

    [tex]y(t) = Ae^{-t}C\cos t - Be^{-t}D\sin t[/tex]

    Is that the solution?
     
  13. Mar 28, 2008 #12

    Hootenanny

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I tell you what, since it is clear that you've put the effort in, I'll provide a complete solution in this case. Starting from the second equation in post #8 one may write,

    [tex]y(t) = e^{-t}\left[A\left\{\cos t + i\sin t\right\}+B\left\{\cos\left(-t\right) + i\sin\left(-t\right)\right\}\right][/tex]

    Noting that cosine and sine are even and odd function respectively, one may write,

    [tex]y(t) = e^{-t}\left[A\left\{\cos t + i\sin t\right\}+B\left\{\cos t - i\sin t\right\}\right][/tex]

    Collecting the coefficients of sine and cosine,

    [tex]y(t) = e^{-t}\left[\left(A+B\right)\cos t + \left(A-B\right)i\sin t\right][/tex]

    Let us now define two new constants such that,

    [tex] C:= A+B \hspace{2cm} D:=\left(A-B\right)i \hspace{2cm}C,D\in\mathbb{R}[/tex]

    Hence, the general solution,

    [tex]y(t) = e^{-t}\left[C\cos t + D\sin t\right][/tex]

    Do you follow?
     
    Last edited: Mar 28, 2008
  14. Mar 28, 2008 #13
    Alright, I see now...but it causes another question to arise: When I go back to find the constants, I apply the initial conditions to solve for C&D, correct?
     
  15. Mar 28, 2008 #14

    Hootenanny

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Correct indeed :approve:
     
  16. Mar 28, 2008 #15
    Thank you much for all your help.
     
  17. Mar 28, 2008 #16

    Hootenanny

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    No problem, it was a pleasure :smile:
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Simple second-order ODE
  1. Second order ODE proof (Replies: 42)

  2. Second order ODEs (Replies: 9)

Loading...