given the following ODE:

$$\frac{d^{4}w}{dx^{4}} + B\frac{d^{2}w}{dx^{2}} = 1$$

with boundary conditions $w(0) =0 , w(1) = 0,w'(0) = 0,w'(1) = 0$

its possible to solve analytically but I am attempting to solve it numerically so I can plot and see how the graph changes as I vary the parameter $B$.

in order to solve it numerically i transformed the ODE into a system of first order ODE and i obtained this system:

$$w_{1}' = w_{2}$$

$$w_{2}' = w_{3}$$

$$w_{3}' = w_{4}$$

$$w_{4}' = 1 - B \cdot w_{3}$$

where $w_{1} = w, w_{2} = w',w_{3} = w'',w_{4} = w'''$

given those boundary conditions is there a way to determine calculate the boundary conditions for $w_{3}$ and $w_{4}$ so that can can solve the system numerically?

  • $\begingroup$ Your original problem isn't an initial value problem becomes of the conditions at times t=0 and t=1. Rather, it's a boundary value problem. Thus you can't solve the problem with an IVP solver. $\endgroup$ Mar 23, 2021 at 17:22
  • $\begingroup$ so in order to solve i need to find w1,w2,w3,w4 for t=0 and t=1? $\endgroup$ Mar 23, 2021 at 17:36
  • $\begingroup$ No, four is the correct number of conditions, but you need to be using a method that can solve boundary value problems rather than initial value problems. $\endgroup$ Mar 23, 2021 at 17:44
  • $\begingroup$ @BrianBorchers do you have any material I could use to solve this? specifically in python $\endgroup$ Mar 23, 2021 at 17:51
  • 1
    $\begingroup$ You can use initial value solvers via a shooting method. Just need to formulate it that way. $\endgroup$ Mar 23, 2021 at 19:09

1 Answer 1


As mentioned in the comments, you are interested in solving a boundary value problem and not an initial value problem. Some of the most used methods are:

For this particular problem the Ritz method might be a good choice, but in general you are better using the Finite Element Method.


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.