Spatial discretizations based on Galerkin methods are powerful techniques used to numerically solve partial differential equations (PDEs) and stochastic partial differential equations (SPDEs). The Galerkin approach projects the PDE onto a finite-dimensional subspace of the function space, turning it into a system of algebraic equations that can be solved computationally. Here is an overview of how Galerkin methods are applied to spatial discretization:

1. Basics of Galerkin Methods

$u(x) \approx u_N(x) = \sum_{j=1}^{N} c_j \phi_j(x),$

where $\{ \phi_j(x) \}_{j=1}^{N}$ are chosen basis functions and $c_j$ are the coefficients to be determined.

$\int_{\Omega} R(u_N) \phi_i(x) \, dx = 0 \quad \text{for all } i = 1, 2, \ldots, N.$

2. Weak Formulation of PDEs

$\mathcal{L}u(x) = f(x),$

multiplying by a test function $v(x)$ and integrating over the domain $\Omega$ yields:

$\int_{\Omega} v(x) \mathcal{L}u(x) \, dx = \int_{\Omega} v(x) f(x) \, dx.$

This weak formulation ensures that only the lower regularity (differentiability) of the solution is needed.

3. Galerkin Discretization Procedure

  1. Choose a Finite-Dimensional Subspace: Select a set of basis functions $\{\phi_j(x)\}_{j=1}^N$ (e.g., polynomials, trigonometric functions, or finite element shape functions).
  2. Formulate the Approximate Solution: Express $u_N(x) = \sum_{j=1}^{N} c_j \phi_j(x)$ .
  3. Derive the System of Equations: Substitute $u_N(x)$ into the weak form and enforce the orthogonality condition:

$\int_{\Omega} \phi_i(x) \mathcal{L}u_N(x) \, dx = \int_{\Omega} \phi_i(x) f(x) \, dx \quad \text{for } i = 1, 2, \ldots, N.$

  1. Solve for Coefficients: This results in a linear or nonlinear system of equations for the coefficients $\{c_j\}$ .

4. Types of Galerkin Methods

1. Finite Element Method (FEM)

2. Spectral Galerkin Method