Mathematica Asked by Michael E2 on December 21, 2020
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 Solve`DirInf[]
. 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[1])]^2 y[
x]^2 (1 - (8 I y[x]^(3/2))/(3 C[1])))/(
C[1] - 8/3 I y[x]^(3/2)) == (x + C[2])^2, 1] /. {x -> 0},
y[0] == 1, y'[0] == 0},
{C[1], C[2]}, {y[0], y'[0]}]
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[1] -> -((8 I)/3)}, {C[1] -> (8 I)/3}, {C[1] -> -(8/(3 Sqrt[-1 + 2 Solve`DirInf[] - Solve`DirInf[]^2]))}, {C[1] -> 8/(3 Sqrt[-1 + 2 Solve`DirInf[] - Solve`DirInf[]^2])}, {C[2] -> 0}}
BTW, Reduce
fails on the system.
FWIW, the problem arises from the following IVP:
y''[x]^2 == -4 y[x] && y[0] == 1 && y'[0] == 0
I don't think, it'a a bug. Two ways to get the result you want.
First omit the comand to eliminate {y[0], y'[0]}
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[1])]^2 y[
x]^2 (1 - (8 I y[x]^(3/2))/(3 C[1])))/(C[1] -
8/3 I y[x]^(3/2)) == (x + C[2])^2, 1] /. {x -> 0}, y[0] == 1,
y'[0] == 0}
Solve[eqs, {C[1], C[2]}]
(* {{C[1] -> (8 I)/(
3 InverseFunction[Hypergeometric2F1, 4, 4][1/2, 2/3, 5/3, 0]),
C[2] -> 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[1])]^2 y[
x]^2 (1 - (8 I y[x]^(3/2))/(3 C[1])))/(C[1] -
8/3 I y[x]^(3/2)) == (x + C[2])^2, 1] /.
x -> 0 /. {y[0] -> 1, y'[0] -> 0}}, {C[1], C[2]}, {y[0], y'[0]}
]
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[1] -> +/- infinity together with C[2]==0 are solutions.
eqs2 = eqs /. {y[0] -> 1, y'[0] -> 0}
Plot[Evaluate@Through[{Re, Im}[eqs2[[1, 1]] /. C[1] -> c1]], {c1, -5,
5}, PlotStyle -> {Blue, Red}]
Limit[eqs2[[1, 1]], C[1] -> -[Infinity]]
(* 0 *)
eqs /. {C[1] -> -[Infinity], C[2] -> 0}
(* {True, True, y[0] == 1, Derivative[1][y][0] == 0}
*)
Answered by Akku14 on December 21, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP