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!