# Area Problem

## Related calculator: Definite and Improper Integral Calculator

Suppose that we are given continuous function `y=f(x)` on `[a,b]` such that `f(x)>=0` for all `x in [a,b]`.

We want to find area `S` that lies under curve `f(x)` and bounded by lines `x=a`, `x=b` and x-axis.

Before doing this imagine right bound `b` is not fixed, we can move it. Then for different values of right bound we will obtain different values of area, so we can consider area as function `P(x)` of right bound. In particular, `P(a)=0` (because area from `a` to `a` is 0) and `P(b)=S`.

To get a better understanding what is `P(x)` consider next example.

**Example 1.** Consider function `y=x-1`. If `P(x)` represents area of figure under `y=x`, above x-axis on interval `[1,x]` find `P(1)`, `P(2)`, `P(3)` and `P(4)`.

`P(1)` is area on interval `[1,1]`, so it is 0 (because length of interval is 0).

`P(2)` is area on interval `[1,2]`. It is area of right-angled triangle with legs 1 and 1. So, `P(2)=1/2*1*1=1/2`.

`P(3)` is area on interval `[1,3]`. It is area of right-angled triangle with legs 2 and 2. So, `P(3)=1/2*2*2=2`.

`P(4)` is area on interval `[1,4]`. It is area of right-angled triangle with legs 3 and 3. So, `P(4)=1/2*3*3=9/2`.

As can be seen `P(x)` is indeed function: for any particular value of `x` there is corresponding `P(x)`.

Now, suppose we want to find derivative of `P(x)`. For this increase `x` by `Delta x`. Corresponding increase in area is `Delta P=P(x+Deltax)-P(x)` (figure ACEF).

If we denote maximum and minimum value of `f(x)` on interval `[x,x+Deltax]` by `M` and `m` respectively, then area of figure ACEF is less than area of rectangle ACDF and greater than area of rectangle ABEF.

Since area of rectangle ACDF is `MDelta x` (height multiplied by base)and area of rectangle ABEF is `mDelta x` then

`mDelta x<Delta P<MDelta x` or `m<(Delta P)/(Delta x)<M`.

Now let `Delta x->0`. Since `f` is continuous then both `m` and `M` approach `f(x)`.

Thus, by Squeeze Theorem `lim_(Delta x->0)(Delta P)/(Delta x)=f(x)`.

But we recognize in `lim_(Delta x->0)(Delta P)/(Delta x)` derivative of `P(x)`, so `P'(x)=f(x)`.

In other words `P(x)=int f(x)dx=F(x)+C`.

Since `P(a)=0` then `0=P(a)=F(a)+C` or `C=-F(a)`.

Therefore, `P(x)=F(x)-F(a)`.

**Newton-Leibniz Formula.** Area of figure `P(x)` that lies under curve `y=f(x)`, above x-axis on interval `[a,x]` is `P(x)=F(x)-F(a)`.

Returning to our initial problem we have that `S=F(b)-F(a)`.

Area of figure that lies under curve `y=f(x)`, above x-axis and between lines `x=a` and `x=b` is `S=F(b)-F(a)` where `F` is antiderivative of `f`.

**Example 2.** Find area under `y=x^2`, above x-axis on interval `[0,2]`.

We have that `F(x)=int x^2dx=1/3 x^3` (note that we need particular derivative here).

Now, according to Newton-Leibniz Formula required area is `S=F(2)-F(0)=1/3*2^3-1/3*0^3=8/3`.

All from above can be easily extended on case when function can take negative values. For this we only need to consider areas under x-axis negative.

Indeed, if we want to find area enclose by parabola `y=-x^2`, x-axis on interval `[0,2]` then according to Newton-Leibniz Formula we have that `S=F(2)-F(0)` where `F(x)=int -x^2dx=-1/3 x^3`. So, `S=-8/3`. Since `-x^2` is reflection of `x^2` about x-axis then this area lies below x-axis, and, therefore, negative.