# Forcing solutions to avoid Root[]

I'm solving a system of ordinary non-homogeneous differential equations (4 equations). The solutions will include some algebraic equations solutions as known from text books due to the use of an eigen value problem. I'm fully aware that equations that are of degree 5 and more do not have an analytical general solution, however, degrees less than that have a general analytical solution.

Thus:

When I solve my differential equations with DSolve[], I get the solution including many instances of

Root[a + b #1 + c #1^2 + d #1^3 + #1^4 &, 1]


where a,b,c,d are constant numbers. Now this is annoying for me as simplifying this expression algebraicly is not possible, leading to a huge solution.

I'm surprised why Mathematica is doing this. Why doesn't mathematica write the solutions formally? Notice that the general solution of the same equation is available when using:

Solve[a + b x + c x^2 + d x^3 + x^4 == 0, x]


I was able to get rid of all the RootSum[]s using the Normal[] function.

My question is: How can I get rid of all these Root[]?

EDIT:

Normal /@ DSolve[
{
S {Mex'[t],
Mey'[t]} == {ωe Mey[t] + λ ωe Mny[
t], -ωe Mex[t] - λ ωe Mnx[
t]} - {ΓRe Mex[t], ΓRe Mey[t]},
{Mnx'[t],
Mny'[t]} == {λ ωn Mey[t] + ωn Mny[
t], -λ ωn Mex[t] - ωn Mnx[
t]} - {ΓRnt Mnx[t], ΓRnt Mny[t]}
, Mex[0] == 0, Mey[0] == Me0, Mnx[0] == 0, Mny[0] == Mn0},
{Mex[t], Mey[t], Mnx[t], Mny[t]}, t]

• Share the differential equations you try to solve. Commented Apr 5, 2015 at 18:05
• @m0nhawk Is it OK to just copy the command from Mathematica? It's big and writing it formally is not simple. Commented Apr 5, 2015 at 18:09
• Yes, just copy, I'll refine the formatting if needed. Commented Apr 5, 2015 at 18:09
• @m0nhawk done. It's in the question. Commented Apr 5, 2015 at 18:12
• And Rnt in the RHS in the second equation is $R\times n\times t$ and $t$ is a variable? Then the space should be before, otherwise Mathematica didn't respect it as a variable. Commented Apr 5, 2015 at 18:22

I have toyed with code (notice that I use only first solution for Replace).

eqs = {S Mex'[
t] == ω e Mey[t] + λ ω e Mny[
t] - Γ R e Mex[t],
S Mey'[t] == -ω e Mex[t] - λ ω e Mnx[
t] - Γ R e Mey[t],
Mnx'[t] == λ ω n Mey[t] + ω n Mny[
t] - Γ Rnt Mnx[t],
Mny'[t] == -λ ω n Mex[t] - ω n Mnx[
t] - Γ Rnt Mny[t], Mex[0] == 0, Mey[0] == Me0,
Mnx[0] == 0, Mny[0] == Mn0};

f[x_] := Normal[DSolveValue[eqs, {Mex, Mey, Mnx, Mny}, t]][[1]][x];

Replace[f[x], {Root[x_, y_] :> ToRadicals[Root[x, y]]}, Infinity]


This code gets rid of Root objects, but the output quiet long and FullSimplify takes too long to finish (more than 30 minutes, and I stopped waiting).

If there is exist some simple solution, than maybe some other techniques can be applied to found it.

• Thank you very much. That answers my question. But what do you mean with "notice that I use only the first solution for replace"? The y parameter is supposed to be the number of the solution, right? Commented Apr 6, 2015 at 16:28
• Notice the [[1]] in the end of f[x_] definition. Just to show the proof-of-concept. Commented Apr 6, 2015 at 16:30
• Oh, that. That's fine. Actually I didn't copy your whole code. I just copied the last line. It's all I need :-) Thanks again. Commented Apr 6, 2015 at 16:57