You are on page 1of 4

American University of Sharjah

College of Engineering

NGN 509 – Computational Methods


Professor Nai-Shyong Yeh
Assignment #6

Mostafa Mohamed Moussa - 59665

Submitted on 13th of May 2019


∂u ( ∂2 u
x , t )− 2 ( x , t ) =0 , 0< x< 1, t ≥ 0
∂t ∂x
u(0, t) = u(1,t) = 0, t > 0
u(x, 0) = sin(πx), 0 ≤ x ≤ 1
Wat0 is the approximation w(i,0) of u(i,0) at t=0, whereas Exactat0 is the exact value of u at t=0.
Wat005 is the approximation w(i, 0.05) of u(i, 0.05) at t=0.05, whereas Exactat005 is the exact value of u at
t=0.05.
Wat05 is the approximation w(i,0.5) of u(i,0.5) at t=0.5, whereas Exactat0 5is the exact value of u at t=0.5.

Discussion:
We can see from the table that the approximation yields a close enough value to the exact one at t=0 and
t=0.05, but yields a slightly higher error at t=0.5.

You might also like