# Change Branch Cut for DifferentialRoot

The differential equation

eqn = (16 + q) g[q] + 4 q (-3 + q^2) g'[q] - 4 q^2 (-1 + q^2) g''[q] == 0


is singular at {-1,0,1}. Nonetheless

g /. Flatten@DSolve[{eqn, g[2] == 0, g'[2] == 1}, g, q]


gives a well-behaved numerical function

(* DifferentialRoot[Function[{\[FormalY], \[FormalX]},
{(-16 - \[FormalX])*\[FormalY][\[FormalX]] - 4*\[FormalX]*(-3 + \[FormalX]^2)*
\[FormalY]'[\[FormalX]] + (-4*\[FormalX]^2 + 4*\[FormalX]^4)*
\[FormalY]''[\[FormalX]] == 0, \[FormalY][2] == 0, \[FormalY]'[2] == 1}],
Function[\[FormalX], {{Re[\[FormalX]] <= 1, Im[\[FormalX]] == 0}}]] *)


It has a branch cut on the real axis for q <= 1, as indicated by the last line. Elsewhere, it can be evaluated numerically, e.g.,

%[3.]
(* 1.15068 *)


However, I would like a solution valid in the region 0 < q < 1 as well and have tried,

g /. Flatten@DSolve[{eqn, g[1/2] == 0, g'[1/2] == 1}, g, q]
(* DifferentialRoot[Function[{\[FormalY], \[FormalX]},
{(-16 - \[FormalX])*\[FormalY][\[FormalX]] - 4*\[FormalX]*(-3 + \[FormalX]^2)*
\[FormalY]'[\[FormalX]] + (-4*\[FormalX]^2 + 4*\[FormalX]^4)*
\[FormalY]''[\[FormalX]] == 0, \[FormalY][1/2] == 0, \[FormalY]'[1/2] == 1}],
Function[\[FormalX], {{Re[\[FormalX]] <= 1, Im[\[FormalX]] == 0}}]] *)


The branch cut has not moved. Consequently, this expression evaluates numerically nowhere. My questions are:

1. Is this a bug?
2. Is there a work-around?
• What about doing transforming q -> 1/z and solving the ODE for z? – Carl Woll May 16 '17 at 16:32
• @CarlWoll Great idea, which puts the branch cut where desired and evaluates correctly. Perhaps, you would care to post it as an answer. I remain inclined to describe the behavior in the question as a bug, not because the branch cut is in the wrong place but because the solution produced evaluates no where to a numerical result. What are your thoughts? – bbgodfrey May 16 '17 at 23:58