As Lukas Lang he said it can't be found analytical solution for your equation,only numerically.
I assume M
value. M
is in range 1..5
and has values:
Table[M, {M, 1, 5, 1/2}] // N
(* {1., 1.5, 2., 2.5, 3., 3.5, 4., 4.5, 5.} *)
func[x_, β_, M_] := 1/M + (E^(M (1 - x) β)M (-E^(-M (1 - x) β) + 1/M - x β))/β
ContourPlot[Evaluate@Table[func[x, β, M] == 0, {M, 1, 5, 1/2}], {β, 0, 1}, {x, 0, 1},
FrameLabel -> Automatic, PlotLegends -> {"M=1", "M=1.5", "M=2", "M=2.5", "M=3", "M=3.5",
"M=4", "M=4.5", "M=5"}]

I will use Bill code with little improved by me.It's slow and give artifacts!.Just for the curiosity and comparison.
expr = ((M*Exp[β*M (1 - x)])/β)*((1/M) - β*x - Exp[-β*M (1 - x)]) + (1/M);
ListLinePlot[Table[Map[{β, x} /. # &, Map[Last, Select[Table[
NMinimize[{Norm[expr], x == j, β >= 0}, {β, x},
Method -> "NelderMead"], {j, 1/100, 1, 1/100}], #[[1]] <
10^-5 &]]], {M, 1, 5, 1/2}], PlotRange -> {{0, 1}, {0, 1}},
PlotLabels -> {"M=1", "M=1.5", "M=2", "M=2.5", "M=3", "M=3.5",
"M=4", "M=4.5", "M=5"}, AxesLabel -> {"β", "x[β]"}, AspectRatio -> 1] // Quiet

EDITED: 02.07.2018
Approximate solution by series at point x=1/2
of order 3
.
eq = ((M*Exp[β*M*(1 - x)])/β)*((1/M) - β*x - Exp[-β*M*(1 - x)]) + (1/M);
eq1 = Series[((M*Exp[β*M*(1 - x)])/β)*((1/M) - β*x -Exp[-β*M*(1 - x)]) +
(1/M), {x, 1/2, 3}] // Normal
sol = x /. Solve[eq1 == 0, x];(*Only first solution !!! *)
Plot[Evaluate@Table[sol[[1]], {M, 1, 5, 1/2}], {β, 0, 1},
PlotRange -> {{0, 1}, {0, 1}},
PlotLabels -> {"M=1", "M=1.5", "M=2", "M=2.5", "M=3", "M=3.5", "M=4",
"M=4.5", "M=5"}, AxesLabel -> {"β", "x[β]"}, AspectRatio -> 1]

expr = ((M*Exp[β*M (1 - x)])/β)*((1/M) - β*x - Exp[-β*M (1 - x)]) + (1/M); ListPlot[Map[{x, β} /.#&, Map[Last,Select[Table[ NMinimize[{Norm[ expr], x == j, β >= 0, M > 0}, {x, β, M}], {j, .02, .98, .02}], #[[1]] < 10^-6 &]]]]
It complains about zero denominators but then selects solutions and plots x versus β. $\endgroup$ – Bill Jul 1 '18 at 16:28NSolve
, you'll have to specify numeric values for all variables (exceptx
, of course) $\endgroup$ – Lukas Lang Jul 1 '18 at 16:49Solve
is satisfactory, despite the warning. $\endgroup$ – Michael E2 Jul 2 '18 at 0:40