# Area under a Curve

How to find the area under a curve (between the curve and the x-axis): formula, 2 examples, and their solutions.

## Formula

### Formula

The area under a curve
(between the curve and the x-axis)
is the integral of the curve function.

Riemann Sum to Definite Integral

If the curve is above the x-axis,
the area is the integral of f(x):
ac f(x) dx.

But if the curve is below the x-axis,
the area is the integral of -f(x):
cb [-f(x)] dx.
to make the sign of the integral plus.)

So the area under a curve
is the integral of |f(x)|:
ab |f(x)| dx.

## Example 1

### Solution

Draw y = x2 - 2x.
y = x2 - 2x = x(x - 2)
So the zeros of the graph are 0 and 2.

Draw x = 3.

Then color the region
that is bounded by these two graphs and the x-axis.

If 0 ≤ x ≤ 2,
the area is below the x-axis.

So the below area is
the integral of -f(x):
02 -(x2 - 2x) dx.

If 2 ≤ x ≤ 3,
the area is above the x-axis.

So the above area is
the integral of f(x):
23 (x2 - 2x) dx.

So this is the area of the bounded regions.

-(x2 - 2x) = 2x - x2

Solve the integral.

Definite Integral: How to Solve

The integral of 2x - x2 is
2⋅[1/2]x2 - [1/3]x3.

The integral of x2 - 2x is
[1/3]x3 - 2⋅[1/2]x2.

Integral of a Polynomial

2⋅[1/2]x2 - [1/3]x3
= x2 - [1/3]x3

[1/3]x3 - 2⋅[1/2]x2
= [1/3]x3 - x2

Put 2 and 0
into x2 - [1/3]x3.

Put 3 and 2
into [1/3]x3 - x2.

22 = 4
-[1/3]⋅23 = -[1/3]⋅8

-(02 - [1/3]⋅03) = -0

+[1/3]⋅33 = +9
-32 = -9

+[1/3]⋅23 = +[1/3]⋅8
-22 = -4

-[1/3]⋅8 = -8/3

Cancel +9 and -9.

-([1/3]⋅8 - 4) = -8/3 + 4

4 + 4 = 8
-8/3 - 8/3 = -16/3

To solve 8 - 16/3,
multiply 3/3 to 8.

Then 8⋅3/3 - 16/3 = 24/3 - 16/3.

24/3 - 16/3 = 8/3

## Example 2

### Solution

y = sin x (0 ≤ x ≤ 2π) means
one cycle of y = sin x.

So draw a cycle of y = sin x.

Sine: Graph

Color the region
that is bounded by y = sin x and the x-axis.

If 0 ≤ x ≤ π,
the area is above the x-axis.

So the above area is
the integral of f(x):
0π sin x dx.

If π ≤ x ≤ 2π,
the area is below the x-axis.

So the below area is
the integral of -f(x):
π (-sin x) dx.

So this is the area of the bounded regions.

+∫π (-sin x) dx = -∫π sin x dx

Solve the integral.

The integral of sin x is
-cos x.

-[-cos x]π = +[cos x]π

Put π and 0
into -cos x.

Put 2π and π
into cos x.

-cos π = -(-1)
-(-cos 0) = -(-1)

+cos 2π = +1
-cos π = -(-1)

Cosine Values of Commonly Used Angles

-(-1) = +1

+1 + 1 + 1 + 1 = 4