This is a suplement to the report for the computer project for Math 503. This includes the symbolic derivation of the matrix and the vector for the problem of which is generated from the FEM formulation for this project. I also include a very short Mathematica program which implements the FEM solution.
For where is the length, we deﬁne the shape functions (called tent function in this case) as shown below
The shape function is deﬁned by where
And as shown in this diagram
Now the derivative of is given by
Now we write the weak form in terms of the above shape function (which is our admissible direction). From part 1 we had
Hence, now we pick one admissible direction at a time, and need to satisfy the above integral for each of these. Hence we write
But due to sphere on inﬂuence of the extending to only the above becomes
Hence we obtain equations which we solve for the coeﬃcients
Now to evaluate we write
Now we will show the above for which will be suﬃcient to build the matrix due to symmetry.
Hence breaking the interval into 2 parts we obtain
Now set up a little table to do the above integral.
The above table was build by noting that for it will have the equation when is under the left leg of tent. And it will have the equation when is under the right leg of the tent. This is because for , the argument to is negative and so we ﬂip the argument as per the deﬁnition for shown in the top of this report.
Hence we obtain for the integral in (2)
so the above becomes integral becomes
Multiply by we obtain
Hence we now can set up the system using only the above equation by taking advantage that will be tridiagonal and there is symmetry along the diagonal.
The following is the FEM program to implement the above, with few plots showing how close it gets to the real solution as increases.
I also written a small Manipulate program to simulate the above. Here it is