Calculus/Differentiation
From Wikibooks, the open-content textbooks collection
Contents
|
[edit] What is differentiation?
Differentiation is an operation that allows us to find a function that outputs the rate of change of one variable with respect to another variable when given that second variable.
Informally, we may suppose that we're tracking the position of a car on a two-lane road with no passing lanes. Assuming the car never pulls off the road, we can abstractly study the car's position by assigning it a variable, x. Since the car's position changes as the time changes, we say that x is dependent on time, or x = x(t). This tells where the car is at each specific time. Differentiation gives us a function dx / dt which represents the car's speed, that is the rate of change of its position with respect to time.
Equivalently, differentiation gives us the slope at any point of the graph of a non-linear function. For a linear function, of form f(x) = ax + b, a is the slope. For non-linear functions, such as f(x) = 3x2, the slope can depend on x; differentiation gives us a function which represents this slope.
[edit] The Definition of Slope
Historically, the primary motivation for the study of differentiation was the tangent line problem: for a given curve, find the slope of the straight line that is tangent to the curve at a given point. The word tangent comes from the Latin word tangens, which means touching. Thus, to solve the tangent line problem, we need to find the slope of a line that is "touching" a given curve at a given point, or, in modern language, that has the same slope. But what exactly do we mean by "slope" for a curve?
The solution is obvious in some cases: for example, a line y = mx + c is its own tangent; the slope at any point is m. For the parabola y = x2, the slope at the point (0,0) is 0; the tangent line is horizontal.
But how can you find the slope of, say, y = sinx + x2 at x = 1.5? This is in general a nontrivial question, but first we will deal carefully with the slope of lines.
[edit] Of a Line
The slope of a line, also called the gradient of the line, is a measure of its inclination. A line that is horizontal has slope 0, a line from the bottom left to the top right has a positive slope and a line from the top left to the bottom right has a negative slope.
The slope can be defined in two (equivalent) ways. The first way is to express it as how much the line climbs for a given motion horizontally. We denote a change in a quantity using the symbol Δ (pronounced "delta"). Thus, a change in x is written as Δx. We can therefore write this definition of slope as:
An example may make this definition clearer. If we have two points on a line,
and
, the change in x from P to Q is given by:
Likewise, the change in y from P to Q is given by:
This leads to the very important result below.
The slope of the line between the points (x1,y1) and (x2,y2) is
-
.
Alternatively, we can define slope trigonometrically, using the tangent function:
where α is the angle from the line to the rightward-pointing horizontal (measured clockwise). If you recall that the tangent of an angle in a right triangle is defined as the length of the side opposite the angle over the length of the leg adjacent to the angle, you should be able to spot the equivalence here.
[edit] Of a Graph of a Function
The graphs of most functions we are interested in are not straight lines (although they can be) but rather curves. We cannot define the slope of a curve in the same way as we can for a line. In order for us to understand how to find the slope of a curve at a point, we will first have to cover the idea of tangency. Intuitively, a tangent is a line which just touches a curve at a point, such that the angle between them at that point is zero. Consider the following four curves and lines:
| (i) | (ii) |
| (iii) | (iv) |
- The line L crosses, but is not tangent to C at P.
- The line L crosses, and is tangent to C at P.
- The line L crosses C at two points, but is tangent to C only at P.
- There are many lines that cross C at P, but none are tangent. In fact, this curve has no tangent at P.
A secant is a line drawn through two points on a curve. We can construct a definition of a tangent as the limit of a secant of the curve taken as the separation between the points tends to zero. Consider the diagram below.
As the distance h tends to zero, the secant line becomes the tangent at the point x0. The two points we draw our line through are:
and
As a secant line is simply a line and we know two points on it, we can find its slope, mh, using the formula from before:
(We will refer to the slope as mh because it may, and generally will, depend on h.) Substituting in the points on the line,
This simplifies to
This expression is called the difference quotient. Note that h can be positive or negative — it is perfectly valid to take a secant through any two points on the curve — but cannot be 0.
The definition of the tangent line we gave was not rigorous, since we've only defined limits of numbers — or, more precisely, of functions that output numbers — not of lines. But we can define the slope of the tangent line at a point rigorously, by taking the limit of the slopes of the secant lines from the last paragraph. Having done so, we can then define the tangent line as well. Note that we cannot simply set h to zero as this would imply division of zero by zero which would yield an undefined result. Instead we must find the limit of the above expression as h tends to zero:
The slope of the graph of f(x) at the point (x0,f(x0)) is
If this limit does not exist, then we say the slope is undefined.
If the slope is defined, say m, then the tangent line to the graph of f(x) at the point (x0,f(x0)) is the line with equation
This last equation is just the point-slope form for the line through (x0,f(x0)) with slope m.
[edit] Exercises
- Find the slope of the tangent to the curve y = x2 at (1,1).
Answer: 2
[edit] The Rate of Change of a Function at a Point
Consider the formula for average velocity in the x-direction,
, where Δx is the change in x over the time interval Δt. This formula gives the average velocity over a period of time, but suppose we want to define the instantaneous velocity. To this end we look at the change in position as the change in time approaches 0. Mathematically this is written as:
, which we abbreviate by the symbol
. (The idea of this notation is that the letter d denotes change.) Compare the symbol d with Δ. The (entirely non-rigorous) idea is that both indicate a difference between two numbers, but Δ denotes a finite difference while d denotes an infinitesimal difference. Please note that the symbols dx and dt have no rigorous meaning on their own, since
, and we can't divide by 0.
(Note that the letter s is often used to denote distance, which would yield
. The letter d is often avoided in denoting distance due to the potential confusion resulting from the expression
.)
[edit] The Definition of the Derivative
You may have noticed that the two operations we've discussed — computing the slope of the tangent to the graph of a function and computing the instantaneous rate of change of the function — involved exactly the same limit. That is, the slope of the tangent to the graph of y = f(x) is
. Of course,
can, and generally will, depend on x, so we should really think of it as a function of x. We call this process (of computing
) differentiation. Differentiation results in another function whose value for any value x is the slope of the original function at x. This function is known as the derivative of the original function.
Since lots of different sorts of people use derivatives, there are lots of different mathematical notations for them. Here are some:
(read "f prime of x") for the derivative of f(x),- Dx[f(x)],
- Df(x),
for the derivative of y as a function of x or
, which is more useful in some cases.
Most of the time the brackets are not needed, but are useful for clarity if we are dealing with something like D(fg), where we want to differentiate the product of two functions, f and g.
The first notation has the advantage that it makes clear that the derivative is a function. That is, if we want to talk about the derivative of f(x) at x = 2, we can just write f'(2).
In any event, here is the formal definition:
Let f(x) be a function. Then
wherever this limit exists. In this case we say that f is differentiable at x and its derivative at x is f'(x).[edit] Examples
Example 1
The derivative of f(x) = x / 2 is
,
no matter what x is. This is consistent with the definition of the derivative as the slope of a function.
Example 2
What is the slope of the graph of y = 3x2 at (4,48)? We can do it "the hard (and imprecise) way", without using differentiation, as follows, using a calculator and using small differences below and above the given point:
When x = 3.999, y = 47.976003.
When x = 4.001, y = 48.024003.
Then the difference between the two values of x is Δx = 0.002.
Then the difference between the two values of y is Δy = 0.048.
Thus, the slope
at the point of the graph at which x = 4.
But, to solve the problem precisely, we compute
-

= 
= 
= 
= 
= 3(8) = 24.
We were lucky this time; the approximation we got above turned out to be exactly right. But this won't always be so, and, anyway, this way we didn't need a calculator.
In general, the derivative of f(x) = 3x2 is
-

= 
= 
= 
= 
= 
= 3(2x) = 6x.
Example 3
If
(the absolute value function) then 
Here, f(x) is not smooth (though it is continuous) at x = 0 and so the limits
and
(the limits as 0 is approached from the right and left respectively) are not equal. From the definition,
, which does not exist. Thus, f'(0)is undefined, and so f'(x) has a discontinuity at 0. This sort of point of non-differentiability is called a cusp. Functions may also not be differentiable because they go to infinity at a point, or oscillate infinitely frequently.
[edit] Understanding the Derivative Notation
The derivative notation is special and unique in mathematics. The most common notation for derivatives you'll run into when first starting out with differentiating is the Leibniz notation, expressed as
. You may think of this as "rate of change in y with respect to x". You may also think of it as "infinitesimal value of y divided by infinitesimal value of x". Either way is a good way of thinking, although you should remember that the precise definition is the one we gave above. Often, in an equation, you will see just
, which literally means "derivative with respect to x". This means we should take the derivative of whatever is written to the right; that is,
means
where y = x + 2.
As you advance through your studies, you will see that we sometimes pretend that dy and dx are separate entities that can be multiplied and divided, by writing things like
. Eventually you will see derivatives such as
, which just means that the input variable of our function is called y and our output variable is called x; sometimes, we will write
, to mean the derivative with respect to x of whatever is written on the right. In general, the variables could be anything, say
.
All of the following are equivalent for expressing the derivative of y = x2
[edit] Exercises
1. Using the definition of the derivative find the derivative of the function f(x) = 2x + 3.
2. Using the definition of the derivative find the derivative of the function f(x) = x3. Now try f(x) = x4. Can you see a pattern? In the next section we will find the derivative of f(x) = xn for all n.
3. The text states that the derivative of
is not defined at x = 0. Use the definition of the derivative to show this.
4. Graph the derivative to y = 4x2 on a piece of graph paper without solving for dy / dx. Then, solve for dy / dx and graph that; compare the two graphs.
5. Use the definition of the derivative to show that the derivative of sinx is cosx. Hint: Use a suitable sum to product formula and the fact that
.
[edit] Differentiation rules
The process of differentiation is tedious for complicated functions. Therefore, rules for differentiating general functions have been developed, and can be proved with a little effort. Once sufficient rules have been proved, it will be fairly easy to differentiate a wide variety of functions. Some of the simplest rules involve the derivative of linear functions.
[edit] Derivative of a Constant Function
For any fixed real number c,
![\frac{d}{dx}\left[c\right]=0.](http://upload.wikimedia.org/math/e/7/8/e78275207f52d546f36ed2fe57f21068.png)
[edit] Intuition
The graph of the function f(x) = c is a horizontal line, which has a constant slope of zero. Therefore, it should be expected that the derivative of this function is zero, regardless of the values of x and c.
[edit] Proof
The definition of a derivative is
Let f(x) = c for all x. (That is, f is a constant function.) Then f(x + Δx) = c. Therefore
[edit] Examples
Note that, in the second example, z is just a constant.
[edit] Derivative of a Linear Function
For any fixed real numbers m and c,
![\frac{d}{dx}\left[mx+c\right]=m](http://upload.wikimedia.org/math/5/e/6/5e6c935ca3b1af98f89e72822c568415.png)
The special case
shows the advantage of the
notation -- rules are intuitive by basic algebra, though this does not constitute a proof, and can lead to misconceptions to what exactly dx and dy actually are.
[edit] Intuition
The graph of y = mx + c is a line with constant slope m.
[edit] Proof
If f(x) = mx + c, then f(x + Δx) = m(x + Δx) + c. So,
-

= 
= 
= 
= 
= m.
[edit] Constant multiple and addition rules
Since we already know the rules for some very basic functions, we would like to be able to take the derivative of more complex functions by breaking them up into simpler functions. Two tools that let us do this are the constant multiple rule and the addition rule.
[edit] The Constant Rule
For any fixed real number c,
![\frac{d}{dx}\left[cf(x)\right] = c \frac{d}{dx}\left[f(x)\right]](http://upload.wikimedia.org/math/4/3/a/43a914dad1efe3423b921e4dd6924280.png)
The reason, of course, is that one can factor c out of the numerator, and then of the entire limit, in the definition.
Example
We already know that
.
Suppose we want to find the derivative of 3x2
-
![\frac{d}{dx}\left[3x^2\right]](http://upload.wikimedia.org/math/c/8/0/c801a6caa1087befd090714d0def7aed.png)
= ![3\frac{d}{dx}\left[x^2\right]](http://upload.wikimedia.org/math/e/9/c/e9ce3efc5ab2449f8026adb52c460afe.png)
= 
= 
Another simple rule for breaking up functions is the addition rule.
[edit] The Addition and Subtraction Rules
![\frac{d}{dx}\left[f(x)\pm g(x)\right]= \frac{d}{dx}\left[f(x)\right]\pm\frac{d}{dx}\left[g(x)\right]](http://upload.wikimedia.org/math/6/e/0/6e0b689997ec5729e484327f7db5a807.png)
Proof
From the definition:
![\lim_{\Delta x \to 0}\left[\frac{[f(x+\Delta x) \pm g(x + \Delta x)] - [f(x) \pm g(x)]}{\Delta x}\right]](http://upload.wikimedia.org/math/1/1/5/1152b1519cdd4660d31cd4cf2cab14ba.png)
![= \lim_{\Delta x \to 0}
\left[\frac{[f(x+\Delta x) - f(x)] \pm [g(x + \Delta x) - g(x)]}{\Delta x}\right]](http://upload.wikimedia.org/math/9/1/d/91d5b6f99f8bf3c5ceefd6f2fa2ca9e8.png)
![= \lim_{\Delta x \to 0} \left[\frac{[f(x+\Delta x) - f(x)]}{\Delta x}\right]
\pm \lim_{\Delta x \to 0} \left[\frac{[g(x+\Delta x) - g(x)]}{\Delta x}\right]](http://upload.wikimedia.org/math/7/3/9/739b21c6223582d77a7b053670af982d.png)
By definition then, this last term is ![\frac{d}{dx} \left[f(x)\right] \pm \frac{d}{dx}\left[g(x)\right]](http://upload.wikimedia.org/math/0/d/2/0d24baaaaa4acd5be7bc51fe4457c951.png)
Example
What is:
-
![\frac{d}{dx}\left[3x^2+5x\right]](http://upload.wikimedia.org/math/1/2/9/129e3c2563aa3d94684f80fdd1da6b36.png)
= ![\frac{d}{dx}\left[3x^2+5x\right]](http://upload.wikimedia.org/math/1/2/9/129e3c2563aa3d94684f80fdd1da6b36.png)
= ![\frac{d}{dx}\left[3x^2\right]+\frac{d}{dx}\left[5x\right]](http://upload.wikimedia.org/math/1/a/8/1a88c86bea1f31c8d47e943ddf3a8f3a.png)
= ![6x+\frac{d}{dx}\left[5x\right]](http://upload.wikimedia.org/math/c/6/7/c6734da4b8ddbfc7c3ee1b4e34bd61b8.png)
= 
The fact that both of these rules work is extremely significant mathematically because it means that differentiation is linear. You can take an equation, break it up into terms, figure out the derivative individually and build the answer back up, and nothing odd will happen.
We now need only one more piece of information before we can take the derivatives of any polynomial.
[edit] The Power Rule
![\frac{d}{dx}\left[x^n\right]=nx^{n-1}](http://upload.wikimedia.org/math/d/3/e/d3e5c4f744a44c47de9fc6c92e7137e0.png)
For example, in the case of x2 the derivative is 2x1 = 2x as was established earlier. A special case of this rule is that dx / dx = dx1 / dx = 1x0 = 1.
Since polynomials are sums of monomials, using this rule and the addition rule lets you differentiate any polynomial. A relatively simple proof for this can be derived from the binomial expansion theorem.
This rule also applies to fractional and negative powers. Therefore
-
![\frac{d}{dx}\left[\sqrt x \right]](http://upload.wikimedia.org/math/1/9/5/195b46f6b5beab121fb0a60bbbb12b7f.png)
= ![\frac{d}{dx}\left[ x^{1/2}\right]](http://upload.wikimedia.org/math/4/4/5/445a1f6d37d751be8054bcb233b5bd1c.png)
= 
= 
[edit] Derivatives of polynomials
With these rules in hand, you can now find the derivative of any polynomial you come across. Rather than write the general formula, let's go step by step through the process.
The first thing we can do is to use the addition rule to split the equation up into terms:
We can immediately use the linear and constant rules to get rid of some terms:
Now you may use the constant multiplier rule to move the constants outside the derivatives:
Then use the power rule to work with the individual monomials:
And then do some algebra to get the final answer:
These are not the only differentiation rules. There are other, more advanced, differentiation rules, which will be described in a later chapter.
[edit] Exercises
- Find the derivatives of the following equations:
- f(x) = 42
- f(x) = 6x + 10
- f(x) = 2x2 + 12x + 3
- Use the definition of a derivative to prove the derivative of a constant function, of a linear function, and the constant rule and addition or subtraction rules.
- Answers:
- f'(x) = 0
- f'(x) = 6
- f'(x) = 4x + 12









![\lim_{h \to 0}\left[\frac{f\left( x_0+h \right) - f\left( x_0 \right)}{h}\right]](http://upload.wikimedia.org/math/9/3/c/93c69eed289535160c074b72198adc4f.png)







![\frac{d}{dx}\left[c\right] = \lim_{\Delta x \to 0} \frac{c-c}{\Delta x} = 0.](http://upload.wikimedia.org/math/8/2/1/821a1a59b19ffcad353eabed5a64c79c.png)
![\frac{d}{dx}\left[3\right]=0](http://upload.wikimedia.org/math/5/8/d/58dcf2d769a6bc9cdeda9e9117eb2514.png)
![\frac{d}{dx}\left[z\right]=0](http://upload.wikimedia.org/math/5/8/f/58fdaa554b925cb6d021895ac58fb7fc.png)
![\frac{d}{dx}\left[6x^5+3x^2+3x+1\right]](http://upload.wikimedia.org/math/f/1/7/f176e24c024b04b9457a4ceb719fa122.png)
![\frac{d}{dx}\left[6x^5\right]+\frac{d}{dx}\left[3x^2\right]+\frac{d}{dx}\left[3x\right]+\frac{d}{dx}\left[1\right].](http://upload.wikimedia.org/math/6/3/b/63bd09fe72eb9c1c318c17ad54dc73a3.png)
![\frac{d}{dx}\left[6x^5\right]+\frac{d}{dx}\left[3x^2\right]+3+0.](http://upload.wikimedia.org/math/d/a/a/daadde1038830620aca70db596032f0d.png)
![6\frac{d}{dx}\left[x^5\right]+3\frac{d}{dx}\left[x^2\right]+3.](http://upload.wikimedia.org/math/6/8/7/687f62ea84ad874f2272694c559a36dc.png)

