You are on page 1of 3

Analytical solution

x t x
0 0.5 U(0,0) 0 0
0.2 0.5 U(0.2,0.5) 0.0210 0.2
0.4 0.5 U(0.4,0.5) 0.0300 0.4
0.6 0.5 U(0.6,0.5) 0.0193 0.6
0.8 0.5 U(0.8,0.5) 0.0105 0.8
1 0.5 U(1,0.5) 0.0000 1

x t x
0 1 U(0,0) 0.0000 0
0.2 1 U(0.2,1) -0.0006 0.2
0.4 1 U(0.4,1) 0.0159 0.4
0.6 1 U(0.6,1) 0.0210 0.6
0.8 1 U(0.8,1) 0.0094 0.8
1 1 U(1,1) 0.0000 1

x t x
0 1.5 U(0,0) 0.0000 0
0.2 1.5 U(0.2,1.5) -0.0106 0.2
0.4 1.5 U(0.4,1.5) -0.0053 0.4
0.6 1.5 U(0.6,1.5) 0.0107 0.6
0.8 1.5 U(0.8,1.5) 0.0109 0.8
1 1.5 U(1,1.5) 0.0000 1

Numerical
i 0 1 2 3 4 5
x 0 0.2000 0.4000 0.6000 0.8000 1
f(x) 0 0.0400 0.0300 0.0200 0.0100 0
g(x) 0 0.0000 0.0000 0.0000 0.0000 0
j=1 0 0.0242 0.0300 0.0200 0.0100 0
j=2 0 -0.0033 0.0200 0.0200 0.0100 0
j=3 0 -0.0139 -0.0048 0.0137 0.0100 0
j=4 0 -0.0099 -0.0236 -0.0067 0.0060 0
j=5 0 -0.0083 -0.0231 -0.0297 -0.0098 0
j=6 0 -0.0108 -0.0174 -0.0360 -0.0320 0
t
2 U(0,0) 0.0000 Graph of u(x,t) vs x for
2 U(0.2,2) -0.0096
0.04
2 U(0.4,2) -0.0198
0.03
2 U(0.6,2) -0.0098
2 U(0.8,2) 0.0048 0.02
2 U(1,2) 0.0000 0.01
0
0 0.2 0.4 0.6
t -0.01
2.5 U(0,0) 0.0000 -0.02
2.5 U(0.2,2.5) -0.0103 -0.03
2.5 U(0.4,2.5) -0.0197
-0.04
2.5 U(0.6,2.5) -0.0279
2.5 U(0.8,2.5) -0.0142 t = 0.5 t=1 t=1.5
2.5 U(1,2.5) 0.0000

t
3 U(0,0) 0.0000 Graph of u(x,t) vs x for nu
3 U(0.2,3) -0.0097
0.04
3 U(0.4,3) -0.0204
3 U(0.6,3) -0.0300 0.03
3 U(0.8,3) -0.0342 0.02
3 U(1,3) 0.0000 0.01
0
0 0.2 0.4 0.6
-0.01
-0.02
C 1/
-0.03
t 0.5
x 0.2 -0.04
0.795775 j=1 j=2 j=3 j=
u(x,t) vs x for analytical solution

0.4 0.6 0.8 1 1.2

t=1 t=1.5 t=2.0 t=2.5 t=3.0

x,t) vs x for numerical solution

0.4 0.6 0.8 1 1.2

j=2 j=3 j=4 j=5 j=6