# Plotting a transcendental equation [duplicate]

I would like to get this graphic:

from this article. Here $$\kappa$$ and $$\varepsilon_{dd}$$ are related by:

ekappa[k_, edd_, l_] :=
3*k*edd ((l^2/2 + 1) fs[k]/(1 - k^2) - 1) + (edd - 1) (k^2 - l^2)


where $$f_s(\kappa)$$ is given by:

fs[k_] := (1 + 2 k^2)/(1 - k^2) -
3 k^2*ArcTanh[Sqrt[1 - k^2]]/(1 - k^2)^(3/2)


Here is my attempt:

g[edd_?NumericQ] := FindRoot[ekappa[k, edd, 0.5], {k, 0}]
Plot[g[edd], {edd, 0, 1.6}]


but I do not get the graphic. Could you help me?

It looks like k=1 will give you a problem, as well as any k>1. Therefore I would change the starting value and search region for k in FindRoot.

g[edd_?NumericQ] := FindRoot[ekappa[k, edd, 0.5], {k, 0.5, 0.01, 0.99}]


Notice that this returns a rule, rather than a value:

g[1]


{k -> 0.174197}

One way to get around this is to plot k/.g[edd]

Plot[k /. g[edd], {edd, 0, 1.6}]


An alternative is to redefine g to return a value

g2[edd_?NumericQ] := FindRoot[ekappa[k, edd, 0.5], {k, 0.5, 0.01, 0.99}][[1, 2]]
g2[1]


0.174197

Plot[g2[edd], {edd, 0, 1.6}]