What is the weak formulation for the boundary value problem \(u''=f(x)\) subject to
boundary conditions \(u(0)=u(1)=0\)?
Let \(\phi (x)=N_2(x+1)\) where \(N_2(x)\) is the piecewise linear function given in Problem A.2. Divide
the unit interval \([0,1]\) interval \(N\) uniform subintervals with endpoints at \(x_k=\frac {k}{N}\), \(k=0,\ldots ,N\). Use
\(\phi (x)\) to define a finite element basis for continuous piecewise linear functions
on the unit interval which interpolates function values at \(x_k\). Suppose \(u_k=u(x_k)\) is
known. Express \(u(x)\) in terms of \(\phi (x)\).
Use the Galerkin method to find equations for \(u_k=u(x_k)\) that approximately solve
the boundary value problem in part (a), using the piecewise linear finite
element basis.