Homework, 15.1: #8 and 12
MAT329, Fall, 2015
Andy Long

#5: This problem allows us to use the masks which I discussed in class. I’ll use mine, in addition....

data={
{-3,-5,-6,-4,-1},
{-1,-2,-3,-1,1},
{1,0,-1,1,4},
{2,2,1,3,7},
{3,4,2,5,9}
}
partA=(-2+2+(-1)+3)*1*2
weights00={
{1,1,1,1,0},
{1,1,1,1,0},
{1,1,1,1,0},
{1,1,1,1,0},
{0,0,0,0,0}};
partB=Total[Total[weights00*data]]*.5*1
BetterWeights={
{1,2,2,2,1},
{2,4,4,4,2},
{2,4,4,4,2},
{2,4,4,4,2},
{1,2,2,2,1}
}/4;
partB=Total[Total[BetterWeights*data]]*.5*1

#8: The midpoint rule with m=n=2 suggests that we simply need to estimate the function at the center of each square. Then, since each square has unit area, we multiply each value by 1 and add them up! I.e.,

result=(3.3+5.1+1.3+3.4) (* or so! :*)

#12: The height over this rectangular region [0,5] x [0,3] is given by 5-x -- that’s a plane, independent of y, so it’s a wedge. The volume will be average of the max and min heights times the area of the region. That is, the average of 0 and 5, 5/2, times 15.

volume=5/2*15
f[x_,y_]:=5-x
Plot3D[f[x,y],{x,0,5},{y,0,3}]
Integrate[f[x,y],{x,0,5},{y,0,3}]