0
$\begingroup$

How can I plot $\kappa(\epsilon_{dd},\lambda)$ this transcendental equation? $$3\kappa^2 \epsilon_{dd}\left[\left(\frac{\lambda^2}{2}+1\right)\frac{f_s(\kappa)}{1-\kappa^2}-1\right]+(\epsilon_{dd}-1)(\kappa^2-\lambda^2)=0 $$ where $\lambda=1,2,3,4$ and $$f_s(\kappa)=\frac{1+2\kappa^2}{1-\kappa^2}-\frac{3\kappa^2 artanh \sqrt{1-\kappa^2} }{(1-\kappa^2)^{3/2}}. $$

My original problem is not that, but it's similar. If you help me with this, maybe I can solve mine.

Here are the codes of equations:

fs[kappa_] := (1 +2 kappa^2)/(1 - kappa^2) - (3 kappa^2 ArcTanh[
  Sqrt[1 - kappa^2]])/(1 - kappa^2)^(3/2)

3 kappa^2 edd (((lambda^2/2) -1 ) fs[kappa]/(1 - kappa^2) - 
 1) + (edd - 1) (kappa^2 - lambda^2) == 0

Original plotting

$\endgroup$
  • 1
    $\begingroup$ Mathematica code would increase your chance to get help... $\endgroup$ – Ulrich Neumann Dec 29 '17 at 12:08
  • $\begingroup$ I really do not know how to work with transcendental equations. I tried to use a SOLVE, but it did not work. $\endgroup$ – Dinesh Shankar Dec 29 '17 at 12:17
  • $\begingroup$ If you make the code of your equations available, answering and helping would be easier ... $\endgroup$ – Ulrich Neumann Dec 29 '17 at 12:21
  • $\begingroup$ Sorry, my mistake. I already fixed it. $\endgroup$ – Dinesh Shankar Dec 29 '17 at 14:12
  • 1
    $\begingroup$ you have a typo in your fs expression. @anderstood answer is correct and produces the plot in the paper if you fix that. $\endgroup$ – george2079 Dec 29 '17 at 15:43
5
$\begingroup$

Use ContourPlot.

fs[kappa_] := (1 + 2 kappa^2)/(1 - 
 kappa^2) - (3 kappa^2 ArcTanh[Sqrt[1 - kappa^2]])/(1 - 
  kappa^2)^(3/2)

zero[kappa_, edd_, lambda_] = 
3 kappa edd (((lambda^2/2) + 1) fs[kappa]/(1 - kappa^2) - 
  1) + (edd - 1) (kappa^2 - lambda^2);

Show[{ContourPlot[
Evaluate@
Table[zero[kappa, edd, lambda] == 0, {lambda, 0, 2, 1/3}], {edd, 
0, 1.8}, {kappa, 0, 2}, FrameLabel -> Automatic, 
AspectRatio -> 6/10], 
ContourPlot[edd + 1, {edd, 0, 1.8}, {kappa, 0, 2}, 
FrameLabel -> Automatic, AspectRatio -> 6/10, 
RegionFunction -> Function[{x, y, z}, 1 < x < 2], 
ContourStyle -> {Directive[Lighter[Red, 0.8], Dashed]}, 
Contours -> 100, ContourShading -> None], 
ContourPlot[edd + 1, {edd, 0, 1.8}, {kappa, 0, 2}, 
FrameLabel -> Automatic, AspectRatio -> 6/10, 
RegionFunction -> Function[{x, y, z}, (x - 2)^2 + (y)^2 < 1], 
ContourStyle -> {Directive[Lighter[Blue, 0.7], Dashed]}, 
Contours -> 100, ContourShading -> None]}, 
Epilog -> {Text[unstable, {1.4, 0.5}], Text[metastable, {1.4, 1.5}], 
Text[stable, {0.6, 1.8}]}]

enter image description here

$\endgroup$
  • $\begingroup$ @MariuszIwaniuk Thanks for your edit! $\endgroup$ – anderstood Dec 29 '17 at 17:42
4
$\begingroup$

You consider four equations[lamda=1,2,3,4] in epsdd and kappa. It is very easy to solve for epsdd=f[kappa;lamda]. The four solutions can be plotted for different lamda with

ParametricPlot[{f[kappa;lamda],kappa},{kappa,...}]

if you know the kappa-range!

solution(with MMA-code offered) and the corrected formulas:

fs[kappa_] := (1 + 2 kappa^2)/(1 -kappa^2) - (3 kappa^2 ArcTanh[Sqrt[1 - kappa^2]])/(1 -kappa^2)^(3/2)
gl = 3 kappa edd (((lambda^2/2) + 1) fs[kappa]/(1 - kappa^2) -1) + (edd - 1) (kappa^2 - lambda^2) == 0

ergedd =  Solve[gl, edd][[1]] (* implicit soulution *)
(* {edd -> (kappa^2 - lambda^2)/(kappa^2 - lambda^2 + 
3 kappa (-1 + ((1 + lambda^2/2) ((1 + 2 kappa^2)/(1 - kappa^2) - 
(3 kappa^2 ArcTanh[Sqrt[1 - kappa^2]])/(1 - kappa^2)^(3/2)))/(1-kappa^2)))} *)


Show[Table[
ParametricPlot[  {edd /. ergedd, kappa} , {kappa, 0, lambda}, 
PlotStyle -> RGBColor[lambda/4, 0, 1 - lambda/4]]  , {lambda, 1, 
4}]
, AspectRatio -> 1 ,PlotRange->{0,4}]

the result is as expected: enter image description here

$\endgroup$
  • $\begingroup$ I want $\kappa(\epsilon_{dd})$. $\endgroup$ – Dinesh Shankar Dec 29 '17 at 12:18
  • $\begingroup$ You wanted to plot the solution, ParametricPlot does it! Looking for an explicit solution of your equations is a much harder effort. Perhaps you can approximate the implicit solution epsd=f[kappa]... $\endgroup$ – Ulrich Neumann Dec 29 '17 at 12:26
  • $\begingroup$ I just modified the equation. However, the code does not compile. $\endgroup$ – Dinesh Shankar Dec 29 '17 at 14:04
  • $\begingroup$ this also produces the paper plot if you get the expressions correct. $\endgroup$ – george2079 Dec 29 '17 at 15:57
  • $\begingroup$ could you show your graph? $\endgroup$ – Dinesh Shankar Dec 29 '17 at 20:01

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.