I'm trying to solve the following very simple differential equation, but it seems Mathematica cannot give me an answer,

FullSimplify[DSolve[{y''[x] == 2 A Sinh[B y[x]], y[0] == W, y[L] == W}, y[x], x]]

Any thoughts? Thanks!


2 Answers 2


When I try I get warnings about not being able to solve with the given conditions. So for a start, try solving without conditions.

sol = DSolve[{y''[x] == 2 A Sinh[B y[x]]}, y[x], x] // Flatten

You get two solutions involving JacobiAmplitude. Setting the two solutions:

y1[x_] = y[x] /. sol[[1]] /. {C[1] -> c1, C[2] -> c2}

y2[x_] = y[x] /. sol[[2]] /. {C[1] -> c1, C[2] -> c2}

Theoretically you can solve for c1 and c2 by plugging in your conditions, but you get transcendental equations that MMa cannot solve. If you provide values for A, B and W, you can probably find numerical solutions for the c's with FindRoot or NSolve.


Use a numeric approach

L = 5;

eqns = {y''[x] == 2 A Sinh[B y[x]], y[0] == W, y[L] == W};

sol = ParametricNDSolve[eqns, y, {x, 0, L}, {A, B, W}];

y[A, B, W][x] /. {A -> 1, B -> 1, W -> 3/4, x -> 3} /. sol

(* 0.0544074 *)

Plot3D[y[1, 1, W][x] /. sol, {x, 0, L}, {W, -1, 1},
 AxesLabel -> (Style[#, 14, Bold] & /@ {"x", "W", "y"}),
 ClippingStyle -> None,
 ColorFunction -> "TemperatureMap",
 PlotLegends -> Automatic]

enter image description here


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.