How do you properly use Differential Root?

I was trying to solve the DEQ

  DSolve[{-(x*y[x]) + Derivative[1][y][x] + 2*x*(2 + x)*Derivative[2][y][x] == 0}, y[x], x]


The result returns a Differential Root.

I looked at the documentation, tried getting the function, tried converting the solution to a function, tried putting in values to get numerical results, but nothing seems to work.

How are you supposed to properly use Differential Root?

Note: I know how to do numerical results, but I had not seen this Differential Root before and the examples are interesting, so would like to understand how to use this holonomic function better.

Maybe it is the case that it just cannot validly do anything with it for some mathematical reason.

• tried putting in values to get numerical results, but nothing seems to work. there are unknown constants of integrations in there, But basically when DSolve returns DifferentialRoot it means it could not solve it analytically. This is very similar to Maple's DESol. Try with initial conditions, and if you get DifferentialRoot again, try now to plot it as was done in the example in the link you showed. DifferentialRoot to an ODE is kinda like Root object to Solve. Commented Jul 18, 2020 at 13:11
• @Nasser: If you put in ICs, why not just use numerical methods? In other words, why have this result at all?
– Moo
Commented Jul 18, 2020 at 13:15
• It is an exact expression, that can be treated like other exact expressions, within limits. What is Sin[x] other than a link to algorithms that perform symbolic and numerical computations? Like some other esoteric special functions, there are limitations to what can be calculated from a DifferentialRoot. Commented Jul 18, 2020 at 14:17

Clear["Global*"]

eqn = -(x*y[x]) + Derivative[1][y][x] + 2*x*(2 + x)*Derivative[2][y][x] == 0;

sol[c1_, c2_] = DSolve[eqn, y, x][[1]] /. {C[1] -> c1, C[2] -> c2}


To get a numeric value, c1, c2, and x must have numeric values.

y[1.] /. sol[1, 1]

(* 1. *)


However, inexact values for the arbitrary constants fail

y[1.] /. sol[1.1, 1.2]


Rationalize the arbitrary constants

y[1.] /. sol @@ Rationalize[{1.1, 1.2}]

(* 1.1 *)

Manipulate[
Plot[
Evaluate[y[x] /. (sol @@ Rationalize[{c1, c2}])], {x, 0, 2},
PlotRange -> {-3.5, 4}] // Quiet,
{{c1, 1}, -2, 2, 0.05, Appearance -> "Labeled"},
{{c2, 1}, -2, 2, 0.05, Appearance -> "Labeled"}]
`