Steven Dutch, Natural and Applied Sciences,
University of Wisconsin - Green Bay

First-time Visitors: Please visit Site Map and Disclaimer. Use "Back" to return here.

Calculus is a subject that is *way* harder than it needs to be. The
three things you need to know about calculus are:

- The
*derivative*is the slope of a curve - The
*integral*is the area under a curve - Taking an integral and taking a derivative (called differentiation) are inverse operations

The math below can be a bit tedious but it never involves anything beyond algebra and trigonometry.

A derivative is the slope of a curve. Consider the curve y = x^{2}.
What's the slope of the curve at some value of x? We can solve this problem
geometrically, but for a lot of other curves we can't, so we find the slope of a
line between two points and see what happens as the distance becomes smaller and
smaller. Consider two points, x and x + h. The corresponding y values are x^{2} and
(x+h)^{2}, or x^{2}+2hx + h^{2}. Let's call the x
distance dx, and the y distance dy. Then dx = (x+h)-x = h, and dy = (x^{2}+2hx +
h^{2 })-x^{2} = 2hx + h^{2 }.

Thus the slope is the change in y divided by the change in x, or dy/dx = 2hx + h^{2 }/h
= 2x + h. A derivative of zero means the curve has zero slope (its tangent is
horizontal).

Now here's the good part about calculus. What happens when h becomes very
tiny? If x = 3, say, and h is 0.000001, we can pretty much ignore h. So the **limit**
of the slope as h becomes very tiny is 2x. If you plot the curve y = x^{2},
the slope at x = 1 is 2, the slope at x=2 is 4, and so on. The tangent at x=2
will pass through (1,0), (2,4) and (3,8). Try it and see.

If we can ignore h as it becomes very small, then h^{2 }, h^{3 },
h^{4 } and so on become tiny even faster. In many cases, when higher
powers of h turn up in an approximation, we can ignore them entirely. This works
*if*:

- There are few terms. If there are so many terms that they add up to an appreciable amount, then we can't ignore them.
- The terms have small coefficients. If the terms have very large coefficients, then the terms may no longer be negligible.

We can apply the method above to find the derivative of any power of x. The
derivative of x^{n} is found by finding the limit of ((x+h)^{n}
-x^{n})/h. The binomial expansion of (x+h)^{n }= x^{n }+
nhx^{n-1} + terms with higher powers of h that we can ignore if h
becomes extremely tiny. So the limit becomes (x^{n }+ nh x^{n-1}
- x^{n })/h = ( nh x^{n-1 })/h = nx^{n-1}. **The
derivative of x ^{n }is nx^{n-1} **(for any n, even
negative).

What's the derivative of a constant? A constant has the same value for all x,
so the limit of (c - c)/h is obviously zero. Also a constant plots as the
horizontal line y = c, and obviously has zero slope. **So the derivative of a
constant is zero. **

What's the derivative of a constant times a function? The derivative of f(x)
is the limit of ((f(x+h)-f(x))/h as h becomes very small. The derivative of cf(x)
is the limit of ((cf(x+h)-cf(x))/h = c((f(x+h)-f(x))/h. So the **derivative of
a constant times a function is the constant times the derivative of the
function.**

We can apply the approximation method to other functions as well. For
example, what's the derivative of sin(x)? We find the limit of (sin(x+h)-sin(x))/h.
This equals (sin(x)cos(h)+cos(x)sin(h)-sin(x))/h. Now as h gets very tiny, cos(h)
approaches 1 and sin(h) approaches h. So for very tiny h, the limit
becomes

(sin(x)+h cos(x)-sin(x))/h = h cos(x)/h = cos(x). Thus, the derivative of sin(x)
is cos(x). In other words, at x = 0, where the sine curve is at its steepest,
the slope is cos(0) = 1, and at 90 degrees, where the sine curve reaches maximum
and starts to decrease, the slope is cos(90) = 0.

For the logarithm function, we find the limit of (log(x+h)-log(x))/h. This
can be rewritten as log((x+h)/x)/h = log(1+h/x)/h. As h/x becomes tiny,
log(1+h/x) approaches h/x. **So the derivative of log(x) = (h/x)/h = 1/x. **

For the exponential function, we find the limit of (exp(x+h)-exp(x))/h. This
can be rewritten as (exp(h)exp(x)-exp(x))/h = (exp(x)(exp(h)-1)/h. As h becomes
tiny, exp(h) approaches 1, but if h is not zero, exp(h) is actually a bit
larger. For very tiny h, exp(h) is very nearly 1+h. Thus, for very small h, the
limit becomes exp(h)(1+h-1)/h = exp(x)h/h = exp(h). **The exponential function
is its own derivative.**

**Can it really be this simple?** Well, yes it is, once you eliminate the
formal junk that clutters the average calculus text and get down to finding
results. Formal mathematics is important. So is fixing jet engines, but you
don't need to be a trained aviation mechanic to fly a plane.

There are two ways of writing derivatives. One way emphasizes the slope definition: dy/dx means change in x divided by change in y. Although mathematical purists insist dy/dx is not a fraction, most of the time you can regard it as one. But dx and dy are single units: dx does not mean d times x, so you can't cancel the d's to get y/x.

The other notation treats derivatives as a function. The derivative of f(x) can be written f'(x). This is sometimes more compact and neater than dy/dx.

What's the derivative of f(x) + g(x)? Here, we need to find the limit of (f(x+h) + g(x+h) - f(x) - g(x))/h as h becomes very small. It's easy to see we can rearrange terms to get (f(x+h) - f(x))/h + (g(x+h) - g(x))/h. This is just the sum of the two derivatives. It's easy to see that subtraction works the same way. So:

**(f(x) + g(x))' = f'(x) + g'(x)**and**(f(x) - g(x))' = f'(x) - g'(x)**

How about products? What is the derivative of f(x)g(x)? We're trying to find
the limit of

[f(x+h)g(x+h) - f(x)g(x)]/h. Now f'(x) is the slope of f(x), so for tiny h,
f(x+h) = f(x) + hf'(x). So we can rewrite as follows:

- [f(x+h)g(x+h) - f(x)g(x)]/h =
- [(f(x) + hf'(x))(g(x) + hg'(x)) - f(x)g(x)]/h =
- [f(x)g(x) + hf'(x)g(x) + f(x)hg'(x) + hf'(x)hg'(x) - f(x)g(x)]/h. The next-to-last term involves h squared, so we can consider it negligible, and write
- [f(x)g(x) + hf'(x)g(x) + f(x)hg'(x) - f(x)g(x)]/h =
- [hf'(x)g(x) + f(x)hg'(x)]/h =
**f'(x)g(x) + f(x)g'(x)**

Quotients are harder. The derivative of f(x)/g(x) is the limit of [f(x+h)/g(x+h)-f(x)/g(x)]/h as h becomes very small. We obtain (the math is simple but pretty busy).

- [f(x+h)/g(x+h) - f(x)/g(x)]/h =
- [(f(x) + hf'(x))/(g(x) + hg'(x))] -[f(x)/g(x)]/h =
- [(f(x) + hf'(x))g(x) - f(x)(g(x) + hg'(x))]/[hg(x)(g(x) + hg'(x))] = [clearing fractions]
- [f(x)g(x) + hf'(x)g(x) - f(x)g(x) - hf(x)g'(x)]/[hg(x)(g(x) + hg'(x))] =
- [hf'(x)g(x) - hf(x)g'(x)]/[hg(x)(g(x) + hg'(x)] = [cancelling h factors]
- [f'(x)g(x) - f(x)g'(x)]/[g(x)(g(x) + hg'(x)]. If h gets tiny enough, we can neglect that remaining h term and obtain
**[f'(x)g(x) - f(x)g'(x)]/(g(x))**^{2}

How about functions of functions? What's the derivative of f(g(x)? It's the
limit of [f(g(x + h)) - f(g(x))]/h as h becomes very small, or [f(g(x)+hg'(x))-f(g(x))]/h.
Now f(g(x)+hg'(x)) is f(g(x) plus a tiny increment, so we can approximate it as
f(g(x) + f'(g(x))hg'(x). Thus the limit can be written [f(g(x) + f'(g(x))hg'(x) -
f(g(x))]/h, or f'(g(x)hg'(x)/h = **f'(g(x))g'(x). **This is called the **Chain
Rule.**

You can take a derivative of a derivative. The derivative of y = x^{n}
is nx^{n-1} . The derivative of nx^{n-1} is n(n-1)x^{n-2},
and so on. That second derivative is called, well, a second derivative. The
second derivative of y = f(x) can be written d^{2}y/dx^{2} , or
as f''(x). Third and higher derivatives are similarly defined.

Second derivatives are useful because they indicate whether a curve is convex
upward (positive second derivative) or down (negative). If the second derivative
is zero, the curve is switching from one curvature to the other and is at an **inflection
point**. Second derivatives also crop up in the formulas for radius of
curvature of curves. Third and higher derivatives are rarely used.

What's the area under the curve y = x? Its graph is a straight line with a
slope of 45 degrees, so the area is a right triangle of length and altitude x.
Thus the area (integral) is x^{2}/2.

How about x^{2} ? Imagine we divide the area under the curve from 0
to x into tiny strips of width h. The area will be the sum of the strips, or
Area = 0h + hh^{2} + h(2h)^{2} + h(3h)^{2} +
h(4h)^{2} + ..... h(nh)^{2 } where n is the total number
of strips. Here we can't just assume all the terms are negligible because there
are so many. Obviously Area = h^{3}(0 + 1^{2} + 2^{2}
+ 3^{2} + 4^{2} + ..... n^{2 }). Now all we need is a
formula for the sum of squares, which happens to be n(n+1)(2n+1)/6. If h is very
tiny, n will be very large, so the sum of squares from 0 to n will be very
nearly 2n^{3}/6 = n^{3}/3. So the area is given by
Area = h^{3}n^{3}/3. But n is the number of strips from 0 to x,
so n = x/h. Thus Area = h^{3}(x/h)^{3}/3 = x^{3}/3.

It looks like there's a pattern here. We might suspect (correctly, it turns
out) that the area under y = x^{n} is x^{(n+1)}/(n+1). But the
approximation method gets pretty clumsy as n gets large, and in any case, we
want a general formula for all values of n. We need a better way. Fortunately,
there is one. *Much* better.

Consider the area under a curve y = f(x). We can find it, in principle, by
dividing the area under the curve into strips of width h. So Area(x) = sum of
strips at x=0, x=h, x=2h, etc. What's Area(x+h)? It's obviously Area(x) + f(x)h
(in other words, Area(x) plus a strip h wide and f(x) high). So we have
Area(x+h)-Area(x) = hf(x), or (Area(x+h)-Area(x))/h = f(x). **The derivative of
the area (integral) is just the original function. Taking derivatives
(differentiation) and integration are inverse operations. **This fact is so
important it is called the **Fundamental Theorem of Calculus.**

This makes life very simple. To find the integral of x^{n} we
have to find something whose derivative is x^{n} . The derivative of x^{(n+1)}
is obviously (n+1)x^{n}, so the only thing separating us from that goal
is the coefficient (n+1). We try the derivative of x^{(n+1)}/(n+1)
and get (n+1)x^{n}/(n+1) = x^{n}. Thus **the integral of x ^{n}
is x^{(n+1)}/(n+1).**

Note however, that if k is some constant, the derivative of k + x^{(n+1)}/(n+1)
also equals x^{n}, since the derivative of a constant is zero. Strictly
speaking, the integral of any function is always a formula plus a constant,
called the** constant of integration. **Most of the time the constant is zero
and it is usually omitted from tables of integrals. But sometimes it is not. Its
value is determined by the problem you're trying to solve.

Imagine trying to sum the strips under y = 1/x. But we know from above that
the derivative of the log function is 1/x. Hence, **the integral of 1/x is
log(x). **And since the derivative of exp(x) = exp(x), obviously **the
integral of exp(x) = exp(x).**

In general, integration is a lot harder than differentiation. You can find a derivative for all but the most extremely oddball functions. There are a lot of functions for which there is no neat integral (although there are numerical methods that will give approximations). The integral of the sum of two functions is the sum of the integrals, but beyond that there are no neat formulas for products of functions, functions of functions, etc.

The conventional integral sign looks like a long skinny S - and it is, for
"summation." The integral of a function is usually written
∫ f(x)dx, where the dx term represents the width of the narrow strips
under the curve. An integral written in general terms like that is called an **indefinite
**integral. To get actual numerical results, evaluate the integral formula
at each end of the desired range and take the difference. We write such a
formula with subscripts and superscripts to show the limits of integration. Such
an integral is called a

For example ∫ x^{3} dx = x^{4} /4 (indefinite
integral). The area under the curve y = x^{3} from x = 2 to x = 4 is

∫ _{2}^{4} x^{3} dx = 4^{4} /4 - 2^{4} /4
= 256/4 - 16/4 = 64 - 4 = 60. This is a definite integral.

You can't just apply integration blindly. If the curve drops below y = 0, the
integral of that part of the curve becomes negative. If you try integrating y = x^{3}
from -3 to 3, you'll get zero. That may or may not be what you want. If you want
to know how much paint it would take to cover the area between the x axis and
the curve, it's not. You'd need to integrate separately from -3 to 0 and from 0
to 3. If you were to try integrating y = 1/x^{2} from -2 to 5, the
integration would work just fine. You'd never suspect that the curve goes to
infinity at x = 0. That's called **improper integration.**

- If the function is fairly simple, especially if you know a function with a derivative that resembles it, try finding a function that can be differentiated to give the desired result.
- For more complex functions, look it up in a table of integrals. You may have a fair amount of algebra to do to convert the table integral into one that fits your problem.
- There are advanced methods found in calculus texts. One is
**Integration by Parts**. Recall that the derivative of f(x)g(x) = f'(x)g(x) + f(x)g'(x). We can integrate both sides to get

f(x)g(x) = f(x) ∫ g(x) + g(x) ∫ f(x), or ∫ f(x)= [f(x)g(x) - f(x) ∫ g(x)]/g(x). What good is that? There's still an integral on both sides of the equation. True, but maybe that integral of g(x) has an obvious solution whereas the f(x) integral doesn't. This method sometimes works if you can factor the target function.

If you are familiar with calculus in two dimensions, calculus in three or more dimensions is a piece of cake. All you really need to know is this:

- Treat each variable one at a time and regard all the other variables as constant while you're doing it.
- It doesn't matter what order you do the operations in.

Let's say you want to differentiate z = x^{3} + 3x^{2}y^{2} + 2y^{4} with respect to x.
The actual d symbol used in multivariate calculus looks like a backwards 6. We take each term one at a time. ∂(x^{3})/∂x = 3x^{2} ,
∂(3x^{2}y^{2})/∂x = 3(2x)y^{2},
because we're only concerned with x and we treat all the other terms, even those
involving y, as constant, and ∂(2y^{4} )/∂x = 0, since as far as
x is concerned, it's a constant. Hence the final result is 3x^{2} +
6xy^{2}.

Now suppose to want to find the volume under z = x^{3} + 3x^{2}y^{2} + 2y^{4}.
The first step is to integrate with respect to one variable, say x. It doesn't
matter what order you do the operations in, except that the algebra may be
simpler one way than another. Integrating with respect to x we get x^{4}/4
+ 3(x^{3}/3)y^{2} + (2y^{4})x. Note that the y terms are
treated as constants. We simplify to x^{4}/4 + x^{3}y^{2} + 2y^{4}x
and integrate with respect to y. Now we treat all the x terms as constants and
get (x^{4}/4)y + x^{3}(y^{3}/3)+ 2(y^{5}/5)x.
Try it in reverse order, integrating first with respect to y and next with
respect to x to verify that the results are the same.

Access Crustal Movements Notes Index

Return to Techniques Manual Index

Return to Professor Dutch's Home Page

*Created 21 August 2000, Last Update 30 January 2012.*

Not an official UW Green Bay site