# Homework 2, due 08.00, 24/2-2015¶

For these hand in your own report. Discussion within groups are encouraged.

1. EG 1.1

2. EG 1.3

3. (By Tom Hagstrom) Write a program to compute quadratic interpolants on triangles using the nodal configuration described in Proposition 1.34 and shown in Table 1.1. Use it to interpolate the function $$f(x,y)=\sin{(8 \pi x y)}$$ on a mesh defined by:

1. Breaking the unit square into squares of size $$h_1=1/25$$, $$h_2 = 1/50$$, and $$h_3 = 1/100$$. The vertices of the square $$(j,k)$$ will be $$(jh,kh)$$, $$((j+1)h,kh),\, (jh,(k+1)h),\,((j+1)h,(k+1)h)$$.
2. Breaking each square into two triangles with vertices $$(jh,kh), \, ((j+1)h,kh), \, ((j+1)h,(k+1)h)$$ and $$(jh,kh),\, (jh,(k+1)h), \, ((j+1)h,(k+1)h)$$.

In each case compute the error in interpolating the function and its first derivatives at the point in each triangle whose coordinates are the average of the coordinates of the vertices $$((j+2/3)h,(k+1/3)h)$$ and $$((j+1/3)h,(k+2/3)h)$$ respectively. Comment on the convergence rate of the maximum errors - does it conform to theory?