Suppose we need to find the solution to equation

\[\mathcal L_{x} \psi(x) = f(x).\]

The key is that the solution can be approximated by

\[\psi(x) = \sum_i u_i \phi_i(x),\]

where \(\phi_i(x)\) are the basis functions.

**The purpose is to find the the coefficients** \(u_i\). Galerkin method has three steps.

- discretize the space \(x\) and function space: triangulation,
- discretize the function using weak form: assembly,
- error estimation.

Triangulation is basically setting up the basis function in a discretized space \(x\). One of the choice is the hat function.

At each point \(x\), there is a hat function responsible for the approximation within \([x-\Delta x, x+\Delta x]\).

Those hat functions forms the basis for the approximated solution

\[\psi = \sum_i u_i \phi_i.\]

With this approximation, it requires the *test function* \(v\) to write down the weak form. Basically we multiply \(v\) on both sides of the equation then integrate by step. Then the differential equation can be rewrite into matrix form with basis \(\phi_i\),

\[\mathbf K \mathbf U = \mathbf L.\]

We solve the coefficients \(\mathbf U\) from the matrix equation.

- Freitag, K. J. (2007). Neural networks and differential equations.
- COMSOL Multiphysics has a nice article.

© 2017, Lei Ma | Created with Sphinx and . | On GitHub | Physics Notebook Statistical Mechanics Notebook Neutrino Physics Notes Intelligence | Index | Page Source