Forward difference. From (A), solve for ui′:
ui′=hui+1−ui−2hui′′−…⇒ui′≈hui+1−uiWhy this step? We isolate ui′ and drop everything multiplied by h or higher; the first dropped term is O(h), so this is first-order accurate, error ∼h.
Backward difference. From (B): ui′≈hui−ui−1, also O(h).
Central difference. Subtract (B) from (A). The even-power (ui′′) terms cancel:
u(xi+h)−u(xi−h)=2hui′+3h3ui′′′+…⇒ui′≈2hui+1−ui−1,error O(h2).Why this step? Cancelling the u′′ term is why central is one order more accurate for the same grid — a free upgrade.
Step 1 — Forward in time at node (i,n):ut≈kuin+1−uin.Why? Forward in time means the new value uin+1 appears alone — we can solve for it explicitly without inverting a matrix.
Step 2 — Central in space:uxx≈h2ui+1n−2uin+ui−1n.Why? Best accuracy (O(h2)) at no extra cost.
Step 3 — Substitute into the PDE and rearrange:kuin+1−uin=αh2ui+1n−2uin+ui−1nuin+1=uin+r(ui+1n−2uin+ui−1n),r=h2αk.Why this step? Everything on the right is at the known time level n, so we march forward in time, one row at a time. This is FTCS (Forward-Time Central-Space) and it is explicit.
Solve u′′=f(x) on [0,1] with u(0)=u(1)=0, using h=0.25 (so interior nodes x1,x2,x3), f≡−2.
Step 1 — Discretise:h2ui+1−2ui+ui−1=fi.
Why? Replace the only derivative present by the central second-difference.
Step 2 — Write equations for each interior node (u0=u4=0, h2=0.0625, fih2=−0.125):
−2u1+u2=−0.125,u1−2u2+u3=−0.125,u2−2u3=−0.125.Why this step? The boundary values are known constants, so they move to the right-hand side. We get a small linear systemAu=b with the tridiagonal matrix
A=−2101−2101−2.
Step 3 — Solve. By symmetry u1=u3. From eq.1: u2=2u1−0.125. Sub into eq.2: u1−2(2u1−0.125)+u1=−0.125⇒−2u1+0.25=−0.125⇒u1=0.1875. Then u2=0.25.
Check: exact solution of u′′=−2,u(0)=u(1)=0 is u=x(1−x); at x=0.25,0.5 it gives 0.1875,0.25 — exact, because the true solution is a quadratic and the central scheme is exact for cubics.
Recall Feynman: explain it to a 12-year-old
Imagine a curve drawn on graph paper. You only mark dots where the grid lines cross. To guess how steep the curve is at a dot, you look at the dot just left and just right and ask "how much did the height change between them?" — that's a slope-from-neighbours. To guess how much it bends, you compare the middle dot to the average of its two neighbours. The whole "finite difference" idea is just: don't measure slopes and bends exactly — estimate them from nearby dots. The closer the dots (smaller h), the better the guess. The danger: if you step forward in time too greedily, your guesses pile up errors and the picture explodes.
Dekho, computer ke paas infinite memory nahi hai, toh woh poore continuous function u(x,t) ko store nahi kar sakta. Isliye hum domain ko ek grid mein chop kar dete hain — sirf grid points pe values rakhte hain: uin, jahan subscript i space hai aur superscript n time hai. Ab PDE mein jo derivatives hain, unko hum Taylor expansion se banaye gaye "difference quotients" se replace kar dete hain. Bas yahi pura khel hai — derivative ko nearby points ke difference se approximate karna.
Taylor se teen cheezein nikalti hain jo ratta maar lo: forward difference hui+1−ui (accuracy O(h)), central difference 2hui+1−ui−1 (accuracy O(h2), kyunki symmetric subtract karne se u′′ term cancel ho jaata hai — yeh free upgrade hai), aur second derivative h2ui+1−2ui+ui−1. O(h2) ka matlab: h aadha karo toh error ek-chauthai ho jaata hai — bahut powerful.
Heat equation ut=αuxx ke liye FTCS scheme banega: uin+1=uin+r(ui+1n−2uin+ui−1n), jahan r=αk/h2. Isme right side sab known time level pe hai, toh aage march karte jao. Lekin ek trap hai: yeh tabhi stable hai jab r≤21. Agar h chhota karoge toh k ko h2 ki tarah aur chhota karna padega, warna solution oscillate karke explode ho jaayega.
Aur jab BVP type problem ho jaise u′′=f, toh discretise karne par ek tridiagonal linear systemAu=b ban jaata hai — boundary values known hain isliye unhe right side bhej do, aur solve kar lo. Yaad rakho: FDM = grid banao, derivatives ko differences banao, algebra solve karo, aur stability check karna mat bhoolo.