4.8.28 · D1Numerical Methods

Foundations — Boundary value problems — shooting method, finite difference

3,387 words15 min readBack to topic

Before you can read a single line of the parent note, you need to own every symbol it throws at you. We build them one at a time, each from the picture it names.


1. The independent variable and the interval

Picture a ruler laid flat. The left tick is , the right tick is . Everything we do lives on this ruler.

Figure 1 — the interval on a ruler. A plain horizontal ruler for the interval : the left tick marked and the right tick marked in plum, with the shaded band between them (teal) showing "every position we care about lives here." No curve or heights yet — those symbols arrive in Sections 2 and 3.

Figure — Boundary value problems — shooting method, finite difference

Why the topic needs it: a BVP is about what happens between two ends. Those two ends are exactly and .


2. The function and its value

Why the topic needs it: the parent writes and . Those are just "the rope's left height" and "the rope's right height."


3. The Greek letters , , ,

Figure 2 — the pinned-end picture. Now that , and are defined, a teal curve is stretched over the ruler , with orange dots nailing its left end () and right end (); the two ends are marked by plum dashed lines at and .

Figure — Boundary value problems — shooting method, finite difference

Why the topic needs it: the whole difference between an IVP and a BVP is where these numbers live. Same at the left, but a BVP pins at the far end while an IVP pins the slope at the same end.


4. The derivative — slope

The prime mark just means "the slope of." Read as "y-prime."

Figure 3 — the derivative as a tangent's steepness. A teal curve with an orange tangent arrow touching it at one plum point; a small plum dotted "rise over run" triangle shows that is exactly that rise divided by that run.

Figure — Boundary value problems — shooting method, finite difference

Why the topic needs it: shooting guesses (the launch angle). If you have never pictured a slope as the steepness of a tangent arrow, the phrase "guess the missing slope" is meaningless.

Recall What does the prime in

mean, in one word? Slope ::: the steepness of the tangent arrow to the curve.


5. The second derivative — curvature

Why the topic needs it: every BVP the parent studies is a second-order ODE — the governing law is written in terms of . The finite-difference method's core trick is turning into arithmetic on three dots.


6. Higher derivatives , and

Why the topic needs it: the parent's Taylor expansion contains and in its remainder terms. Those terms are what decide the order of accuracy (), so you must know they are simply "slopes-of-slopes-of-slopes."

Recall What does the notation

mean? The third derivative ::: take "the slope of" three times; same as .


7. The differential equation

Think of it as a law of physics saying: at every point, the amount you bend is dictated by where you are and how you're leaning. The rope is not free — it must satisfy this rule at all of its infinitely many points at once.

Why the topic needs it: this is the problem. Both methods exist only to find the rope obeying this rule and the two end conditions.


8. Linear vs nonlinear —

Why the topic needs it: the parent splits its whole treatment on this word — the "2-shot shortcut" and the tridiagonal setup both require the linear form.

Recall Spot the nonlinear one:

vs . The second ::: multiplies two unknowns together, so it is nonlinear; the first is linear.


9. The grid: , , , , and subscripts

Figure 4 — the rope becomes a beaded necklace. The faint teal true rope with orange beads sitting at ticks ; the two plum end-beads are the fixed boundary values, the orange interior beads are the unknowns, and a labelled bracket shows the step .

Figure — Boundary value problems — shooting method, finite difference

Why the topic needs it: every finite-difference formula is written with — a bead and its two neighbours. Subscripts are the language of the method.


10. Taylor series — the tool that builds the stencils

Why the topic needs it: the central-difference stencils and are derived from Taylor. Without Taylor they look like magic.


11. Big-O and order of accuracy:

Figure 5 — order of accuracy as a straight line on log–log paper. Error plotted against step size with both axes on a log scale: a first-order method (teal) falls along a line of slope 1, while a second-order method (orange) falls twice as steeply, slope 2 — halving shifts the orange dot down by a factor of 4.

Figure — Boundary value problems — shooting method, finite difference

Why the topic needs it: "second-order" is the parent's headline accuracy claim, and the reason it warns against the cheaper forward difference. See Truncation error and order of accuracy.

Recall If a scheme is

and you cut in half, by what factor does the error fall? By 4 ::: because .


12. Root finding: , the notation , and the secant idea

Figure 6 — the secant method finding the root of . The miss-curve plotted against the guessed slope ; two orange tried points are joined by a plum secant line, and where that line crosses the horizontal axis (teal) is the next, better guess — repeat and you march onto the root .

Figure — Boundary value problems — shooting method, finite difference

Why the topic needs it: shooting is root finding stacked on an IVP solver — this vocabulary is half the method.


13. Marching, IVP solvers, and the tridiagonal system

Figure 7 — the tridiagonal system laid out. The matrix shown with only three shaded stripes (orange diagonal, teal off-diagonals) and zeros elsewhere; the vector of unknown interior heights ; and the right-hand vector whose first and last entries carry the plum boundary values .

Figure — Boundary value problems — shooting method, finite difference

Why the topic needs it: shooting reuses marching (RK4); finite difference produces this tridiagonal . Knowing what , and hold is essential to reading the parent's setup.


Prerequisite map

x and interval a to b

y of x the curve

first derivative slope

second derivative curvature

higher derivatives y triple prime

ODE the rule f

linear form p q r

Boundary Value Problem

Taylor series

difference stencils

grid h N x_i y_i

order of accuracy O h squared

Finite Difference route

root finding secant

Shooting route

IVP solver RK4

tridiagonal Thomas Ay=d


Equipment checklist

Cover the right side and test yourself. If any answer is fuzzy, revisit its section above before opening the parent note.

What does mean in the rope picture?
The rope's left end is nailed at height .
What does the prime in measure geometrically?
The steepness of the tangent arrow — the slope of the curve.
What does tell you about the rope's shape?
How it bends: smiles up, frowns, is straight.
What does (or ) mean?
Take "the slope of" three times — how fast the curvature itself is changing.
What precisely is in ?
A known smooth function of three inputs that returns the required curvature .
Why is a linear ODE special for shooting?
The landing height is a straight-line function of the guessed slope, so two shots pin it exactly.
In , what is and what is ?
is a subscript address (the -th tick); is the step width .
Which nodes are unknown in FDM and which are fixed?
Interior nodes are unknown; and are fixed.
What single tool turns derivatives into arithmetic on neighbours?
The Taylor series.
If a method is , halving changes the error how?
It falls by a factor of 4.
What does denote?
The landing height at from solving the IVP with and guessed slope .
What does represent in shooting?
The guessed slope produces zero miss — the shot lands exactly on the target .
What are the sizes of , , for pieces?
is tridiagonal; and are length .
Why is the FDM matrix tridiagonal?
Each bead's equation involves only itself and its two immediate neighbours.
In , what do and hold?
is the unknown interior heights; is the forcing plus the moved-over boundary values.