We're asked to find the derivative of the following function with respect to $$x$$:

$$$\label{definition-function} y = 3x^2$$$

Performing the differentiation process

\begin{align*} y' &= \lim_{\Delta{x} \to 0} \frac{f(x + \Delta{x}) - f(x)}{\Delta{x}} \\ &= \lim_{\Delta{x} \to 0} \frac{3(x + \Delta{x}) ^ 2 - 3x^2}{\Delta{x}} \\ &= \lim_{\Delta{x} \to 0} \frac{3x^2 + 6x\Delta{x} - \Delta{x}^2 - 3x^2}{\Delta{x}} \\ &= \lim_{\Delta{x} \to 0} 6x - \Delta{x} \\ &= 6x \end{align*}

Let's say that we're given the same problem in a reversed version, we're asked to find the original function of the following derivate function

$$$\label{definition-function-derivate} y' = 6x$$$

Why? because "when we formulate physical problems mathematically the given physical information usually leads to derived functions, and the primary objective in solving the physical problems is to find the original functions" 1

We know that the original function corresponding to \eqref{definition-function-derivate} is \eqref{definition-function} but is there an algorithm to find the derivative for the case above? A possible algorithm for the differentiation of the function above might be:

for each term in the function
- mutiply the coefficient with the exponent of the independent variable
- reduce the exponent of the independent variable by one


Reversing the algorithm above means that we're actually trying to find the original function, a reversed version of the algorithm above might be:

for each term in the function
- increment the exponent of the independent variable by one
- divide the coefficient with the exponent of the independent variable


If we apply it to \eqref{definition-function-derivate} we get the original function:

$6x \to 6x^2 \to 6/2x^2 \\ 3x^2$

However we have overlooked one point, it's also true that \eqref{definition-function-derivate} is the derived function of $$y = 3x^2 + C$$ where $$C$$ is some constant, this means that a constant term that was in the original function doesn't show up in the derived function, in the view of this possibility we must say that

$y = 3x^2 + C$

The process of going from the derived function to the original function is called antidifferentiation or integration, the original function is called the primitive function or the indefinite integral of the given function (which is shortened to integral)

Before proving the correctness of the previous algorithm let's try it on similar functions, the formula for instantaneous acceleration (the instantaneous rate of change of speed with respect to time) is

$v' = 32$

Here the independent variable is actually $$x^0$$, applying the 2-step algorithm to find the original function

$32t^0 \to 32t \to 32/1\;t \\ 32t$

Same as above, since the original function might have had a constant

$v = 32t + C$

## Straight line motion in one direction

Galileo obtained a basic physical principle, if one neglects air resistance all objects near the earth's surface fall to earth with the same acceleration which is constant (a downward acceleration), the constant value is equal to:

$32 \text{ feet/s }$

find how long it takes for an object dropped from 400 feet above the earth's surface to reach the surface.

The instantaneous acceleration as seen above is

$a = v' = 32$

Applying the 2-step algorithm

$v = 32t + C$

If the object is dropped it leaves with zero speed (when $$t=0$$, $$v=0$$), substituting these values in the formula above to find the value of $$C$$

$0 = 32 * 0 + C \\ C = 0$

Therefore the correct formula for speed is

$$$\label{speed-example} v = s' = 32t$$$

Applying a new process of antidifferentiation to \eqref{speed-example}

$s = 16t^2 + C$

If we agree to measure distance from the point the object is dropped then the initial distance when $$t = 0$$ is also zero, $$C$$ will also have a value of zero, hence the correct formula for distance is

$s = 16t^2$

To answer the original equation we must find out the value of $$t$$ given that $$s=400$$:

$t = \pm\sqrt{\frac{s}{16}} = \pm\sqrt{\frac{400}{16}} = \pm\sqrt{25} = \pm 5$

For the physical problem only the positive solution is valid, with the same knowledge we can also tackle problems where the object is thrown instead of dropped

find how long it takes for an object thrown downward from with a velocity of 100 ft/s from a height of 1000 feet to reach the earth's surface

Starting with the formula of instantaneous acceleration:

$a = 32$

Applying the 2-step algorithm

$v = 32t + C$

The object is thrown downwards instead of dropped which means that when $$t=0,\;v=100$$

$100 = 32 * 0 + C \\ C = 100$

Hence the correct formula for speed is

$v = 32t + 100$

Applying a new process of antidifferentiation

$s = 16t^2 + 100t + C$

If we agree to measure the distance from the point where the object is thrown then $$C = 0$$

$s = 16t^2 + 100t$

It's convenient to measure distance from the earth's surface and not from any arbitrary distance like the examples above, however this means that the upward direction is positive, then the acceleration of the gravity must be negative i.e. $$-32\;ft/sec^2$$ so that the distance traveled by reason of this acceleration is recorded as downward

$v' = -32\;ft/sec^2$

Then by antifidifferentiation

$$$\label{speed-raw} v = -32t + C$$$

if an object is thrown upward it must have an initial velocity upward, let's say that an object located in the earth's surface is thrown upward with an initial velocity equal to $$128\;ft/s$$, substituting these values in \eqref{speed-raw} (when $$t = 0,\; v = 128$$):

$128 = -32 * 0 + C \\ C = 128$

so that

$$$\label{velocity-1} v = -32t + 128$$$

Applying a new process of antidifferentiation to find the distance traveled upward at any time $$t$$

$s = -16t^2 + 128t + C$

Because we have agreed to measure distance from the surface the value of $$C$$ is zero because when $$t = 0$$ the object is still on the ground

$$$\label{distance-1} s = -16t^2 + 128t$$$

One question of interest is the maximum height attained by an object whose motion is represented by \eqref{distance-1}, this problem could be answered if we knew at what $$t$$ the object attains maximum height, however we can use \eqref{velocity-1} to obtain the time since we know that the instant the object attains maximum height the velocity will be zero (the object will rise until it's velocity is zero and then fall), substituting zero as the speed in \eqref{velocity-1}

$0 = -32t + 128 \\ t = \frac{128}{32} = 4$

Now that we know the time at which the object attains the maximum height let's replace it on \eqref{distance-1}

\begin{align*} s &= -16(4)^2 + 128 * 4 \\ &= -256 + 512 \\ &= 256 \text{ feet } \end{align*}

We can generalize the solutions above for objects thrown in any planet, we can represent the acceleration with the symbol $$g$$, so the acceleration due to this gravity felt from the ground is

$$$\label{acceleration} a = -g$$$

By antidifferentiation

$v = -gt + C$

Since it's a generalization we don't know the initial velocity (the value of $$C$$ is some constant), let's represent the initial velocity of the object with the symbol $$v_0$$, hence the formula for the velocity is

$$$\label{speed} v = v_0 - gt$$$

Applying a new process of antidifferentiation to find the distance of the object from the ground

$s = v_0t - \frac{gt^2}{2} + C$

For this case we also don't know the initial distance from the ground the object is when $$t = 0$$, let's represent the initial distance from the ground with the symbol $$s_0$$

$$$\label{distance} s = s_0 + v_0t - \frac{gt^2}{2}$$$

// TODO: introduce the integral symbol

## Definite Integral

### Area as the limit of the sum

Let's say we want to compute the area of the graph below $$f(x)$$ and the $$x$$-axis bounded by the vertical lines $$x = a = 1$$ and $$x = b = 2$$

$f(x) = x^2$

An approximation to the area can be found by taking the maximum y-value in $$(a, b)$$ called $$m_1$$ and multiplying it $$(b - a)$$ which will be expressed as $$\Delta(x)$$, then the first approximation is $$m_1\Delta{x}$$

$S_1 = m_1\Delta{x}$

We can obtain a better approximation if we divide the interval $$(a, b)$$ into two equal parts each denoted by $$\Delta{x}$$ multiplied by the maximum y-value in each part and then form the sum

$S_2 = m_1\Delta{x} + m_2\Delta{x}$

Dividing the interval $$(a, b)$$ into $$n$$ equal parts each denoted as $$\Delta{x}$$ and choosing $$n$$ maximum y-values for each part we form the sum:

$S_n = m_1\Delta{x} + m_2\Delta{x} + \ldots + m_n\Delta{x}$

The quantity $$n$$ can increase without a limit, to each $$n$$ there's a corresponding sum, now the quantity

$\lim_{n \to \infty} S_n$

Seems to give the exact area of the under the curve bounded by $$a$$ and $$b$$ therefore

$\lim_{n \to \infty} S_n = A$

There is another notation for this limit which keeps the bounds that determine the area, if $$y = f(x)$$ then we write for the limit:

$\int_{a}^{b} f(x) dx$

The elongated S denotes integration, the symbols $$a$$ and $$b$$ are the left and right ends of the domain whose area is being calculated and $$f(x)dx$$ is a reminder that we took rectangles of height $$y_i$$ and width $$\Delta{x_i}$$.

### Evaluation of definite integrals

Another way to find the area is as follows, previously we found an approximation of the area as ($$\Delta{x} * max(f(x))$$ for all $$x \in [a, b]$$), similary we can take the lower bound instead ($$\Delta{x} * min(f(x))$$ for all $$x \in [a, b]$$) let's assume that somehow we have found the area below the curve bounded by $$[a, x_0]$$, moving $$x_0$$ to the right will generate an increment in the area, this change in the area can be expressed as

$\Delta{A} = \bar{y} * \Delta{x}$

$\frac{\Delta{A}}{\Delta{x}} = \bar{y}$

The value of $$\bar{y}$$ is some value between $$f(x_0)$$ and $$f(x_0 + \Delta{x})$$, to obtain the instantaneous rate of change in the area with respect to $$x$$ we must find the limit of $$\Delta{A}/\Delta{x}$$ as $$\Delta{x}$$ approaches zero, also as $$\Delta{x}$$ approaches zero the value of $$\bar{y}$$ also approaches $$f(x_0)$$ therefore

$\frac{\Delta{A}}{\Delta{x}} = y_0 = f(x_0)$

Because this is true for any value of $$x$$ in the interval $$[a, b]$$

$\frac{\Delta{A}}{\Delta{x}} = y = f(x)$

To find the value of $$A(x)$$ we apply antidifferentiation

$A = \int f(x) \; dx$

As an example let's apply the above to the function $$f(x) = x^2$$

$$$\label{integral-eval} A = \int x^2 \; dx = \frac{x^3}{3} + C$$$

When $$x = a = 1$$ we know that the area is zero then

\begin{align*} 0 &= \frac{1^3}{3} + C \\ C &= -\frac{1}{3} \end{align*}

Then

$A = \frac{x^3}{3} - \frac{1}{3}$

is the function which expresses the area from $$a$$ to any position $$x$$, to find the area bounded by $$[a, b]$$ we substitute $$x = b = 2$$ and get

$A = \frac{2^3}{3} - \frac{1}{3} = \frac{7}{3}$

We can obtain the same result if we take the expression \eqref{integral-eval} substituting 2 for $$x$$, 1 for $$x$$ and then subtracting the second result from the first

$\frac{2^3}{3} + C - (\frac{1}{3} + C) = \frac{7}{3}$

The constant of the integration is eliminated in the process, this process is actually called the fundamental theorem of the calculus

$\int_{a}^{b} f(x)\;dx = F(b) - F(a)$

Where $$F(x)$$ is the antiderivative of $$f(x)$$

### Additional properties of the definite integral

$\int_{a}^{b} f(x)\;dx = -\int_{b}^{a} f(x)\;dx$

$\int_{a}^{b} f(x)\;dx = \int_{a}^{x_0} f(x)\;dx + \int_{x_0}^{b} f(x)\;dx$

$\int_{a}^{b} u\;dx \pm \int_{a}^{b} v\;dx = \int_{a}^{b} (u \pm v)\;dx$

$\frac{d}{dx} \int_{a}^{x} u\;du = f(x)$

### Numerical methods for evaluating definite integrals

#### Trapezoid rule

Let's imagine that we have a curve which it's impossible to find the antiderivative thus the area below the curve, instead of calculating it we can approximate it's value by using trapezoids instead of rectangles as we've done before, we also know that approximating the area below the curve using the $$min(f(x))$$ value found in the interval $$[a, b]$$ multiplied by $$b - a$$ denoted as $$\Delta{x}$$ gives a lower bound of the area below the curve

$\underline{S_n} = y_0 \Delta{x} + y_1 \Delta{x} + \ldots y_{n-1} \Delta{x}$

Another appoximation was using the $$max(f(x))$$ value found in the interval $$[a, b]$$ multiplied by $$b - a$$ denoted as $$\Delta{x}$$ which gives the upper bound of the area below the curve

$\overline{S_n} = y_1 \Delta{x} + y_2 \Delta{x} + \ldots y_{n} \Delta{x}$

Calculating the average of these sums will definitely give an approximate result

$S_n = \tfrac{1}{2} (y_0 + y_1) \Delta{x} + \tfrac{1}{2} (y_1 + y_2) \Delta{x} + \ldots + \tfrac{1}{2} (y_{n-1} + y_n) \Delta{x}$

Each of these terms is the area of a trapezoid of height $$\Delta{x}$$ and bases $$y_i$$, $$y_{i + 1}$$

Rewriting the equation above

$\int_{a}^b f(x)\;dx \approx \Delta{x} * (\tfrac{1}{2}y_0 + y_1 + y_2 + \ldots + y_{n-1} + \tfrac{1}{2} y_n)$

#### Simpson's rule

Simpson rule approximates the value of a definite integral by using quadratic polynomials of the form

$$$\label{quadratic} y = ax^2 + bx + c$$$

which pass through three points belonging to the curve which are $$(-h, y_0)$$, $$(0, y_1)$$, $$(h, y_2)$$

The area below the curve bounded by $$[-h, h]$$ is

\begin{align*} A &= \int_{-h}^{h} (ax^2 + bx + c) \; dx \\ &= \frac{ax^3}{3} + \frac{bx^2}{2} + cx \; \Big|_{-h}^h \\ &= \frac{2ah^3}{3} + 2ch \\ &= \frac{h}{3} (2ah^2 + 6c) \end{align*}

Since the points $$(-h, y_0)$$, $$(0, y_1)$$ and $$(h, y_2)$$ are on the curve, they satisfy \eqref{quadratic}

\begin{align*} y_0 &= ah^2 - bh + c \\ y_1 &= c \\ y_2 &= ah^2 + bh + c \end{align*}

The quantity

$y_0 + 4y_1 + y_2 = (ah^2 - bh + c) + 4c + (ah^2 + bh + c) = 2ah^2 + 6c$

is equal to a part of the area under the quadratic polynomial found above, therefore

$A = \frac{h}{3} (y_0 + 4y_1 + y_2)$

To find the area bounded by $$[a, b]$$ we have to take an even number $$n$$ of subintervals of equal length

$h = \frac{b - a}{n}$

$$n$$ subintervals are defined with $$n + 1$$ points which are:

$x_0 = a, \quad x_1 = a + h, \quad x_2 = a + 2 * h + \ldots + x_n = a + nh = b$

We can estimate the value of the integral by adding the areas computed for each unique contiguous pair of subintervals

\begin{align*} \int_{a}^{b} f(x) \; dx &\approx \tfrac{h}{3} (y_0 + 4y_1 + y_2) + \tfrac{h}{3} (y_2 + 4y_3 + y_4) + \cdots +\tfrac{h}{3} (y_{n-2} + 4y_{n-1} + y_n) \\ &\approx \tfrac{h}{3} (y_0 + 4y_1 + 2y_2 + 4y_3 + 2y_4 + \ldots + 4y_{n-1} + y_n) \\ \end{align*}

### Physical applications of the definite integral

#### The calculation of work

When a force applied to an object causes a displacement it's said that work was done upon the object, this quantity expressed with the symbol $$W$$ is the product

$W = Fs$

As an example let's calculate the work done by the force of gravity, choosing the direction from the center of the earth upward as the positive direction we can use Newton's law for gravitation, this law states that any two objects attract each other and this force is given quantitatively by

$F = \frac{GmM}{r^2}$

$$G$$ is a constant, $$m$$ and $$M$$ are the masses of the two objects and $$r$$ is the distance between the objects (idealized as point particles)

Since this force of gravity actually pulls objects towards the center of the earth and we chose the direction from the center of the earth upward as positive this quantity must be negative

$$$\label{gravity} F = -\frac{GmM}{r^2}$$$

To calculate the work done by gravity we cannot multiply the force of gravity by the displacement because the force actually varies from point to point along the path, suppose the object is at some distance $$r$$ from the center of the earth and gravity pulls the object downward a small distance $$\Delta{r}$$ then we work done by gravity is

$\Delta{W} = F\Delta{r}$

By division

$\frac{\Delta{W}}{\Delta{r}} = F$

We now determine the limit of $$\tfrac{\Delta{W}}{\Delta{r}}$$ as $$\Delta{r}$$ approaches 0 which is the rate of change of work with respect to the displacement over the path

$\frac{dW}{dr} = \lim{\Delta{r} \to 0} \frac{\Delta{w}}{\Delta{r}} = F$

Replacing \eqref{gravity}

$\frac{dW}{dr} = -\frac{GmM}{r^2}$

To find $$W$$ we apply an antidifferentiation process

$W = \int{-\frac{GmM}{r^2}} = \frac{GmM}{r} + C$

Assuming that initially when the object was at $$r = r_1$$ there was no force being applied to it therefore $$W = 0$$ and $$C = -GmM/r_1$$ and

$W = \frac{GmM}{r} - \frac{GmM}{r_1}$

1. Excerpt From: Morris Kline. “Calculus: An Intuitive and Physical Approach(Second Edition).” [return]