Solve the same differential equation using piecewise linear basis functions with half the grid spacing (i.e., with h=1/(2N)).
Given that the exact solution is u(x) = (1/9)(e-3x+(1-e-3)x-1), compute the error in your solutions. How do you compare the results of the two methods? Which is more accurate for the amount of computational work involved?
To set up a finite element method for this problem we need basis
functions for which
is absolutely
continuous.
To set up such a basis, let
Show that for
. Suppose that
is the constant k.
Compute the stiffness matrix:
. [Hint: cij=0 unless i and j differ by less than 3.
Also, be careful of the integrals with i or j close to N
because of the limit x=L for the integral.]
Set up the equations to solve for ui in our approximate solution
Also check the case .