Galerkin method for initial-boundary value problem

320 Views Asked by At

Consider to $$u_{t}(x,t)=u_{xx}(x,t)$$ $$u(0,t)=u(1,t)=0$$ $$u(x,0)=f(x)$$ I want to solve this problem by the Galerkin method based on finite dimensional space $X_{N}$, please help me. Providing that all test functions satisfies boundary conditions, i.e.

$$X_{N}:=span\lbrace\phi_{0}(x),...,\phi_{n}(x)\rbrace$$ $$\phi_{i}(0)=0, \phi_{i}(1)=0,$$ for all $i=0..N$

thanks

1

There are 1 best solutions below

1
On

First of all, the (Faedo-)Galerkin method aims to solve the weak formulation of the problem. In your case, this is given by the following: given $f\in L^2(0,1)$, find $u\in L^2(0,T;V)$ such that

$$ _{V^*}\langle u_t,v\rangle_V+(\nabla u, \nabla v)_0=0 $$ and $u(x,0)=f(x)$, where $V=H^1_0(0,1)$ and $V^*=H^{-1}(0,1)$, $_{V^*}\langle u_t,v\rangle_V$ is the duality pairing between $V^*$ and $V$, and $(\cdot,\cdot)_0$ is the inner product in $L^2(0,1)$. Incidentally, the equation above can be written in the more friendly form

$$ \frac{d}{dt}(u,v)_0 + (\nabla u,\nabla v)_0=0. $$

The Faedo-Galerkin method aims to find a solution of the form

$$ u(x,t)=\sum_{j=0}^n c_j(t)\phi_j(x). $$ If we plug this expression into the equation, and using linearity, we find that the vector $\underline{c}(t)$ of coefficients $c_j(t)$ must solve

$$ M\underline{\dot{c}}(t)+A\underline{c}(t)=\underline{0} $$ with initial condition $\underline{c}(0)=\underline{f}$ and we defined the matrices $M,A$ and the vector $\underline{f}$ as

$$ M_{i,j}=(\phi_i,\phi_j)_0,\quad A_{i,j}=(\nabla \phi_j,\nabla \phi_i)_0\quad f_i=(f,\phi_i)_0. $$

Now, once you fix the choice of your basis $\phi_0(x),\ldots,\phi_n(x)$, you can compute the matrices $A,M$ and the vector $\underline{f}$. All you have to do now is solve the Cauchy problem

$$ \begin{cases} M\dot{\underline{c}}(t) = -A\underline{c}(t)\\ \underline{c}(0)=\underline{f}. \end{cases} $$ You can do this numerically, or, for particular choices of the basis, you may be able to compute an analytical solution (which may be complicated).

Note: here we did not discuss the convergence property of the method as $n\to \infty$, a topic which involves quite a bit of functional analysis. Instead, we only focused on how to compute a finite dimensional approximation to the solution (although, to be fair, you should only call it an approximation once you know that there is a convergence theorem in the background). Nevertheless, to make sure you are doing something meaningful, you should choose as basis the first $n$ elements of a basis of $V$. Notice that, if they are orthogonal in $V$ and in $L^2(0,1)$, then the system decouples into $n$ independent ODE's. If your basis is not orthonormal, the system still works, and you can diagonalize $A$ with respect to $M$ to obtain $n$ independent ODE's.