The area between two curves

The area enclosed by two curves is found by integrating the upper function minus the lower one. We do it for y=x2y = x^2 and y=2xy = 2x.

The intersections and which is on top

From x2=2xx^2 = 2x we get x(x2)=0x(x - 2) = 0, so x=0x = 0 and x=2x = 2, and the intersections are (0,0)(0, 0) and (2,4)(2, 4). Those two points fix the interval of integration.

Which of the two is on top for 0<x<20 < x < 2? Putting in x=1x = 1 gives x2=1x^2 = 1 and 2x=22x = 2, so the line is above. The integrand is therefore 2xx22x - x^2.

02(2xx2)dx=[x2x33]02=483=43\int_0^2 (2x - x^2) \, dx = \left[ x^2 - \frac{x^3}{3} \right]_0^2 = 4 - \frac{8}{3} = \frac{4}{3}

Seen as a difference

IntegralValue
022xdx\int_0^2 2x \, dx44
02x2dx\int_0^2 x^2 \, dx83\dfrac{8}{3}
Difference43\dfrac{4}{3}

The difference of the two regions is the enclosed part.

It works below the xx-axis too

The subtraction works even when the curves lie below the xx-axis. Translating both down by cc leaves the difference (2xc)(x2c)\left( 2x - c \right) - \left( x^2 - c \right) unchanged, so the area is unchanged as well. As long as the judgment of which is on top is right, there is no need to worry about signs.

Where the two swap places, the interval is split. Cut at each intersection, choose the upper function again on each piece, and add the areas.

Integrating with respect to yy

Solving x2=yx^2 = y and 2x=y2x = y for xx gives x=yx = \sqrt{y} and x=y2x = \dfrac{y}{2}.

04(yy2)dy=1634=43\int_0^4 \left( \sqrt{y} - \frac{y}{2} \right) dy = \frac{16}{3} - 4 = \frac{4}{3}

Stacking thin horizontal rectangles gives the same value.

A shortcut for a parabola and a line

Writing α\alpha and β\beta for the xx-coordinates of the intersections, if the coefficient of x2x^2 is 11 the area is (βα)36\dfrac{(\beta - \alpha)^3}{6}. Here that is (20)36=43\dfrac{(2 - 0)^3}{6} = \dfrac{4}{3}, matching the computation above.

The parabola on the graph is y=x2y = x^2, the line is y=2xy = 2x, and the large dots are the intersections.