DSolve sometimes returns solutions containing explicit complex numbers, even though the ODE does not. For instance (drawn from question 126072),
DSolve[a w''''[x] == -b + c (d - w[x] + e x), w[x], x, Assumptions -> a > 0 && c > 0]
// Flatten
(* {w[x] -> (-b + c d + c e x)/c + E^((-1)^(3/4) (c/a)^(1/4) x) C[1] +
E^(-(-1)^(1/4) (c/a)^(1/4) x) C[2] + E^(-(-1)^(3/4) (c/a)^(1/4) x) C[3] +
E^((-1)^(1/4) (c/a)^(1/4) x) C[4]} *)
I would prefer instead that the answer returned be the equivalent
(* {w[x] -> -(b/c) + d + e x + E^(-(((c/a)^(1/4) x)/Sqrt[2])) (C[1] + C[3]
E^(Sqrt[2] (c/a)^(1/4) x)) Cos[((c/a)^(1/4) x)/Sqrt[2]] +
E^(-(((c/a)^(1/4) x)/Sqrt[2])) (C[2] - C[4] E^(Sqrt[2] (c/a)^(1/4) x))
Sin[((c/a)^(1/4) x)/Sqrt[2]]} *)
which is free of explicit complex numbers. (Note that the C[_] in the two expressions are not the same.)
My question is, how can DSolve be caused to return expressions free of explicit complex numbers when the original ODE is free of complex numbers? To be sure, such solutions can be transformed to eliminate complex numbers after being returned by DSolve, but that is not what I am asking.
Integratethough), for example http://mathematica.stackexchange.com/q/10253/1871 http://mathematica.stackexchange.com/q/25117/1871 http://mathematica.stackexchange.com/q/72651/1871 . As one can see, none of the questions above is really solved, transforming the result is already challenging. – xzczd Sep 15 '16 at 07:07DSolveinternally to give real answers. I plan to give this more thought when I have the time. (A solution internal toDSolvewould be best, because boundary conditions could be applied at the same time.) – bbgodfrey Sep 15 '16 at 13:21