Skip to main content

Elliptic: 0≤x,y≤3 boundary

Short answer

Using standard five-point finite difference formula for Laplace's equation, solved by Gauss-Seidal iteration. Converged interior values: u(1,2)=61.2500, u(2,2)=43.7500, u(1,1)=41.2500, u(2,1)=23.7500.

Solve the elliptic equation uxx + uyy = 0 on the square mesh bounded by 0 ≤ x ≤ 3, 0 ≤ y ≤ 3. The boundary values are u(x, 0) = 10, u(x, 3) = 90, 0 ≤ x ≤ 3 and u(0, y) = 70, u(3, y) = 0, 0 < y < 3.

With h = 1 the interior points are (1,1), (2,1), (1,2), (2,2). Name them u₁ = u(1,2), u₂ = u(2,2), u₃ = u(1,1), u₄ = u(2,1) (y increases upward). For Laplace's equation ∇²u = 0 on a square mesh, each interior value equals the mean of its four neighbours (standard five-point formula):

u(i,j) = ¼[u(i−1,j) + u(i+1,j) + u(i,j−1) + u(i,j+1)]

Boundary values: top (y = 3) = 90, bottom (y = 0) = 10, left (x = 0) = 70, right (x = 3) = 0.

Equations

u₁ = ¼(160 + u₂ + u₃)
u₂ = ¼(90 + u₁ + u₄)
u₃ = ¼(80 + u₁ + u₄)
u₄ = ¼(10 + u₂ + u₃)

Iteration (Gauss–Seidel / Liebmann)

Initial value 42 for every unknown (close to the mean of the boundary values); each new value is used at once in the next equation.

iterationu₁u₂u₃u₄
042.000042.000042.000042.0000
161.000048.250045.750026.0000
263.500044.875042.375024.3125
361.812544.031241.531223.8906
461.390643.820341.320323.7852
561.285243.767641.267623.7588
661.258843.754441.254423.7522
761.252243.751141.251123.7505
861.250543.750341.250323.7501
961.250143.750141.250123.7500
1061.250043.750041.250023.7500
1161.250043.750041.250023.7500

Converged to 4 decimals after 11 iterations.

Direct solution of the equations (check)

u₁ = 61.2500
u₂ = 43.7500
u₃ = 41.2500
u₄ = 23.7500

Answer: u₁ = 61.2500, u₂ = 43.7500, u₃ = 41.2500, u₄ = 23.7500

✓ Answer checked by Claude Opus 5.5 (high effort)

All Numerical Method chapter 7 questions →