Problem 1C

advertisement

Problem 1C

The finite difference method was solved using a maple worksheet. The finite difference formula was used to create a system of equations which were then solved to determine the value at each node. The values of the nodes were then used in piecewise functions to create the approximated solution curve which was then compared to the exact solution. In my previous solution I did not have an accurate expression for the error. I used percent error which was not as accurate a representation for the error between the exact and approximated solutions. To correct this I used where Ui is the approximated value at Uex the exact solution at the midpoint between the nodes. This is a good indication of the error since the values of the approximated solution at the nodes is virtually the same as the exact solution. This is due to the fact in higher numbers of nodes the approximated solution touches the curve at the nodes as seen in the plots of the approximated functions vs the exact solution at the end of each problem. The following expressions were used in excel to determine the errors for 3, 5, 9 nodes.

3 Nodes = SQRT(((D5/2)-0.410156)^2+((D5/2)-0.722656)^2)

5 Nodes = SQRT((((G5)/2)-0.207926)^2+(((G6+G5)/2)-0.592041)^2+(((G7+G6)/2)-

0.787354)^2+(((G8+G7)/2)-0.481364)^2)

9 Nodes = SQRT((((J5)/2)-0.1041412)^2+(((J6+J5)/2)-0.3104401)^2+(((J7+J6)/2)-

0.5049388)^2+(((J8+J7)/2)-0.6681061)^2+(((J9+J8)/2)-0.7706451)^2+(((J10+J9)/2)-

0.7734934)^2+(((J11+J10)/2)-0.6278229)^2+(((J12+J11)/2)-0.2750397)^2)

Using this expression the following was determined to be the error for the problem using the Finite Difference Method in solving for an approximate function:

N 3 5 9 e 0.421621 0.161685 0.058256

The error was then determined using the error expression: e=

The following was determined to be the error:

N 3 5 9 e 0.229272 0.062098 0.015815

Both expressions for error yield expected values. As the number of nodes increases, the error decreases as it should since the approximated solution is getting more and more refined.

Download