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 define the shape functions (called tent function in this case) as shown below
The shape function is defined by where
| (1) |
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
And Let
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 influence of the extending to only the above becomes
Hence we obtain equations which we solve for the coefficients
Now to evaluate we write
Now we will show the above for which will be sufficient to build the matrix due to symmetry.
Hence breaking the interval into 2 parts we obtain
Hence
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 flip the argument as per the definition for shown in the top of this report.
Hence we obtain for the integral in (2)
so the above becomes integral becomes
Hence
Which becomes
or
Therefore
Hence
Multiply by we obtain
| (2) |
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