You can use Rationalize[.., 0]
or SetPrecision[.., Infinity]
to convert approximate numbers to the exact numbers required by DifferentialRoot[]
. (There is a slight difference between the two functions, on the order of 10^-16
or less, but it makes no difference in plotting these solutions.)
SeedRandom[2];
With[{erange = Sort[RandomReal[{-3, 3}, 6]]},
Plot[
Evaluate@Table[
y[t] /. sol,
{e, Rationalize[erange, 0]}],
{t, 0, 2},
PlotLegends -> (HoldForm[e = #] & /@ erange
)
]
]