The graph shows y=x in blue, y=-x/2 in red, and x=2 in green. The orange line y=2 shows the upper y limit for the two regions on either side of the y-axis. Each region is to be separately rotated around the y-axis. They can’t be rotated together because they’d overlap, with larger solid completely absorbing the smaller one.
x=2 intersects y=x at (2,2). y=2 sets the lower limit for x for the left region. So the left region has x∈[-4,0] while the right region has x∈[0,2], where x will be the radius of each cylindrical shell of thickness dx. In each case the integral is 2π∫xydx for the volume of each shell.
Effectively we have two (inverted) solid cones with the same height but different base radii, so it’s easy to check the results using geometry. V=πr2h/3 for a cone, where r is the base radius and h=2 the height. Volume of left cone=32π/3 and that of the right cone 8π/3.
There are two things to note. First, since y is measured upward from the x-axis, while h is measured downward from y=2. h=2-y=2+x/2 or 2-x for left and right regions respectively; second, all the values of x are negative (apart from x=0), but the volume, of course, is positive. So, for the left region, the integrand has an infinite succession of negative increments making up the volume. Therefore the volume will show as negative, as we shall see.
Vleft=2π-4∫0x(2+x/2)dx=π-4∫0(4x+x2)dx=
π-[2x2+x3/3]-40=π(0-(32-64/3))=π(-32/3)=-32π/3. As expected, the volume is negative so it must be negated to get the true volume of the solid: 32π/3, which concurs with the geometry.
Vright=2π-4∫0x(2-x)dx=2π-4∫0(2x-x2)dx=
2π[x2-x3/3]02=2π(4-8/3-0)=2π(4/3)=8π/3, which concurs with the geometry.