# Why is a part of the graph left out?

c = 0.7;
s = 1;
sol = Solve[
A == (Exp[(h + 2*c*A)/s] -
Exp[-(h + 2*c*A)/s])/(Exp[(h + 2*c*A)/s] +
Exp[-(h + 2*c*A)/s]), A, Reals];
Plot[Evaluate[A /. sol], {h, -1, 1}, Exclusions -> None]

Hi everyone,

If c becomes larger than 0.5 there is a gap in the graph. It must be a kind of s-shape. Does anyone know how to correct this?

Many thanks, Steven

• Welcome to Mathematica.SE! 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign!
– user9660
Commented Dec 15, 2016 at 12:19
• Solve gives me error messages, isn't it the case for you?
– Kuba
Commented Dec 15, 2016 at 12:40
• @Kuba Yes, but then the solve is evaluated in the plot, hence me thinking setdelayed. Commented Dec 15, 2016 at 12:41

Mindless approach:

ContourPlot[
A == (Exp[(h + 2*c*A)/s] - Exp[-(h + 2*c*A)/s])/(Exp[(h + 2*c*A)/s] +
Exp[-(h + 2*c*A)/s]),
{h, -1, 1},
{A, -1, 1}
]

Because at Abs[h]<=0.1518, there are multiple solutions:

sol[h_] :=
Solve[A == (Exp[(h + 2*c*A)/s] -
Exp[-(h + 2*c*A)/s])/(Exp[(h + 2*c*A)/s] +
Exp[-(h + 2*c*A)/s]), A, Reals];

Show[Plot[A /. sol[h], {h, -1, 1}, Exclusions -> None],
Plot[{(A /. sol[h])[[#]] & /@ {1,2, 3}}, {h, -0.1518, 0.158}]]

In this particular case, since

(Exp[(h + 2*c*A)/s] - Exp[-(h + 2*c*A)/s])/
(Exp[(h + 2*c*A)/s] + Exp[-(h + 2*c*A)/s]) // ExpToTrig

(* Tanh[(2 A c)/s + h/s] *)

the given equation is (on the assumption that all quantities are real)

h == s ArcTanh[A] - 2 c A

so that ParametricPlot may be used:

c = 0.7; s = 1;
ParametricPlot[{s ArcTanh[A] - 2 c A, A}, {A, -1, 1},
PlotRange -> {{-1.05, 1.05}, {-1.05, 1.05}}]