1
$\begingroup$

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]]

?

$\endgroup$
1

1 Answer 1

1
$\begingroup$

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:

f(x)

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

$\endgroup$
1
  • $\begingroup$ 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. $\endgroup$
    – Nielsen
    May 27, 2013 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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