Problem 2C

advertisement
Problem 2C
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 and 5 nodes.
3 Nodes = SQRT(((D5/2)-10968750)^2+((D5/2)-7892219)^2)
5 Nodes = SQRT((((G5-G4)/2)-7173515)^2+(((G6+G5)/2)-12420907)^2+(((G7+G6)/2)10557276)^2+(((G8+G7)/2)-4332465)^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
e (x10^-6)
3
7.75552
5
5.04099
The error was then determined using the error expression:
e=
However, with the very large y scale and only a very rough approximation for the first
nodes of the method, numerical values for the error could not be determined using this
error expression. The first error expression does yield appropriate values in that as the
number of nodes increases, the error decreases as it should since the approximated
solution is getting more refined.
Download