NSolve
gives a numerical solution, so a
and b
need to be specified; then it works.
You can get an insight into how does the solution depend on the parameters a
and b
like this:
f[a_, b_] :=
x /. NSolve[(-a*x + x^2 - b + b*x*Coth[x])*(-1 + x^2*Csch[x]^2) == 0,
x, Reals][[1]]
to produce a table
tab = Flatten[#, 1]& @
Table[{a, b, f[a, b]}, {a, 0.1, 3, 0.1}, {b, 0, 3,
0.1}]; // AbsoluteTiming
{42.2379, Null}
and plot the results
plot1 = ListDensityPlot[tab, PlotLegends -> Automatic]
(* or *)
plot2 = ListContourPlot[tab, PlotLegends -> Automatic]

Finally, you can also interpolate the results:
inter = Interpolation @ tab
inter[0.12, 2.37]
0.067048
which for this well-behaving equation works very well:
f[0.12, 2.37]
0.067048
Plot3D[inter[x, y], {x, 0.1, 3}, {y, 0, 3}]

NSolve
give a numerical solution. If you specify the values ofa
andb
it works. $\endgroup$Solve
, then, as I need a functional solution. However, this gives the same error message. $\endgroup$a
andb
). $\endgroup$