CALCULUS


This introduction will be light on theory, but will give enough "recipes" that you should be able to follow things in a course where there is no prerequisite for calculus, but the prof wants to use "just a little bit".

There are two types of calculus:
(i) Differential Calculus which concerns itself with slopes of curves.
(ii) Integral Calculus which concerns itself with areas under curves.

Differential Calculus

Imagine that you have some sort of curve described by f(x). If the curve were a parabola, we would have f(x) = ax2 + bx + c. A parabola centred on the origin with its "point" 1 unit above the origin might be f(x) = x2 + 1. You can see that when x = 0 (origin), f(x) = f(0) = 1.

The slope of any line is defined as "slope = rise / run" which is equivalent to "slope = vertical change / corresponding horizontal change.

When we have a straight line, y = mx + b, this is easy. Let us look at a nearby point x + dx. The quantity "dx" is NOT "d" times "x". It is taken to mean "a small change in x". Therefore x + dx is separated from x by a distance dx.

If we look at the point x + dx, y changes to y' = m(x + dx) + b = mx + m(dx) + b. If we write y' = y + dy, then when we subtract off the y, we get dy = m(dx). Finally, the slope is rise/run = dy/dx = m(dx)/dx = m (as expected).

When we have a curve, say y = f(x), we could do the same thing and say y + dy = f(x + dx) and then dy = f(x+dx) - f(x). The slope of the line joining the two points at x and x + dx would then be slope = m = [f(x+dx) - f(x)] / dx.

One more thing: We do not really have the slope at "x", but rather the average slope between "x" and "x+dx". To get around this, we DEFINE the slope at "x" to be the limiting value when "dx" gets very small. From the above expression, it might look as though the limiting slope would be [f(x)-f(x)]/0 which is just 0/0 which is hard to deal with. We can be a bit more cunning, however.

Let us look at our parabola y = x2 + 1. We will put in the "dx" and expand things algebraically to get y + dy = (x+dx)2 + 1. The RHS becomes x2 + 2x(dx) + (dx)2 + 1. Now subtract off "y" to get "dy" and we find dy = 2x(dx). The slope is therefore m = 2x(dx) / dx. While "dx" is NOT 0, we cancel it off and claim that the cancellation will hold for ANY value not exactly equal to zero. We therefore DEFINE the derivative to be the value 2x (with the dx's cancelled).

The result is that the slope at "x" is m = 2x.

You can work out the rest for any polynomial, but here are the rules. YOU SHOULD MEMORIZE THESE RULES.

  1. For a constant, dy/dx = 0 (always). If y = f(x) = 2.5 everywhere, a horizontal line, dy/dx = 0.
  2. For any power of "x", y = f(x) = xn, dy/dx = nxn-1
  3. A multiplying constant just passes through the derivative: If y = axn, dy/dx = anxn-1.
  4. You string terms together by adding the derivatives: For y = axn + bxp, dy/dx = anxn-1 + bpxp-1.

There are also some useful rules for trig functions and logs.

  1. For y = sin(x), dy/dx = cos(x).
  2. For y = cos(x), dy/dx = -sin(x). (Note the minus.)
  3. For y = ln(x), dy/dx = 1/x.

The only additional rule you are likely to need in the near future is the one for exponentials.

  1. If y = eax with "a" a constant, then dy/dx = aeax. As you can see, the constant comes down in front, but the exponential remains the same.

There are a couple of other rules for products and quotients and a rule for stringing derivatives together.

  1. Products: Suppose we have y(x) = u(x) v(x) where u and v are two functions we know. We want dy/dx. For a product, we can write dy/dx = u(x)dv/dx + v(x)du/dx.
  2. Quotients: Again with u(x) and v(x), if we have y(x) = u(x) / v(x), the derivative of y is dy/dx = (vdu/dx - udv/dx) / v2 .
    Suppose we have y(x) = tan(x) = sin(x)/cos(x). We set u(x) = sin(x) and v(x) = cos(x). Then, since dsin(x)/dx = cos(x) and dcos(x)/dx = -sin(x), we can write dtan(x)/dx = [cos(x)cos(x) - sin(x)(-sin(x))]/cos2(x) = 1 / cos2(x) = sec2(x)
  3. Chain Rule: Sometimes a function is complicated and it is best to do it a bit at a time. Suppose we had to evaluate the derivative of f(x) = 1/(1+x2). We could do this in two ways:
    1. Quotient rule: with u(x) = 1 and v(x) = 1+x2. Then dy/dx = [(1+x2)(0) - (1)(2x)] / (1+x2)2 = -2x / (1+x2)2
    2. Chain Rule: We can let u(x) = 1+x2 so that y(u) = 1/u. This allows us to write dy/du = -1/u2. We can obtain the derivative with respect to x by writing dy/dx = dy/du du/dx. (It is as if the "du"s cancelled out.)

This allows us to write dy/dx = -1/u2 du/dx. Substituting in the expression for u(x) we can write dy/dx = -1/(1+x2)2 du/dx. Since du/dx = 2x, we end up with dy/dx = -1/(1+x2)2 2x = -2x/(1+x2)2.

Integral Calculus

Integral calculus is involved in calculating areas under curves. If we have a curve y = f(x), then we might want the area under f(x). If f(x) is below the X-axis, the area is negative. The mathematical constructs for setting up the areas are called integrals. Unfortunately, HTML does not have the symbol for integrals. The symbol looks like a stretched out S, so I'll just use S. There are two basic forms.

Indefinite Integrals: The area but without specifying where to start or end. These are easier to calculate than the second type (Definite Integrals), by one step, but the price is that they always have an arbitrary constant that you must evaluate by some other means.

Definite Integrals: These are the same as Indefinite Integrals, but the starting point and end point (in "x") for the area are given.

In both cases we begin by summing up many little areas of size f(x) dx. This is a little rectangle of height f(x) and width "dx". The area obtained by summing is written S f(x) dx.

The trick is to know what function to use to replace f(x). I'll just give the rules for Indefinite Integrals. Definite Integrals follow easily, and I'll just leave that to the end.

  1. For a constant "a", the integral is written S(a)dx, which really means sum up all the little areas of constant height "a" and width "dx". The result is S(a)dx = ax + c where "c" is some constant.
  2. For any power of "x", y = f(x) = xn, S(xn)dx = xn+1/(n+1) + c.
  3. A multiplying constant just passes through the integral: If y = axn, S(y)dx = axn+1/(n+1) + c.
  4. You string terms together by adding the integrals: For y = axn + bxp, S(y)dx = axn+1/(n+1) + bxp+1/(p+1) + c.
  5. S[sin(x)]dx = -cos(x) .
  6. S[cos(x)]dx = sin(x).
  7. If y = eax with "a" a constant, then Seaxdx = eax/a. As you can see, the constant goes down below, but the exponential remains the same.
  8. If y = 1/x, then S 1/x dx = ln(x). This is actually the definition for the natural logarithm.

To convert an Indefinite Integral to a Definite Integral is easy. Remember that the definite integral between x=a and x=b is the area under the curve between the limits x=a and x=b. Suppose we want the area between x = a and x = b for the function f(x). First of all, we evaluate the Indefinite Integral Sf(x)dx = F(x) + c (say). The basic rules for getting F(x) are those given above. Then the actual area is F(b) - F(a). All we do is subtract the values of F(x) at the two limits (upper limit positive, lower limit negative). Notice that the constant "c" disappears during the subtraction.

You may have noticed that the rules for integrals look suspiciously like the rules for derivatives with some modifications. In fact, the derivative of the F(x) that results from evaluating an integral, is just the function f(x) for which we evaluated the integral. In other words, if Sf(x)dx = F(x) + c, then dF/dx = f(x). For this reason F(x) is sometimes called the anti-derivative of f(x). Unfortunately, while it is usually fairly easy to evaluate the derivative of a function, it is often hard to find its anti-derivative.


 

File: calculus.html
This page last modified on 9/9/13 by CMH.