Solving Boundary Value Problem using the Finite Difference Method – What Values to Substitute for $y’$

boundary value problemcalculusfinite difference methodsnumerical methodsordinary differential equations

I am given a boundary value problem of the form $y'' = f(y', y, x)$ and asked to solve the system subject to boundary conditions using the finite difference method.

I proceed to develop a system of equations with each equation representing the equation for a given node. If I use node $x_1$ as an example, I know that I have to:

Replace all instances of $y''$ with $\dfrac{y_0 – 2y_1+y_2}{h^2}$

Replace all instances of $y$ with $y_1$

My question is, what do I replace the instance(s) of $y'$ with?

Best Answer

To remain second order in the space approximation, you would use the central difference quotient. You would then subtract a linear approximation of the right side from both sides, so that you get an iterative fixed-point scheme $A\vec y^{\rm new}=G(\vec y^{\rm old})$, where $\vec y$ is the vector of sample points. Ideally this would be Newton-like so that you get super-linear convergence.

If you want to generalize this scheme you get to a multiple shooting approach with a collocation method, which is for first order systems, so set $v=y'$, $v'=f(v,y,x)$. Staying in second order this would be the implicit trapezoidal method, \begin{align} \frac{y_{i+1}-y_i}{\Delta x}&=\frac{v_{i+1}+v_i}2\\ \frac{v_{i+1}-v_i}{\Delta x}&=\frac{f(v_{i+1},x_{i+1},v_{i+1})+f(v_i,y_i,x_i)}2\\ \end{align} You could also try to base your system on Numerov's method (wiki)

Related Question