# Choosing min/max values of transcendental equation

With help from here, I have succeeded in plotting the equation z = -a Log[2 Cosh[(2 f[x] + x)/a]], with f[x] being defined by the transcendental equation f[x] = Tanh[(2 f[x] + x)/a. However, for a < 2 each x in the vicinity of 0 has up to three possible values of y as a soultion.

f[x_] := y /. FindRoot[y == Tanh[(2 y + x)/1.5], {y, 0}]
p1 = Plot[-1.5 Log[2 Cosh[(2 f[x] + x)/1.5]], {x, -1.5, 1.5}];
Show[p1,  PlotRange -> {{-1.5, 1.5}, {-3.1, -0.9}},  AspectRatio -> Automatic]


I know that y = Tanh[(2 y + x)/1.5] is supposed to have a jump-discontinuity for x = 0, and be one-to-one everywhere else.

So, how do I make Mathematica use only the minimum values of

  y = Tanh[(2 y + x)/1.5] for x ∈ [-∞, 0]


and maximum values of

  y = Tanh[(2 y + x)/1.5] for x ∈ [0, ∞]


when I plot

z = -1.5 Log[2 Cosh[(2 y + x)/1.5]]


?

Have you tried this:

f[x_] := y /. Which[x <= 0, FindRoot[y == Tanh[(2 y + x)/1.5], {y, -5}], x > 0,FindRoot[y == Tanh[(2 y + x)/1.5], {y, 5}]]
p1 = Plot[-1.5 Log[2 Cosh[(2 f[x] + x)/1.5]], {x, -1.5, 1.5}];
Show[p1, PlotRange -> {{-1.5, 1.5}, {-3.1, -0.9}},AspectRatio -> Automatic]


It gives this:

Which is not a jump discontinuity, but a discontinuity in its derivative.

• Thank you very much - that was exactly what I was looking for! :) And no, that is not a jump discontinuity - it is y = Tanh[(2 y + x)/1.5] that has a jump discontinuity in x = 0. – Nielsen May 27 '13 at 13:51