Boundary Value Problem Using Galerkin's Method
Boundary Value Problem Using Galerkin's Method
Consider the boundary value problem , with , , and . There is an analytical solution:
T''(x)+T'(x)-T(x)=0
T(0)=0
T(1)=1
0≤x≤1
T(x)=-expexpx-expx
-1
-1+
5
e
1+
5
2
-1-
5
2
-1+
5
2
We use Galerkin's method to find an approximate solution in the form (x)=x+(-x). The unknown coefficients of the trial solution are determined using the residual and setting R(,x)(-x)dx=0 for .
T
N
N
∑
i=1
A
i
i+1
x
R(,x)=''(x)+'(x)-(x)
T
N
T
N
T
N
T
N
1
∫
0
T
N
j
x
j=2,…,N+1
You can vary the degree of the trial solution, . The Demonstration plots the analytical solution (in gray) as well as the approximate solution (in dashed cyan). The graph of the polynomial expression of the trial solution is displayed on the same plot. In addition, you can also see a plot of the difference between the exact and approximate solutions. This error is seen to decrease as the order of the trial solution, , is increased.
N+1
e(x)
N+1