Calculus is a subject that is way harder than it needs to be. The three things you need to know about calculus are:
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 = x2. 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 x2 and (x+h)2, or x2+2hx + h2. Let's call the x distance dx, and the y distance dy. Then dx = (x+h)-x = h, and dy = (x2+2hx + h2 )-x2 = 2hx + h2 .
Thus the slope is the change in y divided by the change in x, or dy/dx = 2hx + h2 /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 = x2, 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 h2 , h3 , h4 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:
We can apply the method above to find the derivative of any power of x. The derivative of xn is found by finding the limit of ((x+h)n -xn)/h. The binomial expansion of (x+h)n = xn + nhxn-1 + terms with higher powers of h that we can ignore if h becomes extremely tiny. So the limit becomes (xn + nh xn-1 - xn )/h = ( nh xn-1 )/h = nxn-1. The derivative of xn is nxn-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
(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:
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:
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).
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 = xn is nxn-1 . The derivative of nxn-1 is n(n-1)xn-2, and so on. That second derivative is called, well, a second derivative. The second derivative of y = f(x) can be written d2y/dx2 , 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 x2/2.
How about x2 ? 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 + hh2 + 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 = h3(0 + 12 + 22 + 32 + 42 + ..... n2 ). 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 2n3/6 = n3/3. So the area is given by Area = h3n3/3. But n is the number of strips from 0 to x, so n = x/h. Thus Area = h3(x/h)3/3 = x3/3.
It looks like there's a pattern here. We might suspect (correctly, it turns out) that the area under y = xn 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 xn we have to find something whose derivative is xn . The derivative of x(n+1) is obviously (n+1)xn, 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)xn/(n+1) = xn. Thus the integral of xn 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 xn, 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 definite integral.
For example ∫ x3 dx = x4 /4 (indefinite
integral). The area under the curve y = x3 from x = 2 to x = 4 is
∫ 24 x3 dx = 44 /4 - 24 /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 = x3 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/x2 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 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:
Let's say you want to differentiate z = x3 + 3x2y2 + 2y4 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. ∂(x3)/∂x = 3x2 , ∂(3x2y2)/∂x = 3(2x)y2, because we're only concerned with x and we treat all the other terms, even those involving y, as constant, and ∂(2y4 )/∂x = 0, since as far as x is concerned, it's a constant. Hence the final result is 3x2 + 6xy2.
Now suppose to want to find the volume under z = x3 + 3x2y2 + 2y4. 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 x4/4 + 3(x3/3)y2 + (2y4)x. Note that the y terms are treated as constants. We simplify to x4/4 + x3y2 + 2y4x and integrate with respect to y. Now we treat all the x terms as constants and get (x4/4)y + x3(y3/3)+ 2(y5/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.
Return to Professor Dutch's Home Page
Created 21 August 2000, Last Update 30 January 2012.
Not an official UW Green Bay site