I'm working on a pretty simple ODE but am getting really confused about one little bit.(adsbygoogle = window.adsbygoogle || []).push({});

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:

y_{c}= Ae^{i t}+ Be^{-i t}

This expands to:

y_{c}= Acos(t) + i Asin(t) + Bcos(t) - i Bsin(t)

BUT

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

y_{c}= 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!

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Am I expanding e^ix incorrectly?

**Physics Forums | Science Articles, Homework Help, Discussion**