0
$\begingroup$

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:

Requested equations in comments:

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]
$\endgroup$
  • $\begingroup$ Share the differential equations you try to solve. $\endgroup$ – m0nhawk Apr 5 '15 at 18:05
  • $\begingroup$ @m0nhawk Is it OK to just copy the command from Mathematica? It's big and writing it formally is not simple. $\endgroup$ – The Quantum Physicist Apr 5 '15 at 18:09
  • $\begingroup$ Yes, just copy, I'll refine the formatting if needed. $\endgroup$ – m0nhawk Apr 5 '15 at 18:09
  • $\begingroup$ @m0nhawk done. It's in the question. $\endgroup$ – The Quantum Physicist Apr 5 '15 at 18:12
  • $\begingroup$ 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. $\endgroup$ – m0nhawk Apr 5 '15 at 18:22
2
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ 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? $\endgroup$ – The Quantum Physicist Apr 6 '15 at 16:28
  • $\begingroup$ Notice the [[1]] in the end of f[x_] definition. Just to show the proof-of-concept. $\endgroup$ – m0nhawk Apr 6 '15 at 16:30
  • $\begingroup$ 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. $\endgroup$ – The Quantum Physicist Apr 6 '15 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.