Beyond Finite Differences 2

Beyond Finite Differences 2

Let’s consider the Galerkin method, which provides another approach to determining the coefficients c_1, ..., c_n in the approximation \displaystyle \sum\limits_{j=1}^{n}c_{j}\phi_{j}(x), where \phi_{i}(0)=\phi_{i}(1)=0 for i= 1, ..., n.

We define the operator

\displaystyle R(\square) =\square'' + q(x)\square - f(x).

Given that y(x) is the exact solution of the differential equation

\displaystyle {\square}''(x) + q(x){\square}(x)=f(x),

we have

\displaystyle R(y(x)) = 0.

This implies that

\displaystyle \int\limits_{0}^{1}R(y(x))\phi_i(x)\;dx = 0, \quad i = 1, ..., n.

However, since

\displaystyle R\left(\sum\limits_{j=1}^{n}c_j \phi_j(x)\right) \ne 0

in general, approximating y(x) by \displaystyle \sum\limits_{j=1}^{n}c_j \phi_j(x) requires finding c_1, ..., c_n such that

\displaystyle \int\limits_{0}^{1}R\left(\sum\limits_{j=1}^{n}c_j \phi_j(x)\right)\phi_i(x)\;dx = 0, \quad i=1,..., n.

This condition is equivalent to

\displaystyle \int\limits_{0}^{1} \left(\sum\limits_{j=1}^{n}c_j\phi_{j}''(x) + q(x)\sum\limits_{j=1}^{n}c_j\phi_{j}(x)-f(x)\right)\phi_{i}(x)\;dx=0.

Expanding the expression gives

\displaystyle \sum\limits_{j=1}^{n}c_j\int\limits_{0}^{1}(\phi_{j}''(x) + q(x)\phi_{j}(x))\phi_{i}(x)\;dx - \int\limits_{0}^{1}f(x)\phi_i(x)\;dx = 0

\displaystyle \implies \sum\limits_{j=1}^{n}c_j\int\limits_{0}^{1}\phi_{j}''(x)\phi_{i}(x) + q(x)\phi_{j}(x)\phi_{i}(x)\;dx = \int\limits_{0}^{1}f(x)\phi_i(x)\;dx

\displaystyle \implies \sum\limits_{j=1}^{n}c_j\left(\underline{\int\limits_{0}^{1}\phi_{j}''(x)\phi_{i}(x)\;dx} + \int\limits_{0}^{1}q(x)\phi_{j}(x)\phi_{i}(x)\;dx\right) = \int\limits_{0}^{1}f(x)\phi_i(x)\;dx

\displaystyle \implies \sum\limits_{j=1}^{n}c_j\left(\underline{\phi_{j}'(x)\phi_i(x)\bigg|^{1}_{0} - \int\limits_{0}^{1}\phi_i'(x)\phi_{j}'(x)\;dx} + \int\limits_{0}^{1}q(x)\phi_{i}(x)\phi_{j}(x)\;dx\right) = \int\limits_{0}^{1}f(x)\phi_i(x)\;dx.

Since \phi_i(0) = \phi_i(1) = 0, we are left with:

\displaystyle \sum\limits_{j=1}^{n}c_j\left(\displaystyle -\int\limits_{0}^{1} \phi_{i}'(x)\phi_{j}'(x)\;dx + \int\limits_{0}^{1}q(x)\phi_i(x)\phi_{j}(x)\; dx \right) = \int\limits_{0}^{1}f(x)\phi_i(x)\; dx.\quad(*)

For i, j=1, ..., n, we define the coefficients

\displaystyle a_{ij} = -\int\limits_{0}^{1} \phi_{i}'(x)\phi_{j}'(x)\;dx + \int\limits_{0}^{1}q(x)\phi_i(x)\phi_{j}(x)\;dx

and

\displaystyle f_i = \int\limits_{0}^{1}f(x)\phi_i(x)\; dx.

With these definitions, (*) can be expressed as a system of linear equations:

\displaystyle \bold{Ac} = \bold{f}\quad\quad\quad(**)

where \bold{A} is a n \times n matrix with entries a_{ij}, \bold{c} = (c_1, ..., c_n)^T, and \bold{f} = (f_1, ..., f_n)^T. Solving (**) yields the coefficients \bold{c}.

Fig. 1 y'' + y = x^3, y(0)=y(1)=0 solved by the Galerkin method with \phi_j(x) = x^j(1-x)

Fig. 2 y'' + y = x^3, y(0)=y(1)=0 solved by the Galerkin method with \phi_j(x) = \sin(j\pi x)


Exercise-1 Verify that \displaystyle y''(x)+q(x)y(x)=f(x) \Longleftrightarrow R(y(x)) = 0 \Rightarrow \int\limits_{0}^{1}R(y(x))\phi_{i}(x)\;dx = 0.

Exercise-2 Solve y''+x y = x^3, y(0)=y(1)=0 by the Galerkin method. (Hint: Fig. 1)

LEAVE A REPLY

Please enter your comment!
Please enter your name here

More like this

Reintroducing the IMplementation Reflection Tool

By Claire Neely, Senior Implementation Specialist Illustrative Mathematics’ redesigned IMplementation Reflection Tool (IRT) is a powerful, non-evaluative resource...

Unizor – Creative Mind through Art of Mathematics: Geometry+...

https://www.youtube.com/watch?v=hAXtrAWNVuI Notes to a video lecture on http://www.unizor.com Geometry+ 10Problem AGiven two parallel lines and a segment AB...

A Little AIME Problem | mathgarage

A Little AIME Problem Posted: May 16, 2022 in Mathematics Tags: AIME, math, Math Contest Solution In general, let By Pythagoras Identity, Solve this...