I want to solve a differential equation like:

NDSolve[{F w[x]/EI == w''[x]/(1 + w'[x]^2)^(3/2), w'[0] == 0, w[0.01/2] == 0} /. {EI -> 0.00012, F -> 0.01}, w, {x, 0, 0.01/2}, Method -> {"Shooting", "StartingInitialConditions" -> {w[0] == 0.08}}]

However, it just returns a copy of itself without any error information.

I have tried some other initial points:

Map[First[NDSolve[{F w[x]/EI == w''[x]/(1 + w'[x]^2)^(3/2), w'[0] == 0, w[0.01/2] == 0} /. {EI -> 0.00012, F -> 0.01}, w, {x, 0, 0.01/2}, Method -> {"Shooting", "StartingInitialConditions" -> {w[0] == #}}]] &, Range[0, 0.1, 0.01]]

A few of them work well.

Please help~

Following @bmf suggestion.

The equation describes the bending deformation of a slender beam. The bending moment equals F w[x] where w[x] is the deflection of the beam. w''[x]/(1 + w'[x]^2)^(3/2) is the curvature of the beam, and EI is the bending stiffness. As we compress a slender beam, w[x]==0 is definitely a solution, but when the beam bends a little, I think there is another equilibrium state.

It's a buckling problem. Detail: https://en.wikipedia.org/wiki/Euler%27s_critical_load

When I changed the curvature expression as @Ulrich suggested, everything just worked!

But still, I don't understand why NDSolve would return an unevaluated result without any error information in some conditions.

  • 1
    $\begingroup$ A solution to your ODE is w[x] = 0, and I do not believe that there are any others for the boundary conditions specified. Perhaps, this is why the "Shooting" Method is causing problems. $\endgroup$
    – bbgodfrey
    Jan 31 at 5:20
  • $\begingroup$ Actually, I realize that nobody welcomed you here properly. Better late than never, so... $\endgroup$
    – bmf
    Jan 31 at 5:22
  • 1
    $\begingroup$ Welcome to Mathematica S.E. To start: 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, since the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) consider accepting the answer, if any, that solves your problem, by clicking checkmark sign, 4) give help too, by answering questions in your areas of expertise. $\endgroup$
    – bmf
    Jan 31 at 5:22
  • $\begingroup$ @ddwell ok, thanks for the feedback, but I don't want to spam the comments section below the suggested answer. I see there's some confusion. can you back to your post and describe the D.E with mathematical equations? you can leave the code as it is, just write down the D.E and the conditions in TeX form please $\endgroup$
    – bmf
    Jan 31 at 5:34
  • 1
    $\begingroup$ Check the expression for the curvature! It should be w''[x]/(1 + w'[x]^2)^(3/2) I think $\endgroup$ Jan 31 at 8:23

1 Answer 1


The value for L is missing, once assigned then it can be solved without any problem.

L = 1;
NDSolve[{F w[x]/EI == w''[x]/(1 + w'[x])^(3/2), w[0] == 0.08, 
   w[L/2] == 0} /. {EI -> 0.00012, F -> 0.01}, w, {x, 0, L/2}]
Plot[w[x] /. %, {x, 0, L/2}]

enter image description here

It seems there isn't a meaning solution for w'[0]=0, to explore it further we can use the 'ParametricNDSolveValue' to look for a nontrival solution. For this I have used the condition w'[0]=w0, where 'w0' is in the interval [-1,1].

L = 0.01;
sol = ParametricNDSolveValue[{F w[x]/EI == w''[x]/(1 + w'[x])^(3/2), 
    w'[0] == w0, w[L/2] == 0} /. {EI -> 0.00012, F -> 0.01}, w, {x, 0, L/2}, {w0}]

Plot[Evaluate[Table[sol[w0][x], {w0, -1, 1, .1}]], {x, 0, L/2}, 
 PlotRange -> All]

enter image description here

After OP's correction

    L = 0.01;
    sol = ParametricNDSolveValue[{F w[x]/EI == w''[x]/(1 + w'[x]^2)^(3/2),
         w'[0] == w0, w[L/2] == 0} /. {EI -> 0.00012, F -> 0.01}, 
      w, {x, 0, L/2}, {w0}]
Plot[Evaluate[sol[0][x]], {x, 0, L/2}, PlotRange -> All]

enter image description here

You can't call this an "unevaluated result" becasue NDSolve produces an ouput with that particular set of conditions but the solution seems to be trivial.

  • $\begingroup$ Sorry for that. I have correct L. Please review it $\endgroup$
    – ddwell
    Jan 31 at 3:57
  • $\begingroup$ @ddwell Just change the value of L in my response. $\endgroup$
    – zhk
    Jan 31 at 3:58
  • $\begingroup$ In my case L = 0.01(as I have corrected in my question), and it doesn't work. $\endgroup$
    – ddwell
    Jan 31 at 4:02
  • $\begingroup$ @ddwell I think the approach that zhk is suggesting in this answer works and this is why I upvoted. There seems to be a typo in the answer w'[0] == 0. Perhaps there was some confusion with the edits in the OP or something. I am attaching a screenshot to show that it works nicely. $\endgroup$
    – bmf
    Jan 31 at 4:55
  • $\begingroup$ @bmf But, my initial condition is exactly w'[x]==0, and my assumpted initial condition for shooting is w[x]==0.08. Therefore the result @zhk gave is wrong (sorry, I mean no offense). $\endgroup$
    – ddwell
    Jan 31 at 5:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.