Skip to main content
added 268 characters in body
Source Link
Ulrich Neumann
  • 56.8k
  • 2
  • 26
  • 60

A numerical solution could beIf you know the parameterranges, ContourPlot3D easily shows possible solutions

ContourPlot3D[a Tanh[z - b] == z, {a, 0, 1}, {b, 0, 5}, {z, -1, 0},AxesLabel -> {a, b, z}]    

enter image description here

numerical solution

solN[a_?NumericQ, b_?NumericQ] :=z /. NSolve[{a Tanh[z - b] == z, -5 < z < 5}, z][[1]]  (*needs a z-range*)
solN[1/Pi, E] 
(* -0.316842 *)

or

sol[a_?NumericQ, b_?NumericQ] :=z /. NMinimize[{1, a Tanh[z - b] == z}, z][[2]]
sol[1/Pi, E]
(* -0.316842 *)

A numerical solution could be

solN[a_?NumericQ, b_?NumericQ] :=z /. NSolve[{a Tanh[z - b] == z, -5 < z < 5}, z][[1]]  (*needs a z-range*)
solN[1/Pi, E] 
(* -0.316842 *)

or

sol[a_?NumericQ, b_?NumericQ] :=z /. NMinimize[{1, a Tanh[z - b] == z}, z][[2]]
sol[1/Pi, E]
(* -0.316842 *)

If you know the parameterranges, ContourPlot3D easily shows possible solutions

ContourPlot3D[a Tanh[z - b] == z, {a, 0, 1}, {b, 0, 5}, {z, -1, 0},AxesLabel -> {a, b, z}]    

enter image description here

numerical solution

solN[a_?NumericQ, b_?NumericQ] :=z /. NSolve[{a Tanh[z - b] == z, -5 < z < 5}, z][[1]]  (*needs a z-range*)
solN[1/Pi, E] 
(* -0.316842 *)

or

sol[a_?NumericQ, b_?NumericQ] :=z /. NMinimize[{1, a Tanh[z - b] == z}, z][[2]]
sol[1/Pi, E]
(* -0.316842 *)
Source Link
Ulrich Neumann
  • 56.8k
  • 2
  • 26
  • 60

A numerical solution could be

solN[a_?NumericQ, b_?NumericQ] :=z /. NSolve[{a Tanh[z - b] == z, -5 < z < 5}, z][[1]]  (*needs a z-range*)
solN[1/Pi, E] 
(* -0.316842 *)

or

sol[a_?NumericQ, b_?NumericQ] :=z /. NMinimize[{1, a Tanh[z - b] == z}, z][[2]]
sol[1/Pi, E]
(* -0.316842 *)