4
$\begingroup$
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?

$\endgroup$

2 Answers 2

5
$\begingroup$

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.

$\endgroup$
4
  • $\begingroup$ How about the result of NSolve in my answer? $\endgroup$
    – user64494
    Aug 16, 2018 at 18:55
  • $\begingroup$ @ user64494 NSolve is basically just invoking Solve in this case. $\endgroup$ Aug 17, 2018 at 0:49
  • $\begingroup$ @Daniel Lichtblau: If you execute the codes of OP and me, you will see quite different results. Can you base your claim? $\endgroup$
    – user64494
    Aug 17, 2018 at 5:05
  • $\begingroup$ @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. $\endgroup$ Aug 17, 2018 at 15:04
0
$\begingroup$

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}

$\endgroup$
5
  • $\begingroup$ 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.) $\endgroup$
    – Michael E2
    Aug 16, 2018 at 20:48
  • $\begingroup$ @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. $\endgroup$
    – user64494
    Aug 16, 2018 at 21:34
  • $\begingroup$ 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. $\endgroup$
    – Michael E2
    Aug 16, 2018 at 23:36
  • $\begingroup$ @Michael E2: Did your verify FindRoot for all complex values of A? $\endgroup$
    – user64494
    Aug 17, 2018 at 5:07
  • $\begingroup$ 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. $\endgroup$
    – Michael E2
    Aug 17, 2018 at 11:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.