# What does that output of DSolve mean?

Solving in 13.2 on Windows 10 an ODE

DSolve[4*y''[x] + Tanh[x]*y'[x]*2 == (Cosh[x] - 6/Cosh[x]^2)*y[x],  y[x], x]//InputForm


, I obiain

{{{y[x] -> C[2]*DifferentialRoot[Function[{\[FormalY], \[FormalX]}, {(-1 - 3*\[FormalX]^2 + 48*\[FormalX]^3 - 3*\[FormalX]^4 - \[FormalX]^6)*\[FormalY][\[FormalX]] + (4*\[FormalX]^2 + 16*\[FormalX]^4 + 12*\[FormalX]^6)*Derivative[1][\[FormalY]][ \[FormalX]] + 8*\[FormalX]^3*(1 + \[FormalX]^2)^2*Derivative[2][\[FormalY]][ \[FormalX]] == 0, \[FormalY][1] == 0, Derivative[1][\[FormalY]][1] == 1}], Function[\[FormalX], {{Re[\[FormalX]] <= 0, Im[\[FormalX]] == 0}}]][ E^x] + C[1]*DifferentialRoot[Function[{\[FormalY], \[FormalX]}, {(-1 - 3*\[FormalX]^2 + 48*\[FormalX]^3 - 3*\[FormalX]^4 - \[FormalX]^6)*\[FormalY][\[FormalX]] + (4*\[FormalX]^2 + 16*\[FormalX]^4 + 12*\[FormalX]^6)*Derivative[1][\[FormalY]][ \[FormalX]] + 8*\[FormalX]^3*(1 + \[FormalX]^2)^2*Derivative[2][\[FormalY]][ \[FormalX]] == 0, \[FormalY][1] == 1, Derivative[1][\[FormalY]][1] == 0}], Function[\[FormalX], {{Re[\[FormalX]] <= 0, Im[\[FormalX]] == 0}}]][ E^x]}}

The above output is unclear to me, especially the part Function[\[FormalX], {{Re[\[FormalX]] <= 0, Im[\[FormalX]] == 0}}]][ E^x]}} in both terms. The documentation says

DifferentialRoot[lde,pred] represents a solution restricted to avoid cuts in the complex plane defined by pred[z], where pred[z] can contain equations and inequalities

, but

 DSolve[4*y''[x] + Tanh[x]*y'[x]*2 == (Cosh[x] - 6/Cosh[x]^2)*y[x],  y[x], x, Assumptions -> x \[Element] Reals] //InputForm


produces the same result. The command of Maple dsolve(4*(diff(y(x), x, x))+2*tanh(x)*(diff(y(x), x)) = (cosh(x)-6/cosh(x)^2)*y(x), y(x)) crashes my comp.

• My Maple give answer with DESol, just can't solve(with no Crash) Commented Feb 8, 2023 at 15:04
• @MariuszIwaniuk: Thank you. Maple's DESol is an equivalent of DifferentialRoot in Mathematica. Commented Feb 8, 2023 at 15:07
• The complex form of the DE, in terms of $x(t)=re^{it}$, has a $1/r$ term creating a ramified singularity at the origin. Mathematica I suspect is assigning the negative real axis as an arbitrary branch cut to restrict the multivalued solution to a single-valued solution.
– josh
Commented Feb 8, 2023 at 19:16
• @josh: Can you kindly ground your claim? Commented Feb 8, 2023 at 20:44
• @user64494: I'll make a post in a day or so unless someone does so before.
– josh
Commented Feb 8, 2023 at 23:26

DSolve was able to determine that the solution is a function that satisfies a holonomic ODE composed with Exp[x]. The result returned reflects this, and moreover is a computable object -- rather than only just reporting that the ODE it satisfies.

What I mean by that is, just like Root objects, you can perform operations on them:

res = DSolveValue[
4*y''[x] + Tanh[x]*y'[x]*2 == (Cosh[x] - 6/Cosh[x]^2)*y[x],
y[x],
x
] /. {C[1] -> 1, C[2] -> 0};


Various operations:

D[res, x]

E^x DifferentialRoot[(* different ODE commented out... *)][E^x]

res /. x -> 1.0

0.555421

Plot[res, {x, 0, 1}]


See the Applications section in the DifferentialRoot ref page for more examples here.

So despite not knowing an explicit solution to the ODE in terms of elementary/special functions, we at least now have a function that satisfies a simpler ODE (composed with Exp[x]) that is computable. Much better than DSolve coming back unevaluated IMO.

As for the second argument Function[x, {{Re[x] <= 0, Im[x] == 0}}], it looks as if it's restricting the DifferentialRoot object to avoid a branch cut that is a ray starting at the origin, pointing along the negative real axis.

To see this, notice that its plot in the complex plane is restricted to the right half plane:

Just examine the DifferentialRoot object alone:

res2 = res /. Exp[x] -> x;


Plot it:

ComplexPlot[res2, {x, 2}, PerformanceGoal -> "Speed"]


We can see the branch cut by tricking the object into thinking there is nothing to avoid:

res3 = res2 /. Re[z_] <= 0 :> Re[z] <= -∞;

ComplexPlot[res3, {x, 2}, PerformanceGoal -> "Speed"]


It looks like there are multiple branch cuts in the left half plane, which is probably why the restriction is that entire region. However it looks like the ODE satisfies the DSolve's return value anywhere away from the cuts:

res4 = res /. Re[z] <= 0 :> Re[z] <= -\[Infinity];

zero = 4*D[res4, {x, 2}] + Tanh[x]*D[res4, x]*2 - (Cosh[x] - 6/Cosh[x]^2)*res4;

zero /. x -> -1.0 - I

-7.98108*10^-7 - 1.16422*10^-6 I

zero /. x -> -1.0 + .0001I

9.1255*10^-7 - 1.94541*10^-7 I


It's tough to see, but here are 2 more cuts in the plot above:

And we can plot the absolute value along the line segment with end points -2 and 2I to see the jump caused by the cut:

Plot[Evaluate[Abs[res3[[0]][-2 (1 - t) + 2 I t]]], {t, 0, 1}, PlotRange -> {0, 2.5}]


### Edit

The branch cuts seem to be rays starting at each singularity (in this case $$0$$, $$\pm i$$) in the direction parallel to the line segment between $$1$$ and each singularity, respectively. I think this makes sense since the initial conditions are at x == 1, and so integrating along a path that hits a singularity will cause problems.

My guess is then that the smallest (left) half plane is chosen that contains all singularities, which is then therefore guaranteed to restrict away from any branch cuts.

• Thank you. You mostly repeat the documentation for the ODE under consideration. Unfortunately, your "As for the second argument Function[x, {{Re[x] <= 0, Im[x] == 0}}], it looks as if it's restricting the DifferentialRoot object to avoid a branch cut that is a ray starting at the origin, pointing along the negative real axis" does not explain the result of resu = DSolveValue[ 4*y''[x] + Tanh[x]*y'[x]*2 == (Cosh[x] - 6/Cosh[x]^2)*y[x], y[x], x] /. {C[1] -> 1, C[2] -> 1};Plot[resu, {x, -5, 5}] and ComplexPlot[resu,{x,-2-2*I,2+2*I},PerformanceGoal->"Speed"]. Sorry, this is not it. Commented Feb 8, 2023 at 14:50
• I'd like to add that your attempt of the explanation "As for the second argument Function[x, {{Re[x] <= 0, Im[x] == 0}}], it looks as if it's restricting the DifferentialRoot object to avoid a branch cut that is a ray starting at the origin, pointing along the negative real axis" simply elaborates "DifferentialRoot[lde,pred] represents a solution restricted to avoid cuts in the complex plane defined by pred[z], where pred[z] can contain equations and inequalities" Commented Feb 8, 2023 at 14:53
• That is because resu is a DifferentialRoot object composed with Exp[x]. Look at resu /. Exp[x] -> x and you'll see similar behavior. Commented Feb 8, 2023 at 14:53
• Then I suppose I don't understand what you're looking for. Maybe make your question more clear next time. Commented Feb 8, 2023 at 14:58
• I elaborate more directly below. I'm done talking with you -- you just give terse, non-constructive feedback. I'm not going to interact with you on this site anymore. Commented Feb 9, 2023 at 13:01