Instructing DSolve not to return answers with explicit complex numbers

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 +
E^(-(-1)^(1/4) (c/a)^(1/4) x) C + E^(-(-1)^(3/4) (c/a)^(1/4) x) C +
E^((-1)^(1/4) (c/a)^(1/4) x) C} *)

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)) (C + C
E^(Sqrt (c/a)^(1/4) x)) Cos[((c/a)^(1/4) x)/Sqrt] +
E^(-(((c/a)^(1/4) x)/Sqrt)) (C - C E^(Sqrt (c/a)^(1/4) x))
Sin[((c/a)^(1/4) x)/Sqrt]} *)

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.

• Very hard question. Actually there're many similar questions in this site (mostly about Integrate though), for example mathematica.stackexchange.com/q/10253/1871 mathematica.stackexchange.com/q/25117/1871 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 7:07
• @xzczd Thanks especially for the first link, which I had missed in my search. I know how to transform from the first to the second form of the answer in my question, but doing so is not general but instead takes advantage of the details of the first answer. I had hoped that someone had found a way to redefine one of the many functions called by DSolve internally to give real answers. I plan to give this more thought when I have the time. (A solution internal to DSolve would be best, because boundary conditions could be applied at the same time.) – bbgodfrey Sep 15 '16 at 13:21