2
$\begingroup$

I have this equation $$\coth (2 x )=x $$ and I want to solve it to find $x$. The methods Solve and Reduce do not work.

Coth[2 x] == x

$\endgroup$
5
$\begingroup$
  Plot[{Coth[2 x], x}, {x, -3 Pi, 3 Pi}]

Mathematica graphics

Therefore

 Solve[{Coth[2 x] == x, -2 Pi < x < 2 Pi}, x] // N

 (* {{x -> -1.03267}, {x -> 1.03267}} *)

This also works

  Solve[Coth[2 x] == x, x, Reals] // N

(* {{x -> -1.03267}, {x -> 1.03267}} *)

Keeping domain complex (i.e. function values can be complex), but telling it variables are real also works

  Solve[Coth[2 x] == x && Element[x, Reals], x]

Mathematica graphics

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks. Why it does not work without giving domain? $\endgroup$ – user73730 Jul 10 at 23:03
  • 2
    $\begingroup$ @Sasha1988 from help, it says default assumes domain is complex (so variables and function values can be complex). When setting domain to real, then it tells Solve that variables and function values are reals. This causes it to be able to solve it. Must be related to what algorithms it chooses internally depending on domain. $\endgroup$ – Nasser Jul 10 at 23:12
  • 1
    $\begingroup$ @Sasha1988 It has to do with advances in the mathematics of analytic functions over compact domains in the last couple of decades or so. If you don't use // N, you get expressions that represent the exact roots, which can be evaluated to arbitrary precision. For more complex solutions, try Solve[{Coth[2 x] == x, -2 Pi < Re@x < 2 Pi, -2 Pi < Im@x < 2 Pi}, x] $\endgroup$ – Michael E2 Jul 10 at 23:13
4
$\begingroup$

Another way to do it as a FixedPoint numerical method:

FixedPoint[Coth[2 #] &,  0.1] (*  1.03267 *)
FixedPoint[Coth[2 #] &, -0.1] (* -1.03267 *)
| improve this answer | |
$\endgroup$