##### Related Content

# Area Between Two Curves Calculator

*y = f(x)*=

*y = g(x)*=

*x*=

*x*=

*x =*

## Area Between Two Curves Lesson

#### Lesson Contents

### What is the Area Between Two Curves?

**The yellow shaded region in the image below is an example of the area between two curves.** This area is a 2-dimensional space bound by the curve of the upper function, the curve of the lower function, a left interval endpoint, and a right interval endpoint.

### How to Calculate the Area Between Two Curves

**The formula for calculating the area between two curves is given as:**

& A = \int_{a}^{b} \left( \text{Upper Function } – \text{ Lower Function} \right) \; dx, \hspace{3ex} a \leq x \leq b \end{align}$$

Where *A* is the area between the curves, *a* is the left endpoint of the interval, *b* is the right endpoint of the interval, *Upper Function* is a function of *x* that has the greater value on the interval, and *Lower Function* is a function of *x* that has the lesser value on the interval.

We may specify an interval *x = [a, b]* (which is the equivalent of *a ≤ x ≤ b*) when solving for area between two curves. However, if the two curves have at least two intersection points, we may also use the interval defining the area enclosed by the two curves.

Let’s look at the image below as an example. The blue curve represents *f(x) = x* and the red curve represents *g(x) = x ^{3}*. These two functions’ curves intersect at three points:

*x = -1*,

*x = 0*, and

*x = 1*. Therefore, the area enclosed by them is defined by the interval

*x = [-1, 1]*.

Once we know the interval we are solving on, we must determine the upper and lower functions for the subinterval(s). In some cases, there will only be a single subinterval which is the main interval itself. In other cases, there will be more than one subinterval where the curves cross each other and change positions as upper and lower functions, such as in the image directly above.

We may visually determine the upper and lower functions for each subinterval by viewing a graph of the curves. If a graph of the curves is not available, we may evaluate the value of each function in the middle of each subinterval. For example, a subinterval of *x = [2, 4]* has a middle point of *x = 3*. Therefore, we would plug *x = 3* into each function and evaluate which has a greater value and which has a lesser value at that point.

Once we know the upper and lower functions for the single or multiple subinterval(s), we may set up an area formula for each subinterval. After solving each area formula integral, we sum the results from each to determine the total area between the curves on our interval. For a problem with *n* number of subintervals, this sum will look like:

*A _{total} = A_{1} + A_{2} + … + A_{n}*

For the functions *f(x) = x* and *g(x) = x ^{3}* on the interval defined by their enclosed area, this would be:

& A_{1} = \int_{-1}^{0} \left( \text{Upper Function } – \text{ Lower Function} \right) \; dx = \int_{-1}^{0} \left( x^{3} \; – \; x \right) \; dx \end{align}$$

& A_{2} = \int_{0}^{1} \left( \text{Upper Function } – \text{ Lower Function} \right) \; dx = \int_{0}^{1} \left( x \; – \; x^{3} \right) \; dx \end{align}$$

*A _{total} = A_{1} + A_{2}*

### Example Problem 1

### Example Problem 2

## How the Calculator Works

This calculator is primarily built with the web programming languages HTML (HyperText Markup Language), CSS (Cascading Style Sheets), and JS (JavaScript). The HTML builds the architecture, the CSS creates all visual styling properties of the calculator, and the JS provides calculation functionality.

When the “calculate” button is clicked, a JS function is activated. The user inputted values are read and used for the same exact process outlined in the above example problems. Various intermediate values are saved and formatted for the solution steps.

The indefinite integrals are performed by a JS-native CAS (computer algebra system). The CAS applies integral rules by treating every character like a symbol, providing nearly perfect accuracy. This process is known as symbolic computation.

The final answer is rounded and formatted, then all solution steps are formatted. The answer and steps are printed to the solution area and rendered by a LaTeX (a math visual rendering language/technology) rendering engine.