6 Solution Of Partial Differential Equations

Numerical Method · Unit 6 · 5 hrs

Solution of Partial Differential Equations

Exam-focused notes for Solution of Partial Differential Equations (Numerical Method, CSC212): what the TU syllabus asks and how it has actually been tested, with 6 solved past questions from this unit.

Solution of Partial Differential Equations in short

A partial differential equation (PDE) involves an unknown function of two or more independent variables and its partial derivatives. This chapter reduces PDEs to a grid of algebraic equations that can be solved with the linear-system methods already developed, and applies the idea to the Laplace and Poisson equations that govern steady-state physical fields.

Solution of Partial Differential Equations: notes

Review of partial differential equations

A partial differential equation relates a function $u(x,y,\ldots)$ of two or more variables to its partial derivatives with respect to those variables, for example $\dfrac{\partial^2 u}{\partial x^2} + \dfrac{\partial^2 u}{\partial y^2} = 0$. Unlike an ordinary differential equation, whose solution is a curve, the solution of a PDE is typically a surface or field defined over a region of space (and possibly time). A PDE's order is the order of its highest partial derivative, and it is linear if the unknown function and its derivatives appear only to the first power and are not multiplied together. Three named equations recur throughout applied science: the heat (diffusion) equation $u_t = \alpha(u_{xx}+u_{yy})$, the wave equation $u_{tt} = c^2(u_{xx}+u_{yy})$, and Laplace's equation $u_{xx}+u_{yy}=0$, describing respectively how temperature spreads, how a disturbance propagates, and the steady state that a diffusing quantity settles into once it stops changing with time.

Classification of partial differential equation

A general second-order linear PDE in two variables can be written $$A,u_{xx} + B,u_{xy} + C,u_{yy} + D,u_x + E,u_y + F,u = G,$$ and is classified by the sign of its discriminant $B^2-4AC$, exactly as a conic section is classified by the analogous expression in $Ax^2+Bxy+Cy^2$:

  • Elliptic ($B^2-4AC<0$): steady-state, equilibrium problems with no preferred direction of propagation, typified by Laplace's equation ($A=C=1,B=0$, so $B^2-4AC=-4<0$) and Poisson's equation. The solution at every interior point depends on the boundary values all the way around the domain.
  • Parabolic ($B^2-4AC=0$): diffusion-type problems that evolve smoothly forward in time, typified by the heat equation.
  • Hyperbolic ($B^2-4AC>0$): wave-propagation problems with a finite signal speed, typified by the wave equation.

This chapter concentrates on the elliptic case, Laplace's and Poisson's equations, since they reduce most directly to the linear-system methods of the previous chapter.

What this unit covers

  • Review of partial differential equations
  • Classification of partial differential equation
  • Deriving difference equations
  • Laplacian equation and Poisson's equation
  • engineering examples

Laplacian equation and Poisson's equation

2081 · 5 marks

Solve the Poisson equation with boundary conditions:

$$\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} = -64xy, \quad 0 \leq x \leq 1, ; 0 \leq y \leq 1$$

$$u(0,y) = 0, ; u(x,0) = 0, ; u(1,y) = 150, ; u(x,1) = 150, ; h = \frac{1}{3}$$

[5]

PDE: $$\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} = -64xy, \quad 0 \le x \le 1,\ 0 \le y \le 1$$ So $f(x,y) = -64xy$. Boundary Conditions: - $u(0,y) = 0$ (left) - $u(x,0) = 0$ (bottom) - $u(1,y) = 150$ (right) - $u(x,1) = 150$ (top) Step size: $h = \frac{1}{3}$ --- With...

Open this answer on its own page →

2080 · 5 marks

Solve the Poisson's equation $\nabla^2 f = xy$ and $f = 2$ on boundary by assuming square domain $0 \leq x \leq 3$ and $0 \leq y \leq 3$ and $h = 1$. [5]

Show solved answer

Poisson's Equation: ∇²f = xy with f = 2 on Boundary

Given

  • PDE: $\nabla^2 f = xy$
  • Boundary condition: $f = 2$ on all boundaries
  • Domain: $0 \le x \le 3$, $0 \le y \le 3$
  • Step size: $h = 1$

Grid points at $x = 0,1,2,3$ and $y = 0,1,2,3$. Interior nodes at $(1,1),(2,1),(1,2),(2,2)$.

Solution

Finite difference form

$$f_{i-1,j} + f_{i+1,j} + f_{i,j-1} + f_{i,j+1} - 4f_{i,j} = h^2 (xy)$$

With $h = 1$, RHS $= xy$ at each node.

Grid layout

y=3:  2    2    2    2
y=2:  2   f3   f4   2
y=1:  2   f1   f2   2
y=0:  2    2    2    2
     x=0  x=1  x=2  x=3
  • $f_1 = (1,1)$, $f_2 = (2,1)$, $f_3 = (1,2)$, $f_4 = (2,2)$

Equations

f1 at (1,1), xy = 1: $$2 + f_2 + 2 + f_3 - 4f_1 = 1 \Rightarrow -4f_1 + f_2 + f_3 = -3 \quad (1)$$

f2 at (2,1), xy = 2: $$f_1 + 2 + 2 + f_4 - 4f_2 = 2 \Rightarrow f_1 - 4f_2 + f_4 = -2 \quad (2)$$

f3 at (1,2), xy = 2: $$2 + f_4 + f_1 + 2 - 4f_3 = 2 \Rightarrow f_1 - 4f_3 + f_4 = -2 \quad (3)$$

f4 at (2,2), xy = 4: $$f_3 + 2 + f_2 + 2 - 4f_4 = 4 \Rightarrow f_2 + f_3 - 4f_4 = 0 \quad (4)$$

Solving

Equations (2) and (3) are identical, so $f_2 = f_3 = p$.

From (1): $-4f_1 + 2p = -3 \Rightarrow f_1 = \dfrac{2p+3}{4}$

From (4): $2p - 4f_4 = 0 \Rightarrow f_4 = \dfrac{p}{2}$

Substitute into (2): $f_1 - 4p + f_4 = -2$

$$\frac{2p+3}{4} - 4p + \frac{p}{2} = -2$$

Multiply by 4:

$$(2p+3) - 16p + 2p = -8$$ $$-12p + 3 = -8$$ $$-12p = -11 \Rightarrow p = \frac{11}{12} \approx 0.9167$$

Back-substitution

$$f_2 = f_3 = \frac{11}{12} \approx 0.9167$$

$$f_1 = \frac{2(11/12) + 3}{4} = \frac{11/6 + 18/6}{4} = \frac{29/6}{4} = \frac{29}{24} \approx 1.2083$$

$$f_4 = \frac{p}{2} = \frac{11}{24} \approx 0.4583$$

Verification (Eq. 4)

$$f_2 + f_3 - 4f_4 = \frac{11}{12} + \frac{11}{12} - 4\cdot\frac{11}{24} = \frac{22}{12} - \frac{44}{24} = \frac{11}{6} - \frac{11}{6} = 0 \checkmark$$

Final Answers

$$\boxed{f_1 = \frac{29}{24} \approx 1.2083,\quad f_2 = f_3 = \frac{11}{12} \approx 0.9167,\quad f_4 = \frac{11}{24} \approx 0.4583}$$

The complete value is $f_4 = 11/24 \approx 0.4583$.

Open this answer on its own page →

2079 · 5 marks

Solve the Poisson's equation $\nabla^2 f = 3x^2y$ over the square domain $0 \leq x \leq 3$, $0 \leq y \leq 3$ with $f = 0$ on the boundary and $h = 1$. [5]

Show solved answer

Poisson's Equation $\nabla^2 f = 3x^2y$ over $[0,3]\times[0,3]$, $f=0$ on boundary, $h=1$

Given

  • PDE: $\nabla^2 f = 3x^2y$, so source $g(x,y) = 3x^2y$
  • Domain: $0 \le x \le 3$, $0 \le y \le 3$ (square)
  • Boundary condition: $f = 0$ on all boundaries
  • Mesh size: $h = 1$

Solution

Grid

With $h=1$, interior nodes at $x=1,2$ and $y=1,2$. Four unknowns.

Label (using standard layout):

$x=1$$x=2$
$y=2$$f_1$$f_2$
$y=1$$f_3$$f_4$

$f_1=f(1,2),\ f_2=f(2,2),\ f_3=f(1,1),\ f_4=f(2,1)$.

Five-point formula

$$f_{i+1,j}+f_{i-1,j}+f_{i,j+1}+f_{i,j-1}-4f_{i,j}=h^2,g(x_i,y_j)$$

with $h^2=1$.

Source term $g=3x^2y$

Node$x$$y$$g=3x^2y$
$f_1$126
$f_2$2224
$f_3$113
$f_4$2112

Equations (boundary values = 0)

At $f_1(1,2)$: neighbors $f_2$ (right), $0$ (left), $0$ (top, y=3), $f_3$ (bottom): $$-4f_1+f_2+f_3=6 \quad (1)$$

At $f_2(2,2)$: neighbors $0$ (right), $f_1$ (left), $0$ (top), $f_4$ (bottom): $$f_1-4f_2+f_4=24 \quad (2)$$

At $f_3(1,1)$: neighbors $f_4$ (right), $0$ (left), $f_1$ (top), $0$ (bottom): $$f_1-4f_3+f_4=3 \quad (3)$$

At $f_4(2,1)$: neighbors $0$ (right), $f_3$ (left), $f_2$ (top), $0$ (bottom): $$f_2+f_3-4f_4=12 \quad (4)$$

Solving

Sum of all four: $$-2(f_1+f_2+f_3+f_4)=45 \Rightarrow S = f_1+f_2+f_3+f_4 = -22.5 \quad (5)$$

Subtract (1)-(3): $$(-4f_1+f_2+f_3)-(f_1-4f_3+f_4)=6-3$$ $$-5f_1+f_2+5f_3-f_4=3 \quad (6)$$

Subtract (2)-(4): $$(f_1-4f_2+f_4)-(f_2+f_3-4f_4)=24-12$$ $$f_1-5f_2-f_3+5f_4=12 \quad (7)$$

Solve directly. From symmetry-free direct elimination, use variables.

Add (1)+(3): $-3f_1+f_2-3f_3+f_4=9 \quad (A)$ Add (2)+(4): $f_1-3f_2+f_3-3f_4=36 \quad (B)$

Let $P=f_1+f_3$, $Q=f_2+f_4$. Then $P+Q=-22.5$.

(A): $-3P+Q=9$ (B): $P-3Q=36$

From (A): $Q=9+3P$. Substitute into (B): $P-3(9+3P)=36 \Rightarrow P-27-9P=36 \Rightarrow -8P=63 \Rightarrow P=-7.875$. Then $Q=9+3(-7.875)=9-23.625=-14.625$. Check: $P+Q=-22.5$ ✓

Now subtract (1)-(3): $-5f_1+f_2+5f_3-f_4=3 \quad (6)$ Group as $-5(f_1-f_3)+(f_2-f_4)=3$. Let $U=f_1-f_3,\ V=f_2-f_4$: $$-5U+V=3 \quad (6')$$

Subtract (2)-(4): $f_1-5f_2-f_3+5f_4=12$ $= (f_1-f_3)-5(f_2-f_4)=12 \Rightarrow U-5V=12 \quad (7')$

From (6'): $V=3+5U$. Sub into (7'): $U-5(3+5U)=12 \Rightarrow U-15-25U=12 \Rightarrow -24U=27 \Rightarrow U=-1.125$. Then $V=3+5(-1.125)=3-5.625=-2.625$.

Recover values:

  • $f_1=(P+U)/2=(-7.875-1.125)/2=-9/2=-4.5$
  • $f_3=(P-U)/2=(-7.875+1.125)/2=-6.75/2=-3.375$
  • $f_2=(Q+V)/2=(-14.625-2.625)/2=-17.25/2=-8.625$
  • $f_4=(Q-V)/2=(-14.625+2.625)/2=-12/2=-6.0$

Verification in original equations

(1): $-4(-4.5)+(-8.625)+(-3.375)=18-12=6$ ✓ (2): $-4.5-4(-8.625)+(-6.0)=-4.5+34.5-6=24$ ✓ (3): $-4.5-4(-3.375)+(-6.0)=-4.5+13.5-6=3$ ✓ (4): $-8.625+(-3.375)-4(-6.0)=-12+24=12$ ✓

Final Result

$$\boxed{f_1=f(1,2)=-4.5,\quad f_2=f(2,2)=-8.625,\quad f_3=f(1,1)=-3.375,\quad f_4=f(2,1)=-6.0}$$

Open this answer on its own page →

2078 · 5 marks

Consider a metallic plate of size 90cm by 90cm. The two adjacent sides of the plate are maintained at a temperature of $100^\circ C$ and the remaining two adjacent sides are held at $200^\circ C$. Calculate the steady-state temperature at interior points assuming a grid size of 30 cm by 30 cm. [5]

  • Plate: 90 cm × 90 cm - Grid spacing: $h = 30$ cm → interior nodes form a 2×2 arrangement (4 unknowns) - Two adjacent sides at $100^\circ C$ - Remaining two adjacent sides at $200^\circ C$ Governing equation: $$\frac{\partial^2 T}{\partial x^2} + \frac{\partial^2 T}{\partial y^2} = 0$$ With
Open this answer on its own page →

2077 · 5 marks

A plate of dimension 18cm x 18cm is subjected to temperatures as follows: left side at $100^\circ C$, right side at $200^\circ C$. Upper part at $50^\circ C$, and lower at $150^\circ C$. If square grid length of 6cm x 6cm is assumed, what will be the temperature at the interior nodes? [5]

  • Plate dimension: $18 \text{ cm} \times 18 \text{ cm}$ - Grid length: $6 \text{ cm} \times 6 \text{ cm}$ - Left boundary: $100^\circ C$ - Right boundary: $200^\circ C$ - Upper (top) boundary: $50^\circ C$ - Lower (bottom) boundary: $150^\circ C$ Grid divisions: $18/6 = 3$ divisions per side, giv...
Open this answer on its own page →

2075 · 5 marks

Solve the Poisson's equation over the square domain $0 \leq x \leq 1.5$, $0 \leq y \leq 1.5$ with $f = 0$ on the boundary and $h = 0.5$. [5]

  • Domain: $0 \le x \le 1.5$, $0 \le y \le 1.5$ - Boundary condition: $f = 0$ on all boundaries - Step size: $h = 0.5$ - Poisson equation right-hand side: NOT LEGIBLE in the question. The function $f$ (source term) appears garbled. This solution takes $\nabla^2 f = 20xy^2$, a common textbook form,...
Open this answer on its own page →