# SolveDirInf[] — Meaningful value or just a bug?

Bug introduced in 4.1 or earlier and persisting through 12.2.0. or later

To the problem below, I get four independent, incomplete solutions, three in terms of SolveDirInf[]. Since DirInf is not in the System  context, I assume this behavior is a bug (or not?). But I was wondering if it made any sense as a solution.

Solve[Flatten@{
NestList[
D[#, x] &, (
Hypergeometric2F1[1/2, 2/3, 5/3, (8 I y[x]^(3/2))/(3 C)]^2 y[
x]^2 (1 - (8 I y[x]^(3/2))/(3 C)))/(
C - 8/3 I y[x]^(3/2)) == (x + C)^2, 1] /. {x -> 0},
y == 1, y' == 0},
{C, C}, {y, y'}]


Solve::ifun : Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. >>

Solve::svars : Equations may not give solutions for all "solve" variables. >>

{{C -> -((8 I)/3)}, {C -> (8 I)/3},
{C -> -(8/(3 Sqrt[-1 + 2 SolveDirInf[] - SolveDirInf[]^2]))},
{C -> 8/(3 Sqrt[-1 + 2 SolveDirInf[] - SolveDirInf[]^2])},
{C -> 0}}


BTW, Reduce fails on the system.

FWIW, the problem arises from the following IVP:

y''[x]^2 == -4 y[x] && y == 1 && y' == 0

• Bug. That's an internal symbol that should not appear in results. – Daniel Lichtblau Dec 7 '20 at 20:34
• A very old bug. Exactly the same output appear in Mathematica 5.2.0 and 8.0.4. – innaiz Dec 8 '20 at 11:24
• @innaiz Thank you for the info. – Michael E2 Dec 8 '20 at 14:11
• Almost the same output in v4.1: i.stack.imgur.com/RxWgq.png Another incorrect result (but with proper warning) in v3.0: i.stack.imgur.com/m3mPU.png So this seems to be a bug since v4. – xzczd Dec 8 '20 at 14:42
• @xzczd Thanks! I like the "should be checked by hand" in V3. I haven't seen that lately. It's funny, too, for how do you check Indeterminate by hand? The warning should have come before we got to Indeterminate. – Michael E2 Dec 8 '20 at 15:15

I don't think, it'a a bug. Two ways to get the result you want.

First omit the comand to eliminate {y, y'}  in Solve. Since you explicitly set them Equal 1 and 0 and later want to eliminate it, Solve gets confused.

eqs = Flatten@{NestList[
D[#, x] &, (Hypergeometric2F1[1/2, 2/3,
5/3, (8 I y[x]^(3/2))/(3 C)]^2 y[
x]^2 (1 - (8 I y[x]^(3/2))/(3 C)))/(C -
8/3 I y[x]^(3/2)) == (x + C)^2, 1] /. {x -> 0}, y == 1,
y' == 0}

Solve[eqs, {C, C}]

(*   {{C -> (8 I)/(
3 InverseFunction[Hypergeometric2F1, 4, 4][1/2, 2/3, 5/3, 0]),
C -> 0}}   *)


Second, set the y with Rule to wanted values to get the same result

Solve[Flatten@
Evaluate@{NestList[
D[#, x] &, (Hypergeometric2F1[1/2, 2/3,
5/3, (8 I y[x]^(3/2))/(3 C)]^2 y[
x]^2 (1 - (8 I y[x]^(3/2))/(3 C)))/(C -
8/3 I y[x]^(3/2)) == (x + C)^2, 1] /.
x -> 0 /. {y -> 1, y' -> 0}}, {C, C}, {y, y'}
]


Edit

I am using version "8.0 for Microsoft Windows (32-bit) (December 9, 2010)"

@MichaelE2, you are right. Solve should be able to give solution for (but does not)

Solve[{c1 == y1, c2 == y2, y1 == 1, y2 == 0}, {c1, c2}]


Don't know why my first example works this time without command to eliminate the y.

Second, if you accept infinity as solution, C -> +/- infinity together with C==0 are solutions.

eqs2 = eqs /. {y -> 1, y' -> 0}

Plot[Evaluate@Through[{Re, Im}[eqs2[[1, 1]] /. C -> c1]], {c1, -5,
5}, PlotStyle -> {Blue, Red}]

Limit[eqs2[[1, 1]], C -> -\[Infinity]]

(*   0   *)

eqs /. {C -> -\[Infinity], C -> 0}

(*   {True, True, y == 1, Derivative[y] == 0}
*)

• Tx! What version are you using? I get an empty set {} for the first. That might be right and InverseFunction[Hypergeometric2F1, 4, 4][1/2, 2/3, 5/3, 0] be undefined. Some limiting value for C, such as Infinity, might be a solution, but I haven't found one. For your second, I get that Solve cannot solve the equation. (V12.1.1, Mac) -- BTW the form in the OP was desired because Solve balks at simple things like Solve[Flatten@Evaluate@{NestList[D[#, x] &, y[x] == C Sin[x] + C Cos[x],1] /. {x -> 0}, y == 1, y' == 0}, {C, C}]`, for me. Might be different for you. – Michael E2 Dec 9 '20 at 14:13
• @MichaelE2, i am using version "8.0 for Microsoft Windows (32-bit) (December 9, 2010)". See my Edit above. – Akku14 Dec 9 '20 at 18:15