You are on page 1of 45

Universiti Tunku Abdul Rahman

UEMM 3243 Engineering Analysis


Assignment

No. Name Student ID Course


Question 1
The ends of a stretched string of length L = 1 are fixed at x = 0 and x = 1. The string
is set to vibrate from rest by releasing it from an initial triangular shape modeled by
the function

Given that
a) Using analytical method, determine the solution u (x,t).
b) Using numerical method - explicit method, determine the magnitude of
vibration for t = 0.5, 1.0, 1.5, 2.0, 2.5, 3.0 taking h = 0.2 and k = 0.5.
Compare the answers with analytical method. [50 marks]

Question 2
a) Using analytical method, solve the Poisson Equation for the following Figure 1
with the given data,

Figure 1

Take a = 2, b = 1.

Solve (a) with numerical method and compare the answer for each node. Taking the
mesh size h
= k = 0.2

b) Solve the heat problem by the explicit method with h = 0.2 and k = 0.01, 6 time c2 = 1.0
steps.
with both ends kept at zero temperature.
Question 1a

a)


(, ) = ( + ) ; =

=1

2 2
= () ; = ()
0 0

From the question, initial velocity () = 0 because vibrate from rest. So, is also
0. The equation then simplified to:


(, ) = ( ) ; =

=1

From the question:

1
= 1 =

1 1
() = 0
5 5
(1 ) 1
() = 1
20 5
2
= ()
0
1
1 (1
2 51 )
= [ + ]
1 0 5 1 1 20 1
5
0.2 1
2 () () 1 () () ()
= [ 2
] + [ ]
5 () 10 ()2
0 0.2
2 (0.2) 0.2(0.2)
= [ ]
5 ()2
1 () () (0.2) 0.2(0.2)
+ [ +
10 ()2
(0.2)
+ ]

0.4(0.2) 0.08(0.2) 0.1(0.2) 0.02(0.2)
= +
()2 ()2
0.1(0.2)
+

0.5(0.2)
=
()2

=

1

=
1



(, ) = ( )

=1


0.5(0.2)
= ()()
()2
=1

We will use 3 terms in the calculations:

0.5 (0.2) (0.4)


(, ) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2
Calculations:

0.5 (0.2) (0.4)


(0.2,0) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= [ (0)(0.2) + (0)(0.4)
2 (1)2 (2)2

(0.6)
+ (0)(0.6)]
(3)2

= 0.03405

0.5 (0.2) (0.4)


(0.4,0) = 2
[ 2
()() + (2)(2)
(1) (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= 2
[ 2
(0)(0.4) + (0)(0.8)
(1) (2)2

(0.6)
+ (0)(1.2)]
(3)2

= 0.03247

0.5 (0.2) (0.4)


(0.6,0) = 2
[ 2
()() + (2)(2)
(1) (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= 2
[ 2
(0)(0.6) + (0)(1.2)
(1) (2)2

(0.6)
+ (0)(1.8)]
(3)2
= 0.01809

0.5 (0.2) (0.4)


(0.8,0) = 2
[ 2
()() + (2)(2)
(1) (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= 2
[ 2
(0)(0.8) + (0)(1.6)
(1) (2)2

(0.6)
+ (0)(2.4)]
(3)2

= 0.01115
= .

0.5 (0.2) (0.4)


(0.2,0.5) = 2
[ 2
()() + (2)(2)
(1) (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= 2
[ 2
(0.5)(0.2) + (1.0)(0.4)
(1) (2)2

(0.6)
+ (1.5)(0.6)]
(3)2

= 0.02191

0.5 (0.2) (0.4)


(0.4,0.5) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= 2
[ 2
(0.5)(0.4) + (1.0)(0.8)
(1) (2)2

(0.6)
+ (1.5)(1.2)]
(3)2

= 0.02846

0.5 (0.2) (0.4)


(0.6,0.5) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= [ (0.5)(0.6) + (1.0)(1.2)
2 (1)2 (2)2

(0.6)
+ (1.5)(1.8)]
(3)2

= 0.02081
0.5 (0.2) (0.4)
(0.8,0.5) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= [ (0.5)(0.8) + (1.0)(1.6)
2 (1)2 (2)2

(0.6)
+ (1.5)(2.4)]
(3)2

= 0.00953
= .

0.5 (0.2) (0.4)


(0.2,1.0) = 2
[ 2
()() + (2)(2)
(1) (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= 2
[ 2
(1.0)(0.2) + (2.0)(0.4)
(1) (2)2

(0.6)
+ (3.0)(0.6)]
(3)2

= 0.00035

0.5 (0.2) (0.4)


(0.4,1.0) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= 2
[ 2
(1.0)(0.4) + (2.0)(0.8)
(1) (2)2

(0.6)
+ (3.0)(1.2)]
(3)2

= 0.01548

0.5 (0.2) (0.4)


(0.6,1.0) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= [ (1.0)(0.6) + (2.0)(1.2)
2 (1)2 (2)2

(0.6)
+ (3.0)(1.8)]
(3)2

= 0.02137
0.5 (0.2) (0.4)
(0.8,1.0) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= [ (1.0)(0.8) + (2.0)(1.6)
2 (1)2 (2)2

(0.6)
+ (3.0)(2.4)]
(3)2

= 0.00919
= .

0.5 (0.2) (0.4)


(0.2,1.5) = 2
[ 2
()() + (2)(2)
(1) (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= 2
[ 2
(1.5)(0.2) + (3.0)(0.4)
(1) (2)2

(0.6)
+ (4.5)(0.6)]
(3)2

= 0.01118

0.5 (0.2) (0.4)


(0.4,1.5) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= 2
[ 2
(1.5)(0.4) + (3.0)(0.8)
(1) (2)2

(0.6)
+ (4.5)(1.2)]
(3)2

= 0.00434

0.5 (0.2) (0.4)


(0.6,1.5) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= [ (1.5)(0.6) + (3.0)(1.2)
2 (1)2 (2)2

(0.6)
+ (4.5)(1.8)]
(3)2

= 0.00968
0.5 (0.2) (0.4)
(0.8,1.5) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= [ (1.5)(0.8) + (3.0)(1.6)
2 (1)2 (2)2

(0.6)
+ (4.5)(2.4)]
(3)2

= 0.01151
= .

0.5 (0.2) (0.4)


(0.2,2.0) = 2
[ 2
()() + (2)(2)
(1) (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= 2
[ 2
(2.0)(0.2) + (4.0)(0.4)
(1) (2)2

(0.6)
+ (6.0)(0.6)]
(3)2

= 0.00989

0.5 (0.2) (0.4)


(0.4,2.0) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= 2
[ 2
(2.0)(0.4) + (4.0)(0.8)
(1) (2)2

(0.6)
+ (6.0)(1.2)]
(3)2

= 0.01944

0.5 (0.2) (0.4)


(0.6,2.0) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= [ (2.0)(0.6) + (4.0)(1.2)
2 (1)2 (2)2

(0.6)
+ (6.0)(1.8)]
(3)2

= 0.01018
0.5 (0.2) (0.4)
(0.8,2.0) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= [ (2.0)(0.8) + (4.0)(1.6)
2 (1)2 (2)2

(0.6)
+ (6.0)(2.4)]
(3)2

= 0.00510
= .

0.5 (0.2) (0.4)


(0.2,2.5) = 2
[ 2
()() + (2)(2)
(1) (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= 2
[ 2
(2.5)(0.2) + (5.0)(0.4)
(1) (2)2

(0.6)
+ (7.5)(0.6)]
(3)2

= 0.00901

0.5 (0.2) (0.4)


(0.4,2.5) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= 2
[ 2
(2.5)(0.4) + (5.0)(0.8)
(1) (2)2

(0.6)
+ (7.5)(1.2)]
(3)2

= 0.02177

0.5 (0.2) (0.4)


(0.6,2.5) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= [ (2.5)(0.6) + (5.0)(1.2)
2 (1)2 (2)2

(0.6)
+ (7.5)(1.8)]
(3)2

= 0.02579
0.5 (0.2) (0.4)
(0.8,2.5) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= [ (2.5)(0.8) + (5.0)(1.6)
2 (1)2 (2)2

(0.6)
+ (7.5)(2.4)]
(3)2

= 0.01551
= .

0.5 (0.2) (0.4)


(0.2,3.0) = 2
[ 2
()() + (2)(2)
(1) (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= 2
[ 2
(3.0)(0.2) + (6.0)(0.4)
(1) (2)2

(0.6)
+ (9.0)(0.6)]
(3)2

= 0.01097

0.5 (0.2) (0.4)


(0.4,3.0) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= 2
[ 2
(3.0)(0.4) + (6.0)(0.8)
(1) (2)2

(0.6)
+ (9.0)(1.2)]
(3)2

= 0.01837

0.5 (0.2) (0.4)


(0.6,3.0) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= [ (3.0)(0.6) + (6.0)(1.2)
2 (1)2 (2)2

(0.6)
+ (9.0)(1.8)]
(3)2

= 0.03197
0.5 (0.2) (0.4)
(0.8,3.0) = [ ()() + (2)(2)
2 (1)2 (2)2

(0.6)
+ (3)(3)]
(3)2

0.5 (0.2) (0.4)


= [ (3.0)(0.8) + (6.0)(1.6)
2 (1)2 (2)2

(0.6)
+ (9.0)(2.4)]
(3)2

= 0.03297

Tabulation of results:

i= 0 1 2 3 4 5
x= 0 0.2 0.4 0.6 0.8 1
j= t=
0 0 0 0.03405 0.03247 0.01809 0.01115 0
1 0.5 0 0.02191 0.02846 0.02081 0.00953 0
2 1 0 -0.00035 0.01548 0.02137 0.00919 0
3 1.5 0 -0.01118 -0.00434 0.00968 0.01151 0
4 2 0 -0.00989 -0.01944 -0.01018 0.0051 0
5 2.5 0 -0.00901 -0.02177 -0.02579 -0.01551 0
6 3 0 -0.01097 -0.01837 -0.03197 -0.03297 0
Graph:

Graph of u(x,t) against x


0.05
0.04
Deflection, u(x,t)

0.03 0s
0.02 0.5 s
0.01 1.0 s
0 1.5 s
0 0.2 0.4 0.6 0.8 1 1.2
-0.01 2.0 s
-0.02 2.5 s
-0.03 3.0 s
-0.04
Position, x

Question 1b)

(, + 1) = 2(, ) (, 1) + 2 [( + 1, ) 2(, ) + ( 1, )]

1
(, 1) = (1 2 ) + 2 (+1 + 1 ) +
2

=

1 0.5
=
0.2
2.5
=

2 = 0.63326

1
1 = (0.2)
5
= 0.04

1 0.4
2 =
20
= 0.03

1 0.6
3 =
20
= 0.02
1 0.8
4 =
20
= 0.01

Numerical method explicit method:

1
(, 1) = (1 2 ) + 2 (+1 + 1 ) + , = 0
2
1
(, 1) = (1 2 ) + 2 (+1 + 1 )
2
When = 1:

1
(1,1) = (1 2 )1 + 2 (1+1 + 11 )
2
1
= (1 0.63326)(0.04) + (0.63326)(0.03 + 0)
2
= 0.02417

When = 2:

1
(2,1) = (1 2 )2 + 2 (2+1 + 21 )
2
1
= (1 0.63326)(0.03) + (0.63326)(0.02 + 0.04)
2
= 0.03

When = 3:

1
(3,1) = (1 2 )3 + 2 (3+1 + 31 )
2
1
= (1 0.63326)(0.02) + (0.63326)(0.01 + 0.03)
2
= 0.02003

When = 4:

1
(4,1) = (1 2 )4 + 2 (4+1 + 41 )
2
1
= (1 0.63326)(0.01) + (0.63326)(0 + 0.02)
2
= 0.01

For = 1 ; = 1:

(1,2) = 2(1,1) (1,0) + 2 [(2,1) 2(1,1) + (0,1)]


= 2(0.02417) 0.04 + 0.63326[0.03 2(0.02417) + 0]
= 0.00327

For = 2 ; = 1:

(2,2) = 2(2,1) (2,0) + 2 [(3,1) 2(2,1) + (1,1)]


= 2(0.03) 0.03 + 0.63326[0.02003 2(0.03) + 0.02417]
= 0.01999

For = 3 ; = 1:

(3,2) = 2(3,1) (3,0) + 2 [(4,1) 2(3,1) + (2,1)]


= 2(0.02003) 0.02 + 0.63326[0.01 2(0.02003) + 0.03]
= 0.02010

For = 4 ; = 1:

(4,2) = 2(4,1) (4,0) + 2 [(5,1) 2(4,1) + (3,1)]


= 2(0.01) 0.01 + 0.63326[0 2(0.01) + 0.02003]
= 0.00988

For = 1 ; = 2:

(1,3) = 2(1,2) (1,1) + 2 [(2,2) 2(1,2) + (0,2)]


= 2(0.00327) 0.02417 + 0.63326[0.01999 2(0.00327) + 0]
= 0.01391

For = 2 ; = 2:

(2,3) = 2(2,2) (2,1) + 2 [(3,2) 2(2,2) + (1,2)]


= 2(0.01999) 0.03 + 0.63326[0.02010 2(0.01999) 0.00327]
= 0.00468

For = 3 ; = 2:

(3,3) = 2(3,2) (3,1) + 2 [(4,2) 2(3,2) + (2,2)]


= 2(0.02010) 0.02003 + 0.63326[0.00988 2(0.02010) + 0.01999]
= 0.01369

For = 4 ; = 2:

(4,3) = 2(4,2) (4,1) + 2 [(5,2) 2(4,2) + (3,2)]


= 2(0.00988) 0.01 + 0.63326[0 2(0.00988) + 0.02010]
= 0.01005

For = 1 ; = 3:
(1,4) = 2(1,3) (1,2) + 2 [(2,3) 2(1,3) + (0,3)]
= 2(0.01391) + 0.00327 + 0.63326[0.00468 2(0.01391) + 0]
= 0.00990

For = 2 ; = 3:

(2,4) = 2(2,3) (2,2) + 2 [(3,3) 2(2,3) + (1,3)]


= 2(0.00468) 0.01999
+ 0.63326[0.01369 2(0.00468) 0.01391]
= 0.02356

For = 3 ; = 3:

(3,4) = 2(3,3) (3,2) + 2 [(4,3) 2(3,3) + (2,3)]


= 2(0.01369) 0.02010 + 0.63326[0.01005 2(0.01369) 0.00468]
= 0.00666

For = 4 ; = 3:

(4,4) = 2(4,3) (4,2) + 2 [(5,3) 2(4,3) + (3,3)]


= 2(0.01005) 0.00998 + 0.63326[0 2(0.01005) + 0.01369]
= 0.00606

For = 1 ; = 4:

(1,5) = 2(1,4) (1,3) + 2 [(2,4) 2(1,4) + (0,4)]


= 2(0.00990) + 0.01391 + 0.63326[0.02356 2(0.00990) + 0]
= 0.00827

For = 2 ; = 4:

(2,5) = 2(2,4) (2,3) + 2 [(3,4) 2(2,4) + (1,4)]


= 2(0.02356) + 0.00468
+ 0.63326[0.00666 2(0.02356) 0.00990]
= 0.02309

For = 3 ; = 4:

(3,5) = 2(3,4) (3,3) + 2 [(4,4) 2(3,4) + (2,4)]


= 2(0.00666) 0.01369
+ 0.63326[0.00606 2(0.00666) 0.02356]
= 0.02966

For = 4 ; = 4:

(4,5) = 2(4,4) (4,3) + 2 [(5,4) 2(4,4) + (3,4)]


= 2(0.00606) 0.01005 + 0.63326[0 2(0.00606) 0.00666]
= 0.00982

For = 1 ; = 5:

(1,6) = 2(1,5) (1,4) + 2 [(2,5) 2(1,5) + (0,5)]


= 2(0.00827) + 0.00990 + 0.63326[0.02309 2(0.00827) + 0]
= 0.01079

For = 2 ; = 5:

(2,6) = 2(2,5) (2,4) + 2 [(3,5) 2(2,5) + (1,5)]


= 2(0.02309) + 0.02356
+ 0.63326[0.02966 2(0.02309) 0.00827]
= 0.01740

For = 3 ; = 5:

(3,6) = 2(3,5) (3,4) + 2 [(4,5) 2(3,5) + (2,5)]


= 2(0.02966) + 0.00666
+ 0.63326[0.00982 2(0.02966) 0.02309]
= 0.03593

For = 4 ; = 5:

(4,6) = 2(4,5) (4,4) + 2 [(5,5) 2(4,5) + (3,5)]


= 2(0.00982) 0.00606 + 0.63326[0 2(0.00982) 0.02966]
= 0.03205
Tabulation of results:

i= 0 1 2 3 4 5
x= 0 0.2 0.4 0.6 0.8 1
j= t=
0 0 0 0.04 0.03 0.02 0.01 0
1 0.5 0 0.02417 0.03 0.02003 0.01 0
2 1 0 -0.00327 0.01999 0.0201 0.00988 0
3 1.5 0 -0.01391 -0.00468 0.01369 0.01005 0
4 2 0 -0.0099 -0.02356 -0.00666 0.00606 0
5 2.5 0 -0.00827 -0.02309 -0.02966 -0.00982 0
6 3 0 -0.01097 -0.0174 -0.03593 -0.03205 0

Graph:

Graph of u(x,t) against x


0.05
0.04
0.03
Deflection, u(x,t)

0s
0.02
0.5 s
0.01
1.0 s
0
1.5 s
-0.01 0 0.2 0.4 0.6 0.8 1 1.2
2.0 s
-0.02
-0.03 2.5 s

-0.04 3.0 s
-0.05
Position, x
Percentage Difference between two Methods:


% (, ) = | | 100%

0.03405 0.04
(1,0) = | | 100%
0.03405
= 17.47%

0.03247 0.03
(2,0) = | | 100%
0.03247
= 7.61%

0.01809 0.02
(3,0) = | | 100%
0.01809
= 10.56%

0.01115 0.01
(4,0) = | | 100%
0.01115
= 10.31%

0.02191 0.02417
(1,1) = | | 100%
0.02191
= 10.31%

0.02846 0.03
(2,1) = | | 100%
0.02846
= 5.41%

0.02081 0.02003
(3,1) = | | 100%
0.02081
= 3.75%

0.00953 0.01
(4,1) = | | 100%
0.00953
= 4.93%

0.00035 + 0.00327
(1,2) = | | 100%
0.00035
= 834.29%

0.01548 0.01999
(2,2) = | | 100%
0.01548
= 29.13%

0.02137 0.0201
(3,2) = | | 100%
0.02137
= 5.94%

0.00919 0.00988
(4,2) = | | 100%
0.00919
= 7.51%

0.01118 + 0.01391
(1,3) = | | 100%
0.01118
= 24.42%

0.00434 + 0.00468
(2,3) = | | 100%
0.00434
= 7.83%

0.00968 0.01369
(3,3) = | | 100%
0.00968
= 41.43%

0.01151 0.01005
(4,3) = | | 100%
0.01151
= 12.68%

0.00989 + 0.00990
(1,4) = | | 100%
0.00989
= 0.10%

0.01944 + 0.02356
(2,4) = | | 100%
0.01944
= 21.19%

0.01018 + 0.00666
(3,4) = | | 100%
0.01018
= 34.58%

0.00510 0.00606
(4,4) = | | 100%
0.00510
= 18.82%
0.00901 + 0.00827
(1,5) = | | 100%
0.00901
= 8.21%

0.02177 + 0.02309
(2,5) = | | 100%
0.02177
= 6.06%

0.02579 + 0.02966
(3,5) = | | 100%
0.00989
= 15.01%

0.01551 + 0.00982
(4,5) = | | 100%
0.00989
= 36.69%

0.01097 + 0.01079
(1,6) = | | 100%
0.01097
= 1.64%

0.01837 + 0.01740
(2,6) = | | 100%
0.01837
= 5.28%

0.03197 + 0.03593
(3,6) = | | 100%
0.03197
= 12.39%

0.03297 + 0.03205
(4,6) = | | 100%
0.03297
= 2.79%

Discussion:

We use two different methods to find different deflection of string in different


time from the 1-D wave equation. The two methods used are analytical and numerical
methods.

In analytical method, we will assume number of terms to sum in getting the


answer. In the calculation above, we used 3 terms in calculations. The higher the
number of terms had chosen, the more accurate the answer will be. For numerical
method, the computer must be used and perform thousands of repetitive calculations
to get the final answer.

For the results, there are some differences between the answer obtained by the
two methods. However, the results obtained by numerical method will be more
accurate. As mentioned above, analytical method required lots of terms in summation
to get more accurate answer. This will be time consuming. Numerical method,
however, can use software to calculate. This can reduce the error and get more
accurate answer.

In conclusion, numerical method is the most suitable method in this situation.


Question 2

Analytical Method

(, ) = (, ) + (, )

(,) =


(, ) = 4 ; 1 () = 0 ; 2 () = 100 ; 1 () = 100 ; 2 () = 100 2

2
= 0 (1 () )
asinh( )
2

1 2
= 0 (0 )
sinh( )
2


1 (, ) =
=1 sinh( )( )


1 (, ) =
=1 (0) sinh( )( )

(, ) =

2
= 0 (2 ()
)
( )

2 2
= 0 (100 )
2( )

100 2 2
= [ ]
( ) 2 0
2

100 2 2
= [ ]
( )
2

200
= ( 1) n = 1, 3, 5,.
( )
2

2 (, ) =
=1 ( )


(, ) =
= ( ) ( )
( )

2
= 0 1 ()
( )

2 1
= 0 (100)
( )

0
200 1
= [ () + ()2 ()]10
(2)

()
= () n = 1, 2, 3, 4....

()
3 (, ) =
=1 sin( )

()
(, ) =
= ( ()) ( )

2
= 0 2 ()

bsinh( )

200 1
= sinh(2) 0 sin( 2 )
1

integration by parts:

1 1 1 1
0 ( 2 ) = [ 0 +
] +
1 2 22 2 0
1 1
0 42 ( 2 ) 1

1 1 1
(1 42 ) 0 ( 2 ) =

1 4
0 ( 2 ) = (42 1)

200 4 ()
= (2) (42 1) = ( )()


4 (, ) =
=1 sin( )()

()
(, ) =
= ( )()

Finally,

(, ) = 1 (, ) + 2 (, ) + 3 (, ) + 4 (, )

200
(, ) = 0 +
=1 ( ( 1)) ( )+
( ) 2 2
2

200 cos() 800()

=1 ( ) sinh (2 ) si n +
=1
(2) (42 )(2)

= ,

(, ) = 4

4
= 0 0 (, )

4 1 2
= 2 0 0 (4) sin()
2

2 1 2
= 0 (4 sin()) 0 ( 2
)

2 1 2 4 2
=

0 (4 sin()) [ ( 2
)+
2 2

2
]
0
0
1
2 4 4
= (4
0
sin()) [ () + 2 2 sin()]

2 4 1
= [ ( ()) 4] 0 ( sin())

32 1 1
= [( ())] [ () + 2 2 sin ]
0
0
32 1 1
= ( ()) [ () + 2 2 sin ]

32
= ( 2
()cos()) m,n = 1, 2, 3, 4,....

2 2
= ( ) +( )

2
= ( ) + ()2
2


= (
()()) m,n =1, 2, 3, 4,....
[( ) +() ]


(, ) =
=1 =1 ( ) ( )

32
(, ) =
=1 =1 ( 2
()co s()) ( ) ()
[( ) +()2 ] 2 2
2

Finally, the solution:

(, ) = (, ) + (, ) (, ) =

32

=1 =1 ( 2
()co s()) ( ) () + 0 +
[( ) +()2 ] 2 2
2

200

=1 ( ( 1)) ( )+
( ) 2 2
2

200() 800()

=1 ( ) (2 ) sin ny +
=1
(2) (42 )(2)

Now, we will substitute (m=1, n =1) as a sample calculation


32
(, ) = 2
() () ( 2 ) () + 0 +
[( ) +()2 ]2
2

200 200 cos()


( ( 1)) ( 2 ) + ( (2)) sinh (2 ) +
( ) 2
2

800()
(4)(2)


11 (, ) = 0.262809 ( 2 ) () + 0 + 55.3270 sin ( 2 ) +
2

0.23777 sinh (2 ) + 0.31703

By using Excel, we obtain the solution for each point for U11(x,y)

1 100 100 100 100 100 100 100 100 100 100

0.8 80 47.6426 63.3632 78.4204 88.9780 92.9363 89.7023 80.1643 66.8382 54.2661

0.6 60 51.0322 52.9641 58.6737 63.7801 66.0579 64.9519 61.4954 58.5865 61.7490

0.4 40 43.8882 39.3754 39.9705 41.7932 42.9395 42.9649 42.7921 44.9977 54.6049

0.2 20 25.4997 21.2449 20.4496 20.8293 21.2804 21.5535 22.1934 24.7197 32.1230

0 0 0 0 0 0 0 0 0 0 0
y/x 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0
Numerical Method
= 0.2

Since it is symmetrical for all point, hence,

1
{1 4 1} = 2 (, )
1
( , 0) = 0

( , 5) = 100

(0 , ) = 100

(10 , ) = 100
2

Sample calculation,

P11 (x=0.2, y=0.2): -4u(1,1) + u(1,0) + u(1,2) + u(0,1) + u(2,1) = h2 (4xy)

-4u(1,1) + 0 + u(1,2) + 20 + u(2,1) = 0.04(4 0.2 0.2)

-4u(1,1) + u(1,2) + u(2,1) = 19.9936

P12 (x=0.2, y=0.4): -4u(1,2) + u(1,1) + u(1,3) + u(2,2) =39.9872

P13 (x=0.2, y=0.6): -4u(1,3) + u(1,2) + u(1,4) + u(2,3) = 59.9808

P14 (x=0.2, y=0.8): -4u(1,4) + u(1,3) + u(2,4) = 179.9744

P21 (x=0.4, y=0.2): -4u(2,1) + u(2,2) + u(1,1) + u(3,1) = 0.0128

P22 (x=0.4, y=0.4): -4u(2,2) + u(2,1) + u(2,3) + u(1,2) + u(3,2) = 0.0256

P23 (x=0.4, y=0.6): -4u(2,3) + u(2,2) + u(2,4) + u(1,3) + u(3,3) = 0.0384


P24 (x=0.4, y=0.8): -4u(2,4) + u(2,3) + u(1,4) + u(3,4) = 99.9488

P31 (x=0.6, y=0.2): -4u(3,1) + u(3,2) + u(2,1) + u(4,1) = 0.0192

P32 (x=0.6, y=0.4): -4u(3,2) + u(3,1) + u(3,3) + u(2,2) + u(4,2) = 0.0384

P33 (x=0.6, y=0.6): -4u(3,3) + u(3,2) + u(3,4) + u(2,3) + u(4,3) = 0.0576

P34 (x=0.6, y=0.8): -4u(3,4) + u(3,3) + u(2,4) + u(4,4) = 99.9232

P41 (x=0.8, y=0.2): -4u(4,1) + u(4,2) + u(3,1) + u(5,1) = 0.0256

P42 (x=0.8, y=0.4): -4u(4,2) + u(4,1) + u(4,3) + u(3,2) + u(5,2) = 0.0512

P43 (x=0.8, y=0.6): -4u(4,3) + u(4,2) + u(4,4) + u(3,3) + u(5,3) = 0.0768

P44 (x=0.8, y=0.8): -4u(4,4) + u(4,3) + u(3,4) + u(5,4) = 99.8976

P51 (x=1.0, y=0.2): -4u(5,1) + u(5,2) + u(4,1) + u(6,1) = 0.032

P52 (x=1.0, y=0.4): -4u(5,2) + u(5,1) + u(5,3) + u(4,2) + u(6,2) = 0.064

P53 (x=1.0, y=0.6): -4u(5,3) + u(5,2) + u(5,4) + u(4,3) + u(6,3) = 0.096

P54 (x=1.0, y=0.8): -4u(5,4) + u(5,3) + u(4,4) + u(6,4) = 99.872

P61 (x=1.2, y=0.2): -4u(6,1) + u(6,2) + u(5,1) + u(7,1) = 0.0384

P62 (x=1.2, y=0.4): -4u(6,2) + u(6,1) + u(6,3) + u(5,2) + u(7,2) = 0.0768


P63 (x=1.2, y=0.6): -4u(6,3) + u(6,2) + u(6,4) + u(5,3) + u(7,3) = 0.1152

P64 (x=1.2, y=0.8): -4u(6,4) + u(6,3) + u(5,4) + u(7,4) = 99.8464

P71 (x=1.4, y=0.2): -4u(7,1) + u(7,2) + u(6,1) + u(8,1) = 0.0448

P72 (x=1.4, y=0.4): -4u(7,2) + u(7,1) + u(7,3) + u(6,2) + u(8,2) = 0.0896

P73 (x=1.4, y=0.6): -4u(7,3) + u(7,2) + u(7,4) + u(6,3) + u(8,3) = 0.1344

P74 (x=1.4, y=0.8): -4u(7,4) + u(7,3) + u(6,4) + u(8,4) = 99.8208

P81 (x=1.6, y=0.2): -4u(8,1) + u(8,2) + u(7,1) + u(9,1) = 0.0512

P82 (x=1.6, y=0.4): -4u(8,2) + u(8,1) + u(8,3) + u(7,2) + u(9,2) = 0.1024

P83 (x=1.6, y=0.6): -4u(8,3) + u(8,2) + u(8,4) + u(7,3) + u(9,3) = 0.1536

P84 (x=1.6, y=0.8): -4u(8,4) + u(8,3) + u(7,4) + u(9,4) = 99.7952

P91 (x=1.8, y=0.2): -4u(9,1) + u(9,2) + u(8,1) = 30.8531

P92 (x=1.8, y=0.4): -4u(9,2) + u(9,1) + u(9,3) + u(8,2) = 55.66333

P93 (x=1.8, y=0.6): -4u(9,3) + u(9,2) + u(9,4) + u(8,3) = 80.7289

P94 (x=1.8, y=0.8): -4u(9,4) + u(9,3) + u(8,4) = 194.87525


-4 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 u(1,1) -19.9936
1 -4 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 u(1,2) -39.9872
0 1 -4 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 u(1,3) -59.9808
0 0 1 -4 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 u(1,4) -179.974
1 0 0 0 -4 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 u(2,1) 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0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 -4 1 0 0 1 0 0 u(8,2) 0.1024
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 -4 1 0 0 1 0 u(8,3) 0.1536
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 -4 0 0 0 1 u(8,4) -99.7952
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -4 1 0 0 u(9,1) -30.8531
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 -4 1 0 u(9,2) -55.6633
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 -4 1 u(9,3) -80.7289
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 -4 u(9,4) -194.875
Matrix 36 x 36
Determinant (using Excel)

= 2.40802 1019

1 = 4.81842 1020

2 = 9.63515 1020

3 = 1.44497 1021

4 = 1.92635 1021

1 4.81842 1020
(1,1) = = = 20.0099
2.40802 1019
(1,2) = 40.01275

(1,3) = 60.00648

(1,4) = 79.99731

Substitute the values of (1,1), (1,2), (1,3) and (1,4) to the equations above to find others (, ) using Excel

u(i,j) i 0 1 2 3 4 5 6 7 8 9 10
x 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
j y
0 0 0 0 0 0 0 0 0 0 0 0 0
1 0.2 20 20.0099 20.0333 20.0886 20.2060 20.4384 20.8790 21.6921 23.1683 25.8449 30.9017
2 0.4 40 40.0127 40.0474 40.1342 40.3228 40.7007 41.4237 42.7660 45.1872 49.3584 58.7785
3 0.6 60 60.0065 60.0351 60.1163 60.3014 60.6817 61.4261 62.8507 65.5585 70.7380 80.9017
4 0.8 80 79.9973 80.0084 80.0524 80.1615 80.3947 80.8635 81.7867 83.6116 87.3062 95.1057
5 1 100 100 100 100 100 100 100 100 100 100 100
Values

(, 0) = 0, (, 5) = 100

(0,1) = 20 (4,1) = 20.2060

(0,2) = 40 (4,2) = 40.3228

(0,3) = 60 (4,3) = 60.3014

(0,4) = 80 (4,4) = 80.1615

(1,1) = 20.0099 (5,1) = 20.4384

(1,2) = 40.0127 (5,2) = 40.7007

(1,3) = 60.0065 (5,3) = 60.6817

(1,4) = 79.9973 (5,4) = 80.3947

(2,1) = 20.0333 (6,1) = 20.8790

(2,2) = 40.0474 (6,2) = 41.4237

(2,3) = 60.0351 (6,3) = 61.4261

(2,4) = 80.0084 (6,4) = 80.8635

(3,1) = 20.0886 (7,1) = 21.6921

(3,2) = 40.1342 (7,2) = 42.7660

(3,3) = 60.1163 (7,3) = 62.8507

(3,4) = 80.0524 (7,4) = 81.7867

(8,1) = 23.1683

(8,2) = 45.1872

(8,3) = 65.5585

(8,4) = 83.6116
(9,1) = 25.8449

(9,2) = 49.3584

(9,3) = 70.7380

(9,4) = 87.3062

(10,1) = 30.9017

(10,2) = 58.7785

(10,3) = 80.9017

(10,4) = 95.1
Percentage Error

For this part of the calculation, U11(0.2,0.2) will be used as an example for the
calculation


= 100%

25.499 20.001
= 100%
25.499

= . %

1 0 0 0 0 0 0 0 0 0 0 0

0.8 0 67.91123 26.26942 2.081009 9.908663 13.49485 9.853517 2.023729 25.09563 60.88541 0.00003

0.6 0 17.58546 13.35045 2.458598 5.454315 8.138718 5.428375 2.203974 11.90032 14.55733 0.00006

0.4 0 8.830307 1.706631 0.409299 3.518364 5.213995 3.587175 0.060956 0.420966 9.60819 0.00007

0.2 0 21.52882 5.703399 1.765544 2.992069 3.956611 3.129363 2.258812 6.276296 19.54372 0.00008

0 0 0 0 0 0 0 0 0 0 0 0

y/x 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

399.1118
= = . %
40
Discussion

As we compare the result for this Poisson problem, the result obtained from
using analytical method and the result obtained using numerical method has a slight
difference.

The percentage error of the entire solution for each respective U(x,y) is
calculated. Also, the overall percentage error of the solution is also calculated to be
9.98%.

This slight inaccuracy is caused by the nature of the analytical method.


Analytical method's accuracy is depends on the number of terms substituted. In our
calculation, we only used one number of terms where, (m=1 and n=1) as sample
calculation. Therefore the result we obtained has a slight difference. The error of this
solution can be improved by substituting more terms.
Question 2b

1
() = 0
2
1
() = 1 1
2
= 0.2

= 0.01

2 = 1

Formula for heat equation of explicit method

(, + 1) = ( 1, ) + (1 2)(, ) + ( + 1, )

Where, = 2 2

0.01
= 1 ( 2 ) = 0.25
0.2
As both end kept at zero temperature, hence (0, ) and (5, ) = 0

Sample calculation

When,

= 1, = 0 (1,1) = (0,0) + (1 2)(1,0) + (2,0)

= (0.25 0) + (1 (2 0.25))(0.2) + 0.25(0.4)

= 0.2

Using Excel to solve,

i= 0 1 2 3 4 5
j= x= 0 0.2 0.4 0.6 0.8 1
0 f(x)/u(i, 0) 0 0.2 0.4 0.4 0.2 0
1 u(i, 1) 0 0.2 0.35 0.35 0.2 0
2 u(i, 2) 0 0.1875 0.3125 0.3125 0.1875 0
3 u(i, 3) 0 0.1719 0.2813 0.2813 0.1719 0
4 u(i, 4) 0 0.1563 0.2539 0.2539 0.1563 0
5 u(i, 5) 0 0.1416 0.2295 0.2295 0.1416 0
6 u(i, 6) 0 0.1282 0.2075 0.2075 0.1282 0
Values (1,5) = 0.1416

(1,0) = 0.2 (2,5) = 0.2295

(2,0) = 0.4 (3,5) = 0.2295

(3,0) = 0.4 (4,5) = 0.1416

(4,0) = 0.2

(1,6) = 0.1282

(1,1) = 0.2 (2,6) = 0.2075

(2,1) = 0.35 (3,6) = 0.2075

(3,1) = 0.35 (4,6) = 0.1282

(4,1) = 0.2

(1,2) = 0.1875

(2,2) = 0.3125

(3,2) = 0.3125

(4,2) = 0.1875

(1,3) = 0.1719

(2,3) = 0.2813

(3,3) = 0.2813

(4,3) = 0.1719

(1,4) = 0.1563

(2,4) = 0.2539

(3,4) = 0.2539

(4,4) = 0.1563

You might also like