the region D is the triangle with vertices (1,1) (3,1) (3,2) about the y-axis

find r(x) and h(x) using the shell method.
My teacher got r(x)=x and
h(x)=(1/2x+1/2)-1
but how did he get the equation for h(x)??

the line from (1,1) to (3,2) is just

y-1 = 1/2 (x-1)
y = 1/2 x + 1/2