In the course of developing an answer to 185859, I encountered the following difficulty. With
ss = DSolveValue[{D[(1 + z^2)*D[f[z, s], z], z] == (1 + z^2)^(-3)*s* f[z, s]},
f, {z, s}] /. {C[1][s] -> 1, C[2][s] -> 0};
the command
FindRoot[ss[5, s] == 3, {s, 3}]
produces two error messages,
DifferentialRoot::ieqn: The supplied equation in ... is not a linear differential equation with polynomial coefficients.
DifferentialRoot::ifprec: Parameters in ... are not exact numbers.
but nonetheless gives what appears to be the correct answer.
(* {s -> 2.83293} *)
However, if I attempt to substitute this result into ss
,
N[ss[5, s] /. %]
I obtain these errors again but DifferentialRoot
returns unevaluated. I would have expected 3.
as the result.
My question is, since DifferentialRoot
accepts parameters that "are not exact numbers" when used with FindRoot
(or Plot
, for that matter), how do I convince it to accept not-exact numbers more generally?
DifferentialRoot
evaluates correctly when called fromFindRoot
, just not when called directly. $\endgroup$