Skip to content

The area between two graphs

The area between two graphs

The upper graph minus the lower

The area between two graphs is the area under the upper graph minus the area under the lower graph:

S=∫ab(f(x)−g(x))dx\displaystyle S=\int_{a}^{b}\left(f(x)-g(x)\right)dxf(x)≥g(x)\displaystyle f(x)\geq g(x)
  • The formula holds when the graphs, or parts of them, are below the x\displaystyle x-axis too: shifting both graphs up by the same number leaves the difference f(x)−g(x)\displaystyle f(x)-g(x) as it is.
  • When the area is enclosed by the graphs, the limits are the x\displaystyle x-coordinates of the meeting points.
  • When the graphs swap places in the interval – split at the meeting point, and in each part take the upper minus the lower.
The area enclosed by a parabola and a line

The example below calculates the area enclosed by the graphs of f(x)=x+2\displaystyle {f(x)}={x+2} and g(x)=x2\displaystyle {g(x)}={x^2}:

f(x)=x+2\displaystyle f(x)=x+2
g(x)=x2\displaystyle g(x)=x^{2}
  • The meeting points: x2=x+2\displaystyle {x^2}={x+2}, that is x2−x−2=0\displaystyle {x^2-x-2}={0}, and x=−1\displaystyle {x}={-1} or x=2\displaystyle {x}={2}.
  • Between −1\displaystyle -1 and 2 the line is above the parabola (at 0, say: 2>0\displaystyle 2>0).
  • S=∫−12(x+2−x2)dx=[x22+2x−x33]−12=103−(−76)=92\displaystyle {S}={\int_{-1}^{2}\left(x+2-x^2\right)dx}={\left[\frac{x^2}{2}+2x-\frac{x^3}{3}\right]_{-1}^{2}}={\frac{10}{3}-\left(-\frac{7}{6}\right)}={\frac{9}{2}}.
A composite area

When the upper edge of the area passes from one graph to another, split the area where they meet. The example below calculates the area bounded by the graphs of f(x)=x\displaystyle {f(x)}={\sqrt{x}} and of g(x)=2−x\displaystyle {g(x)}={2-x} and the x\displaystyle x-axis:

f(x)=x\displaystyle f(x)=\sqrt{x}
g(x)=2−x\displaystyle g(x)=2-x
  • The meeting point: x=2−x\displaystyle {\sqrt{x}}={2-x} gives x=1\displaystyle {x}={1} (the squared equation is solved by x=4\displaystyle {x}={4} too, but 4=2≠−2\displaystyle {\sqrt4}={2\neq-2}).
  • Between 0 and 1 the area is under x\displaystyle \sqrt{x}: ∫01x dx=23\displaystyle {\int_0^1\sqrt{x}\,dx}={\frac{2}{3}}.
  • Between 1 and 2 the area is under the line: a triangle, 1⋅12=12\displaystyle {\frac{1\cdot1}{2}}={\frac{1}{2}}.
  • The whole area: 23+12=76\displaystyle {\frac{2}{3}+\frac{1}{2}}={\frac{7}{6}}.
Between sin⁡x\displaystyle \sin x and cos⁡x\displaystyle \cos x

The example below calculates the area enclosed by the graphs of sin⁡x\displaystyle \sin x and cos⁡x\displaystyle \cos x, between two neighbouring meeting points:

  • sin⁡x=cos⁡x\displaystyle {\sin x}={\cos x} where tan⁡x=1\displaystyle {\tan x}={1}: x=π4\displaystyle {x}={\frac{\pi}{4}} and x=5π4\displaystyle {x}={\frac{5\pi}{4}}.
  • Between them sin⁡x≥cos⁡x\displaystyle \sin x\geq\cos x (at π2\displaystyle \frac{\pi}{2}, say: 1>0\displaystyle 1>0).
  • S=∫π45π4(sin⁡x−cos⁡x)dx=[−cos⁡x−sin⁡x]π45π4=2−(−2)=22\displaystyle {S}={\int_{\frac{\pi}{4}}^{\frac{5\pi}{4}}\left(\sin x-\cos x\right)dx}={\left[-\cos x-\sin x\right]_{\frac{\pi}{4}}^{\frac{5\pi}{4}}}={\sqrt2-\left(-\sqrt2\right)}={2\sqrt2}.
f(x)=sin⁡x\displaystyle f(x)=\sin x
g(x)=cos⁡x\displaystyle g(x)=\cos x
Exercise 1

The functions f(x)=x2−4x+5\displaystyle {f(x)}={x^2-4x+5} and g(x)=x+1\displaystyle {g(x)}={x+1} are given.

a

Find the x\displaystyle x-coordinates of the meeting points of the graphs.

    b

    Mark the meeting points on the board.

    f(x)=x2−4x+5\displaystyle f(x)=x^{2}-4x+5
    g(x)=x+1\displaystyle g(x)=x+1

    c

    Calculate the area enclosed by the graphs.

      / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

      / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

      Exercise 2

      Calculate the area bounded by the graphs of f(x)=x\displaystyle {f(x)}={x} and of g(x)=1x2\displaystyle {g(x)}={\frac{1}{x^2}} and the line x=2\displaystyle {x}={2}.

      f(x)=x\displaystyle f(x)=x
      g(x)=1x2\displaystyle g(x)=\frac{1}{x^{2}}
      x=2\displaystyle x=2

        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

        Exercise 3

        The functions f(x)=sin⁡2x\displaystyle {f(x)}={\sin2x} and g(x)=sin⁡x\displaystyle {g(x)}={\sin x} are given, for 0≤x≤π\displaystyle 0\le x\le\pi.

        a

        Solve the equation sin⁡2x=sin⁡x\displaystyle {\sin2x}={\sin x} in the interval.

          b

          Calculate the area enclosed by the graphs for 0≤x≤π3\displaystyle 0\le x\le\frac{\pi}{3}.

          f(x)=sin⁡2x\displaystyle f(x)=\sin2x
          g(x)=sin⁡x\displaystyle g(x)=\sin x

            / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

            / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power