WOLFRAM NOTEBOOK

WOLFRAM|DEMONSTRATIONS PROJECT

Boundary Value Problem Using Galerkin's Method

trial solution order
2
3
4
5
6
exact and trial solutions
trial solution:1.33333x-0.566667
2
x
+0.233333
3
x
Consider the boundary value problem
T''(x)+T'(x)-T(x)=0
, with
T(0)=0
,
T(1)=1
, and
0x1
. There is an analytical solution:
T(x)=-
-1
-1+
5
e
exp
1+
5
2
exp
-1-
5
2
x-exp
-1+
5
2
x
.
We use Galerkin's method to find an approximate solution in the form
T
N
(x)=x+
N
i=1
A
i
(
i+1
x
-x)
. The unknown coefficients of the trial solution are determined using the residual
R(
T
N
,x)=
T
N
''(x)+
T
N
'(x)-
T
N
(x)
and setting
1
0
R(
T
N
,x)(
j
x
-x)dx=0
for
j=2,,N+1
.
You can vary the degree of the trial solution,
N+1
. 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
e(x)
between the exact and approximate solutions. This error is seen to decrease as the order of the trial solution,
N+1
, is increased.
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.