1
$\begingroup$
M = 1/10;
sol = NSolve[{n == 1/(2 M) + e/Tan[2 e], e == 1/(2 M)*Sqrt[Exp[4 n] - (1 - 
      2*M*n)^2], 1/10 < e < 6, -1 < n < 1}, {e, n}];

It gives the warning that " NSolve was unable to prove that the solution set found is complete"

and then plot the functions

ContourPlot[{n == 5 + e/Tan[2 e], 
e == 5*Sqrt[Exp[4 n] - (1 - 2/10*n)^2]}, {e, 1/100, 6.3}, {n, -3, 
3}, ContourStyle -> {Black, {Dashed, Red}}, 
Epilog -> {RGBColor[0.2, 0.1, 0.8], Thickness[0.005], 
Table[Circle[{e /. sol[[k]], n /. sol[[k]]}, 0.07], {k, 1, 4}]}, 
Axes -> True, Frame -> False, PlotPoints -> 40, 
Prolog -> {Line[Table[{{k*Pi/2, -3}, {k*Pi/2, 3}}, {k, 1, 4}]]}]

it give the picture without circles at the point of intersection.It seems that the code

Epilog -> {RGBColor[0.2, 0.1, 0.8], Thickness[0.005], 
    Table[Circle[{e /. sol[[k]], n /. sol[[k]]}, 0.07], {k, 1, 4}]}

didn't work

the first is the problematic picture and the second is the targeted picture

       picture one

enter image description here

      picture two
$\endgroup$
  • $\begingroup$ Your code works with version 11.3. What version are you using? $\endgroup$ – Bob Hanlon May 14 '18 at 16:15
1
$\begingroup$

Since e is real, 25 E^(4 n) - (-5 + n)^2 must be greater zero. Than you can solve for 25 E^(4 n) - (-5 + n)^2 == e^2 . Further do

FullSimplify[
   ComplexExpand[n == 1/(2 M) + e/Tan[2 e], 
   TargetFunctions -> {Re, Im}], 1/10 < e < 6 && -1 < n < 1]

(*   -10 + 2 n + e Tan[e] == e Cot[e]   *)

this leads to

nsol = NSolve[{-10 + 2 n + e Tan[e] == e Cot[e], 
      25 E^(4 n) - (-5 + n)^2 == e^2, 1/10 < e < 6, -1 < n < 1}, {e,  n}, 
     WorkingPrecision -> 30]

(*   {{e -> 1.43094865810295458384888304493, 
       n -> 0.0180132370706695599946060476995}, {e -> 
            2.87757745845758744317117387730, 
       n -> 0.0665106724899688922422774527454}, {e -> 
            4.34782164851352692158237679687, 
       n -> 0.133182763206777152207840057118}, {e -> 
            5.84137958607605208314996732776, 
       n -> 0.206480096302156530694105177369}}   *)

Test

{-10 + 2 n + e Tan[e] - e Cot[e], 
  Sqrt[25 E^(4 n) - (-5 + n)^2] - e} /. nsol

(*   {{0.*10^-28, 0.*10^-30}, {0.*10^-28, 0.*10^-30}, {0.*10^-28, 
       0.*10^-30}, {0.*10^-28, 0.*10^-29}}   *)
$\endgroup$
0
$\begingroup$
$Version

(* "11.3.0 for Mac OS X x86 (64-bit) (March 7, 2018)" *)

M = 1/10;

sol = NSolve[
    {n == 1/(2 M) + e/Tan[2 e], 
     e == 1/(2 M)*Sqrt[Exp[4 n] - (1 - 2*M*n)^2],
     1/10 < e < 6, -1 < n < 1}, {e, n}] // Quiet;

ContourPlot[
 {n == 5 + e/Tan[2 e], e == 5*Sqrt[Exp[4 n] - (1 - 2/10*n)^2]},
 {e, 1/100, 6.3}, {n, -3, 3},
 ContourStyle -> {Black, {Dashed, Red}},
 Epilog -> {RGBColor[0.2, 0.1, 0.8], Thickness[0.005],
   Circle[{e, n}, 0.07] /. sol},
 Axes -> True,
 Frame -> False,
 PlotPoints -> 40,
 Prolog -> {Line[{{#, -3}, {#, 3}} & /@ (Range[1, 4] Pi/2)]}]

enter image description here

EDIT: With version 10.3, NSolve is much slower and produces imaginary artifacts that can be removed with Chop

$Version

(* "10.3.1 for Mac OS X x86 (64-bit) (December 9, 2015)" *)

M = 1/10;
sol = Cases[
     NSolve[
      {n == 1/(2 M) + e/Tan[2 e], 
       e == 1/(2 M)*Sqrt[Exp[4 n] - (1 - 2*M*n)^2],
       1/10 < e < 6, -1 < n < 1}, {e, n},
      Reals],
     _?(FreeQ[#, Undefined] &)] // Chop // Quiet;

ContourPlot[{n == 5 + e/Tan[2 e], e == 5*Sqrt[Exp[4 n] - (1 - 2/10*n)^2]}, {e,
   1/100, 6.3}, {n, -3, 3},
 ContourStyle -> {Black, {Dashed, Red}}, 
 Epilog -> {RGBColor[0.2, 0.1, 0.8], Thickness[0.005], 
   Circle[{e, n}, 0.07] /. sol},
 Axes -> True,
 Frame -> False,
 PlotPoints -> 40,
 Prolog -> {Line[{{#, -3}, {#, 3}} & /@ (Range[1, 4] Pi/2)]}]

enter image description here

$\endgroup$
  • $\begingroup$ The version I used is 10.3.@Bob Hanlon $\endgroup$ – Number_9527 May 15 '18 at 1:44
  • $\begingroup$ @Number_9527 - edit above added solution using version 10.3.1 $\endgroup$ – Bob Hanlon May 15 '18 at 2:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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