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

Am I expanding e^ix incorrectly?

  1. Feb 5, 2016 #1
    I'm working on a pretty simple ODE but am getting really confused about one little bit.

    It's of this form:

    y'' + y = t

    So, in solving the complementary solution I use the characteristic method to find:

    λ2 + 1 = 0

    Hence λ = ± i
    Therefore:
    yc = Aei t + Be-i t

    This expands to:
    yc = Acos(t) + i Asin(t) + Bcos(t) - i Bsin(t)

    BUT

    If I run the same thing through DSolve in Mathematica, I get:

    yc = Asin(t) + Bcos(t)

    There's a clear similarity between that and my own answer, but also a very clear difference!

    Where have I gone wrong? Where are the imaginary terms in the Mathematica solution? Plus, even if I ignore or cancel the imaginary terms in my solution I end up with (A+B)cost(t) which is still wrong, it seems.

    What's gone wrong?

    Thanks!
     
    Last edited: Feb 5, 2016
  2. jcsd
  3. Feb 5, 2016 #2
    y = Ae^(it) + Be^(-it)
    is equivalent to
    y = Asin(t) + Bcos(t)

    It's just that the A's and B's are not the same.
     
  4. Feb 5, 2016 #3
    Oh man, that's so obvious I should probably go and hide in a cave somewhere and think about my idiocy, ha.

    So I'm right in assuming the imaginary term has simply been tucked away into A or B?

    I'm getting it like this:

    yc = (iA-iB)sin(t) + (A+B)cos(t)

    = Csin(t) + Dcos(t)

    I didn't know it was permissible to tuck the imaginary parts away like that though?
     
  5. Feb 5, 2016 #4
    You can tuck away imaginary parts. A and B are "complex numbers" now.
     
  6. Feb 5, 2016 #5
    Great stuff, cheers.

    I guess the thing that threw me is that the Mathematica solution didn't tell me " A, B ∈ ℂ "

    I thought the imaginary parts were eliminated somehow.
     
  7. Feb 5, 2016 #6
    They often are elimated by initial conditions, if you're doing a physics problem. But yes, you have to explicitly eliminate them. They are still there in the general case.
     
  8. Feb 5, 2016 #7
    It actually is part of a physics problem, so I figured there'd be a point where I ignore the imaginary part because it's a 'real-world' fluid dynamics problem of a particle in a flow. The main thing confusing me however was just that 'imaginary' part of the differential equation. All good now! Thanks :oldsmile:
     
  9. Feb 5, 2016 #8
    Be careful though, imaginaries do exist in the real world. (Usually in electricity problems.) :oldsmile:
     
  10. Feb 5, 2016 #9

    Mark44

    Staff: Mentor

    Then you should use different pairs of letters...
     
  11. Feb 5, 2016 #10
    Oh I know, heh, but it usually describes those sort of 'extra' numerical factors rather than something Real such as position, which is what I'm doing working on with this fluid dynamics stuff. My bad, I was too vague with what I said.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Am I expanding e^ix incorrectly?
Loading...