Partial Differential Equations (PDEs)
A partial differential equation (PDE) involves partial derivatives of an unknown function of two or more variables. A partial derivative represents the rate of change of a function with respect to one variable while keeping the other variables fixed. PDEs arise naturally in many areas of physics and engineering, including heat conduction, wave propagation, and fluid dynamics. Unlike ordinary differential equations, their solutions describe how a quantity evolves across both space and time.
As with ODEs, we are often interested in finding solutions that satisfy initial conditions (specifying the state at a given time) and boundary conditions (specifying behaviour at the edges of a domain). These conditions are essential for determining a unique solution.
One of the most important techniques for solving PDEs is separation of variables, where we assume the solution can be written as a product of functions, each depending on a single variable, reducing the PDE to a set of ODEs.
eg. Solve
$$ \color{#00f0ff} 3\frac{\partial u}{\partial x} + 4\frac{\partial u}{\partial y} = 0, \quad u(x,0) = 5 e^{-x} $$Assume \( u(x,y) = f(x)g(y). \) Then
$$ 3f'(x)g(y) + 4f(x)g'(y) = 0 $$Divide by \( f(x)g(y) \):
$$ 3\frac{f'(x)}{f(x)} + 4\frac{g'(y)}{g(y)} = 0 $$ $$ 3\frac{f'(x)}{f(x)} = -4\frac{g'(y)}{g(y)} $$Since the left-hand side depends only on \( x \) and the right-hand side depends only on \( y \), the only way this equality can hold for all values of \( x \) and \( y \) is if both sides are constant. Hence, we can write
$$ 3\frac{f'(x)}{f(x)} = -4\frac{g'(y)}{g(y)} = \lambda $$This gives two ordinary differential equations
$$ f'(x) - \frac{\lambda}{3}f(x) = 0 $$ $$ g'(y) + \frac{\lambda}{4}g(y) = 0 $$Solving
$$ f(x) = a_1 e^{\frac{\lambda}{3}x} $$ $$ g(y) = a_2 e^{-\frac{\lambda}{4}y} $$Therefore
$$ u(x,y) = c e^{\frac{\lambda}{3}x - \frac{\lambda}{4}y} $$Apply the initial condition:
$$ u(x,0) = 5 e^{-x} = ce^{\frac{\lambda}{3}x} $$ $$ \Rightarrow \quad c = 5, \quad \lambda = -3 $$ $$ \therefore \, u(x,y) = 5 e^{-x + \frac{3}{4}y} $$eg. Solve
$$ \color{#00f0ff} \frac{\partial u}{\partial x} + 3\frac{\partial u}{\partial y} - u = 0, \quad u(x,0) = e^{-5x} - 7 e^{2x} $$Assume \( u(x,y) = f(x)g(y) \)
$$ f'(x)g(y) + 3f(x)g'(y) - f(x)g(y) = 0 $$ $$ \frac{f'(x)}{f(x)} + 3\frac{g'(y)}{g(y)} - 1 = 0 $$Again, we can put all the \( x \)-dependence on one side and all the \( y \)-dependence on the other, and so the only way this equality can hold for all values of \( x \) and \( y \) is if both sides are constant. Hence, we can write
$$ \frac{f'(x)}{f(x)} = \lambda $$ $$ \frac{g'(y)}{g(y)} = \frac{1-\lambda}{3} $$Therefore
$$ f(x) = a_1 e^{\lambda x} $$ $$ g(y) = a_2 e^{\frac{1-\lambda}{3}y} $$so
$$ u(x,y) = c e^{\lambda x + \frac{1-\lambda}{3}y} $$Apply the boundary condition:
$$ u(x,0) = c e^{\lambda x} = e^{-5x} - 7 \, e^{2x} $$Split this into two solutions:
$$ u_1(x,0) = c_1 e^{\lambda_1 x} = e^{-5x} $$ $$ u_2(x,0) = c_2 e^{\lambda_2 x} = -7e^{2x} $$Therefore
$$ c_1 = 1, \quad \lambda_1 = -5 $$ $$ c_2 = -7, \quad \lambda_2 = 2 $$So
$$ u_1(x,y) = e^{-5x + 2y} $$ $$ u_2(x,y) = -7 e^{2x - \frac{1}{3}y} $$ $$ u = u_1 + u_2 $$ $$ \therefore \, u(x,y) = e^{-5x + 2y} - 7 e^{2x - \frac{1}{3}y} $$eg. Solve
$$ \color{#00f0ff} 3\frac{\partial u}{\partial t} = 4\frac{\partial^2 u}{\partial x^2}, \quad u(0,t) = 0, \quad u(3\pi,t) = 0, \quad u(x,0) = \sin x + \sin(3x) $$Assume \( u(x,t) = f(x)g(t) \)
$$ 3f(x)g'(t) = 4f''(x)g(t) $$ $$ 3\frac{g'(t)}{g(t)} = 4\frac{f''(x)}{f(x)} $$Let
$$ \frac{g'(t)}{g(t)} = \lambda $$ $$ \frac{f''(x)}{f(x)} = \alpha $$Then
$$ 3\lambda = 4\alpha $$The time equation is
$$ g'(t) = \lambda g(t) $$so
$$ g(t) = a_1 e^{\lambda t} $$The space equation is
$$ f''(x) - \alpha f(x) = 0 $$Assume \( \alpha < 0 \) due to the periodic boundary conditions \( f(0) = f(3 \pi) = 0 \) (later we will show explicitly why for such an equation \( \alpha < 0 \) when we have perioidic boundary conditions). Recall our study of constant coefficient second-order ODEs with complex roots.
Characteristic equation \( \quad r^2 - \alpha = 0 \quad r = \pm \, i \sqrt{|\alpha|} \)
Let \( \; \alpha = -b^2 \; \) where \( \; b \ge 0 \), \( \; \)so \( \; r = \pm bi \)
$$ f(x) = c_1 \cos(bx) + c_2 \sin(bx) $$Apply boundary conditions
$$ f(0) = c_1 = 0 $$ $$ f(3\pi) = c_2 \sin(3\pi b) = 0 $$ $$ \Leftrightarrow \; 3 \pi b = n \pi \quad n = 0, 1, 2, ... $$Thus we obtain sine solutions with \( \displaystyle b = \frac{n}{3} \), where \( n \) is a non-negative integer (since we defined \( b \ge 0 \) )
\( n = 0 \) gives \( f(x) = 0 \), and we can see more clearly why \( n \) is non-negative; since \( \sin(-x) = - \sin x \), \( n < 0 \) gives same values for \( f(x) \) as neagtives can be absorbed by constants. so we have \( n = 1, 2, 3, ... \)
For the first term of the initial condition,
$$ u_1(x,0) = \sin x = A\sin(b_1 x) $$Hence
$$ A = 1, \quad b_1 = 1 $$ $$ \alpha_1 = -1 $$ $$ \lambda_1 = -\frac{4}{3} $$Therefore,
$$ u_1(x,t) = e^{-\frac{4}{3}t}\sin x $$For the second term,
$$ u_2(x,0) = \sin(3x) = B\sin(b_2 x) $$Hence
$$ B = 1, \quad b_2 = 3 $$ $$ \alpha_2 = -9 $$ $$ \lambda_2 = -12 $$Therefore,
$$ u_2(x,t) = e^{-12t}\sin(3x) $$So the solution is
$$ u(x,t) = e^{-\frac{4}{3}t}\sin x + e^{-12t}\sin(3x) $$