Solve gives an incorrect answer
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
Cond11[B_, A_, En_] := 4 + 2 Sqrt[1 + 4 B] - A^2/(2 (-En)^(3/2))
Cond22[B_, A_, En_] := 2 - (A^2 (3 + 2 Sqrt[1 + 4 B]))/(2 (-En)^(3/2))
Solve[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0, B, En]
Putting the result back into Cond11
or Cond22
does not yield zero.
What is the problem?
numerics evaluation
add a comment |Â
up vote
4
down vote
favorite
Cond11[B_, A_, En_] := 4 + 2 Sqrt[1 + 4 B] - A^2/(2 (-En)^(3/2))
Cond22[B_, A_, En_] := 2 - (A^2 (3 + 2 Sqrt[1 + 4 B]))/(2 (-En)^(3/2))
Solve[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0, B, En]
Putting the result back into Cond11
or Cond22
does not yield zero.
What is the problem?
numerics evaluation
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
Cond11[B_, A_, En_] := 4 + 2 Sqrt[1 + 4 B] - A^2/(2 (-En)^(3/2))
Cond22[B_, A_, En_] := 2 - (A^2 (3 + 2 Sqrt[1 + 4 B]))/(2 (-En)^(3/2))
Solve[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0, B, En]
Putting the result back into Cond11
or Cond22
does not yield zero.
What is the problem?
numerics evaluation
Cond11[B_, A_, En_] := 4 + 2 Sqrt[1 + 4 B] - A^2/(2 (-En)^(3/2))
Cond22[B_, A_, En_] := 2 - (A^2 (3 + 2 Sqrt[1 + 4 B]))/(2 (-En)^(3/2))
Solve[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0, B, En]
Putting the result back into Cond11
or Cond22
does not yield zero.
What is the problem?
numerics evaluation
edited Aug 16 at 17:11


Carl Woll
55.6k271144
55.6k271144
asked Aug 16 at 16:49


Nasser Saad
211
211
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
5
down vote
From the documentation:
Solve
uses non-equivalent transformations to find solutions of transcendental equations and hence it may not find some solutions and may not establish exact conditions on the validity of the solutions found.With
Method->Reduce
,Solve
uses only equivalent transformations and finds all solutions.
So, the non-equivalent transformations used by Solve
are introducing spurious solutions. To avoid this:
Solve[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0, B, En, Method->Reduce]
showing that your equations have no solutions.
How about the result of NSolve in my answer?
– user64494
Aug 16 at 18:55
@ user64494NSolve
is basically just invokingSolve
in this case.
– Daniel Lichtblau
Aug 17 at 0:49
@Daniel Lichtblau: If you execute the codes of OP and me, you will see quite different results. Can you base your claim?
– user64494
Aug 17 at 5:05
@user64494 I checked by tracking it in a debugging kernel. The difference in results is probably due to an intermediate result factoring in the exact case, at theRoots
step.
– Daniel Lichtblau
Aug 17 at 15:04
add a comment |Â
up vote
0
down vote
Making use of NSolve
instead of Solve
, one obtains
Cond11[B_, A_, En_] := 4 + 2 Sqrt[1 + 4 B] - A^2/(2 (-En)^(3/2));
Cond22[B_, A_, En_] := 2 - (A^2 (3 + 2 Sqrt[1 + 4 B]))/(2 (-En)^(3/2));
NSolve[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0, B, En]
B -> 0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
1]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 1]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 1], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
2]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 2]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 2], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
3]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 3]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 3], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
4]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 4]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 4], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
5]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 5]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 5], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
6]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 6]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 6]
Addition. Also
FindRoot[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0 /. A -> 1, B, 1, En, 1]
B -> -1.10628 - 1.69546*10^-15 I, En -> 0.944732 + 0.168628 I
It doesn't appear that the result of NSolve or FindRoot is close to a zero of the conditions, for any value ofA
. (Plug into the functions.)
– Michael E2
Aug 16 at 20:48
@Michael E2: I did try the verification for some values of A. Indeed, the result was wrong or unclear to me. So we deal with a serious bug in NSolve/FindRoot.
– user64494
Aug 16 at 21:34
FindRoot
gives an error/warning, so I wouldn't call that a bug. But I expect more fromNSolve
, which gives no error; I agree that's a bug.
– Michael E2
Aug 16 at 23:36
@Michael E2: Did your verify FindRoot for all complex values of A?
– user64494
Aug 17 at 5:07
Obviously not for all values of A, just a few thousand, like thisCond11[B, A, En], Cond22[B, A, En] /. A -> # /. FindRoot[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0 /. A -> #, B, 1 + 0. I, En, 1] & /@ RandomComplex[1/10 -5 - 5 I, 5 + 5 I, 1000] // Chop[#, 1*^-3] & // Unitize // Flatten // DeleteDuplicates // Quiet
, with different domains forRandomComplex
. It seems to me that the result ofReduce[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0]
indicates one should consider why there is no solution.
– Michael E2
Aug 17 at 11:25
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
From the documentation:
Solve
uses non-equivalent transformations to find solutions of transcendental equations and hence it may not find some solutions and may not establish exact conditions on the validity of the solutions found.With
Method->Reduce
,Solve
uses only equivalent transformations and finds all solutions.
So, the non-equivalent transformations used by Solve
are introducing spurious solutions. To avoid this:
Solve[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0, B, En, Method->Reduce]
showing that your equations have no solutions.
How about the result of NSolve in my answer?
– user64494
Aug 16 at 18:55
@ user64494NSolve
is basically just invokingSolve
in this case.
– Daniel Lichtblau
Aug 17 at 0:49
@Daniel Lichtblau: If you execute the codes of OP and me, you will see quite different results. Can you base your claim?
– user64494
Aug 17 at 5:05
@user64494 I checked by tracking it in a debugging kernel. The difference in results is probably due to an intermediate result factoring in the exact case, at theRoots
step.
– Daniel Lichtblau
Aug 17 at 15:04
add a comment |Â
up vote
5
down vote
From the documentation:
Solve
uses non-equivalent transformations to find solutions of transcendental equations and hence it may not find some solutions and may not establish exact conditions on the validity of the solutions found.With
Method->Reduce
,Solve
uses only equivalent transformations and finds all solutions.
So, the non-equivalent transformations used by Solve
are introducing spurious solutions. To avoid this:
Solve[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0, B, En, Method->Reduce]
showing that your equations have no solutions.
How about the result of NSolve in my answer?
– user64494
Aug 16 at 18:55
@ user64494NSolve
is basically just invokingSolve
in this case.
– Daniel Lichtblau
Aug 17 at 0:49
@Daniel Lichtblau: If you execute the codes of OP and me, you will see quite different results. Can you base your claim?
– user64494
Aug 17 at 5:05
@user64494 I checked by tracking it in a debugging kernel. The difference in results is probably due to an intermediate result factoring in the exact case, at theRoots
step.
– Daniel Lichtblau
Aug 17 at 15:04
add a comment |Â
up vote
5
down vote
up vote
5
down vote
From the documentation:
Solve
uses non-equivalent transformations to find solutions of transcendental equations and hence it may not find some solutions and may not establish exact conditions on the validity of the solutions found.With
Method->Reduce
,Solve
uses only equivalent transformations and finds all solutions.
So, the non-equivalent transformations used by Solve
are introducing spurious solutions. To avoid this:
Solve[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0, B, En, Method->Reduce]
showing that your equations have no solutions.
From the documentation:
Solve
uses non-equivalent transformations to find solutions of transcendental equations and hence it may not find some solutions and may not establish exact conditions on the validity of the solutions found.With
Method->Reduce
,Solve
uses only equivalent transformations and finds all solutions.
So, the non-equivalent transformations used by Solve
are introducing spurious solutions. To avoid this:
Solve[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0, B, En, Method->Reduce]
showing that your equations have no solutions.
answered Aug 16 at 17:09


Carl Woll
55.6k271144
55.6k271144
How about the result of NSolve in my answer?
– user64494
Aug 16 at 18:55
@ user64494NSolve
is basically just invokingSolve
in this case.
– Daniel Lichtblau
Aug 17 at 0:49
@Daniel Lichtblau: If you execute the codes of OP and me, you will see quite different results. Can you base your claim?
– user64494
Aug 17 at 5:05
@user64494 I checked by tracking it in a debugging kernel. The difference in results is probably due to an intermediate result factoring in the exact case, at theRoots
step.
– Daniel Lichtblau
Aug 17 at 15:04
add a comment |Â
How about the result of NSolve in my answer?
– user64494
Aug 16 at 18:55
@ user64494NSolve
is basically just invokingSolve
in this case.
– Daniel Lichtblau
Aug 17 at 0:49
@Daniel Lichtblau: If you execute the codes of OP and me, you will see quite different results. Can you base your claim?
– user64494
Aug 17 at 5:05
@user64494 I checked by tracking it in a debugging kernel. The difference in results is probably due to an intermediate result factoring in the exact case, at theRoots
step.
– Daniel Lichtblau
Aug 17 at 15:04
How about the result of NSolve in my answer?
– user64494
Aug 16 at 18:55
How about the result of NSolve in my answer?
– user64494
Aug 16 at 18:55
@ user64494
NSolve
is basically just invoking Solve
in this case.– Daniel Lichtblau
Aug 17 at 0:49
@ user64494
NSolve
is basically just invoking Solve
in this case.– Daniel Lichtblau
Aug 17 at 0:49
@Daniel Lichtblau: If you execute the codes of OP and me, you will see quite different results. Can you base your claim?
– user64494
Aug 17 at 5:05
@Daniel Lichtblau: If you execute the codes of OP and me, you will see quite different results. Can you base your claim?
– user64494
Aug 17 at 5:05
@user64494 I checked by tracking it in a debugging kernel. The difference in results is probably due to an intermediate result factoring in the exact case, at the
Roots
step.– Daniel Lichtblau
Aug 17 at 15:04
@user64494 I checked by tracking it in a debugging kernel. The difference in results is probably due to an intermediate result factoring in the exact case, at the
Roots
step.– Daniel Lichtblau
Aug 17 at 15:04
add a comment |Â
up vote
0
down vote
Making use of NSolve
instead of Solve
, one obtains
Cond11[B_, A_, En_] := 4 + 2 Sqrt[1 + 4 B] - A^2/(2 (-En)^(3/2));
Cond22[B_, A_, En_] := 2 - (A^2 (3 + 2 Sqrt[1 + 4 B]))/(2 (-En)^(3/2));
NSolve[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0, B, En]
B -> 0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
1]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 1]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 1], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
2]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 2]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 2], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
3]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 3]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 3], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
4]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 4]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 4], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
5]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 5]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 5], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
6]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 6]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 6]
Addition. Also
FindRoot[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0 /. A -> 1, B, 1, En, 1]
B -> -1.10628 - 1.69546*10^-15 I, En -> 0.944732 + 0.168628 I
It doesn't appear that the result of NSolve or FindRoot is close to a zero of the conditions, for any value ofA
. (Plug into the functions.)
– Michael E2
Aug 16 at 20:48
@Michael E2: I did try the verification for some values of A. Indeed, the result was wrong or unclear to me. So we deal with a serious bug in NSolve/FindRoot.
– user64494
Aug 16 at 21:34
FindRoot
gives an error/warning, so I wouldn't call that a bug. But I expect more fromNSolve
, which gives no error; I agree that's a bug.
– Michael E2
Aug 16 at 23:36
@Michael E2: Did your verify FindRoot for all complex values of A?
– user64494
Aug 17 at 5:07
Obviously not for all values of A, just a few thousand, like thisCond11[B, A, En], Cond22[B, A, En] /. A -> # /. FindRoot[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0 /. A -> #, B, 1 + 0. I, En, 1] & /@ RandomComplex[1/10 -5 - 5 I, 5 + 5 I, 1000] // Chop[#, 1*^-3] & // Unitize // Flatten // DeleteDuplicates // Quiet
, with different domains forRandomComplex
. It seems to me that the result ofReduce[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0]
indicates one should consider why there is no solution.
– Michael E2
Aug 17 at 11:25
add a comment |Â
up vote
0
down vote
Making use of NSolve
instead of Solve
, one obtains
Cond11[B_, A_, En_] := 4 + 2 Sqrt[1 + 4 B] - A^2/(2 (-En)^(3/2));
Cond22[B_, A_, En_] := 2 - (A^2 (3 + 2 Sqrt[1 + 4 B]))/(2 (-En)^(3/2));
NSolve[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0, B, En]
B -> 0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
1]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 1]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 1], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
2]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 2]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 2], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
3]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 3]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 3], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
4]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 4]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 4], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
5]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 5]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 5], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
6]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 6]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 6]
Addition. Also
FindRoot[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0 /. A -> 1, B, 1, En, 1]
B -> -1.10628 - 1.69546*10^-15 I, En -> 0.944732 + 0.168628 I
It doesn't appear that the result of NSolve or FindRoot is close to a zero of the conditions, for any value ofA
. (Plug into the functions.)
– Michael E2
Aug 16 at 20:48
@Michael E2: I did try the verification for some values of A. Indeed, the result was wrong or unclear to me. So we deal with a serious bug in NSolve/FindRoot.
– user64494
Aug 16 at 21:34
FindRoot
gives an error/warning, so I wouldn't call that a bug. But I expect more fromNSolve
, which gives no error; I agree that's a bug.
– Michael E2
Aug 16 at 23:36
@Michael E2: Did your verify FindRoot for all complex values of A?
– user64494
Aug 17 at 5:07
Obviously not for all values of A, just a few thousand, like thisCond11[B, A, En], Cond22[B, A, En] /. A -> # /. FindRoot[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0 /. A -> #, B, 1 + 0. I, En, 1] & /@ RandomComplex[1/10 -5 - 5 I, 5 + 5 I, 1000] // Chop[#, 1*^-3] & // Unitize // Flatten // DeleteDuplicates // Quiet
, with different domains forRandomComplex
. It seems to me that the result ofReduce[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0]
indicates one should consider why there is no solution.
– Michael E2
Aug 17 at 11:25
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Making use of NSolve
instead of Solve
, one obtains
Cond11[B_, A_, En_] := 4 + 2 Sqrt[1 + 4 B] - A^2/(2 (-En)^(3/2));
Cond22[B_, A_, En_] := 2 - (A^2 (3 + 2 Sqrt[1 + 4 B]))/(2 (-En)^(3/2));
NSolve[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0, B, En]
B -> 0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
1]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 1]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 1], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
2]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 2]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 2], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
3]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 3]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 3], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
4]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 4]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 4], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
5]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 5]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 5], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
6]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 6]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 6]
Addition. Also
FindRoot[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0 /. A -> 1, B, 1, En, 1]
B -> -1.10628 - 1.69546*10^-15 I, En -> 0.944732 + 0.168628 I
Making use of NSolve
instead of Solve
, one obtains
Cond11[B_, A_, En_] := 4 + 2 Sqrt[1 + 4 B] - A^2/(2 (-En)^(3/2));
Cond22[B_, A_, En_] := 2 - (A^2 (3 + 2 Sqrt[1 + 4 B]))/(2 (-En)^(3/2));
NSolve[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0, B, En]
B -> 0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
1]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 1]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 1], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
2]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 2]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 2], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
3]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 3]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 3], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
4]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 4]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 4], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
5]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 5]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 5], B ->
0.875 - (
0.21875 A^2 Sqrt[-1. Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &,
6]])/Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 6]^2,
En -> Root[1. A^8 + 20. A^4 #1^3 + 64. #1^6 &, 6]
Addition. Also
FindRoot[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0 /. A -> 1, B, 1, En, 1]
B -> -1.10628 - 1.69546*10^-15 I, En -> 0.944732 + 0.168628 I
edited Aug 16 at 20:00
answered Aug 16 at 18:54
user64494
2,6731917
2,6731917
It doesn't appear that the result of NSolve or FindRoot is close to a zero of the conditions, for any value ofA
. (Plug into the functions.)
– Michael E2
Aug 16 at 20:48
@Michael E2: I did try the verification for some values of A. Indeed, the result was wrong or unclear to me. So we deal with a serious bug in NSolve/FindRoot.
– user64494
Aug 16 at 21:34
FindRoot
gives an error/warning, so I wouldn't call that a bug. But I expect more fromNSolve
, which gives no error; I agree that's a bug.
– Michael E2
Aug 16 at 23:36
@Michael E2: Did your verify FindRoot for all complex values of A?
– user64494
Aug 17 at 5:07
Obviously not for all values of A, just a few thousand, like thisCond11[B, A, En], Cond22[B, A, En] /. A -> # /. FindRoot[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0 /. A -> #, B, 1 + 0. I, En, 1] & /@ RandomComplex[1/10 -5 - 5 I, 5 + 5 I, 1000] // Chop[#, 1*^-3] & // Unitize // Flatten // DeleteDuplicates // Quiet
, with different domains forRandomComplex
. It seems to me that the result ofReduce[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0]
indicates one should consider why there is no solution.
– Michael E2
Aug 17 at 11:25
add a comment |Â
It doesn't appear that the result of NSolve or FindRoot is close to a zero of the conditions, for any value ofA
. (Plug into the functions.)
– Michael E2
Aug 16 at 20:48
@Michael E2: I did try the verification for some values of A. Indeed, the result was wrong or unclear to me. So we deal with a serious bug in NSolve/FindRoot.
– user64494
Aug 16 at 21:34
FindRoot
gives an error/warning, so I wouldn't call that a bug. But I expect more fromNSolve
, which gives no error; I agree that's a bug.
– Michael E2
Aug 16 at 23:36
@Michael E2: Did your verify FindRoot for all complex values of A?
– user64494
Aug 17 at 5:07
Obviously not for all values of A, just a few thousand, like thisCond11[B, A, En], Cond22[B, A, En] /. A -> # /. FindRoot[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0 /. A -> #, B, 1 + 0. I, En, 1] & /@ RandomComplex[1/10 -5 - 5 I, 5 + 5 I, 1000] // Chop[#, 1*^-3] & // Unitize // Flatten // DeleteDuplicates // Quiet
, with different domains forRandomComplex
. It seems to me that the result ofReduce[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0]
indicates one should consider why there is no solution.
– Michael E2
Aug 17 at 11:25
It doesn't appear that the result of NSolve or FindRoot is close to a zero of the conditions, for any value of
A
. (Plug into the functions.)– Michael E2
Aug 16 at 20:48
It doesn't appear that the result of NSolve or FindRoot is close to a zero of the conditions, for any value of
A
. (Plug into the functions.)– Michael E2
Aug 16 at 20:48
@Michael E2: I did try the verification for some values of A. Indeed, the result was wrong or unclear to me. So we deal with a serious bug in NSolve/FindRoot.
– user64494
Aug 16 at 21:34
@Michael E2: I did try the verification for some values of A. Indeed, the result was wrong or unclear to me. So we deal with a serious bug in NSolve/FindRoot.
– user64494
Aug 16 at 21:34
FindRoot
gives an error/warning, so I wouldn't call that a bug. But I expect more from NSolve
, which gives no error; I agree that's a bug.– Michael E2
Aug 16 at 23:36
FindRoot
gives an error/warning, so I wouldn't call that a bug. But I expect more from NSolve
, which gives no error; I agree that's a bug.– Michael E2
Aug 16 at 23:36
@Michael E2: Did your verify FindRoot for all complex values of A?
– user64494
Aug 17 at 5:07
@Michael E2: Did your verify FindRoot for all complex values of A?
– user64494
Aug 17 at 5:07
Obviously not for all values of A, just a few thousand, like this
Cond11[B, A, En], Cond22[B, A, En] /. A -> # /. FindRoot[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0 /. A -> #, B, 1 + 0. I, En, 1] & /@ RandomComplex[1/10 -5 - 5 I, 5 + 5 I, 1000] // Chop[#, 1*^-3] & // Unitize // Flatten // DeleteDuplicates // Quiet
, with different domains for RandomComplex
. It seems to me that the result of Reduce[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0]
indicates one should consider why there is no solution.– Michael E2
Aug 17 at 11:25
Obviously not for all values of A, just a few thousand, like this
Cond11[B, A, En], Cond22[B, A, En] /. A -> # /. FindRoot[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0 /. A -> #, B, 1 + 0. I, En, 1] & /@ RandomComplex[1/10 -5 - 5 I, 5 + 5 I, 1000] // Chop[#, 1*^-3] & // Unitize // Flatten // DeleteDuplicates // Quiet
, with different domains for RandomComplex
. It seems to me that the result of Reduce[Cond11[B, A, En] == 0, Cond22[B, A, En] == 0]
indicates one should consider why there is no solution.– Michael E2
Aug 17 at 11:25
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f180129%2fsolve-gives-an-incorrect-answer%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password