Solve gives an incorrect answer

The name of the pictureThe name of the pictureThe name of the pictureClash 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?







share|improve this question


























    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?







    share|improve this question
























      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?







      share|improve this question














      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?









      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 16 at 17:11









      Carl Woll

      55.6k271144




      55.6k271144










      asked Aug 16 at 16:49









      Nasser Saad

      211




      211




















          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.






          share|improve this answer




















          • 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










          • @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

















          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







          share|improve this answer






















          • 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










          • 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










          • 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










          Your Answer




          StackExchange.ifUsing("editor", function ()
          return StackExchange.using("mathjaxEditing", function ()
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          );
          );
          , "mathjax-editing");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "387"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          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






























          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.






          share|improve this answer




















          • 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










          • @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














          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.






          share|improve this answer




















          • 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










          • @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












          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.






          share|improve this answer












          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.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          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










          • @ 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










          • @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
















          • 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










          • @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















          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










          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







          share|improve this answer






















          • 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










          • 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










          • 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














          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







          share|improve this answer






















          • 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










          • 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










          • 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












          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







          share|improve this answer














          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








          share|improve this answer














          share|improve this answer



          share|improve this answer








          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 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










          • 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










          • 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
















          • 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










          • 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










          • 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















          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

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          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













































































          Comments

          Popular posts from this blog

          What does second last employer means? [closed]

          List of Gilmore Girls characters

          Confectionery