Since I am assuming you already read the "Introduction" I only need to touch on a few things from the last article. First, differential calculus is all about finding this ratio: dy/dx . That ratio represents the slope of a line tangent to a curve at a point. The "d" attached to another variable represents that you are taking only a "little bit of x" or a "little bit of y". And when I say a "little bit" that means a very, very, very small "bit" of the variable. So small in fact you could not calculate how much. Now on to the new stuff.... What is a derivative? A derivative is the slope of a line tangent to a curve at a point. You may remember something else having that same defintion...symbolically a derivative is written as the ratio we have already discussed: dy/dx . So, for now on we will be calling that ratio the derivative. Before we go on let's find a more precise definition of a tangent line. What is a tangent? It is best to think of a tangent line as one which only "touches" a point on a curve or goes through only one point on the curve. For example: |
...![]() |
|
The first picture has a pretty obvious tangent. The white curve is your function and the orange line is the tangent at the point it touches the white curve. However, in the second picture the orange line intersects the curve at two points. This is all right. The tangent line can intersect the curve at different spots but it is clear that the orange line is tangent to the curve at the point near the y-axis. About slopes. One of the easiest things a person can encounter in an Algebra class is finding the slope of two points. For example: point one = (x1, y1)
point two = (x2, y2)
y2 - y1 Dy
slope = m = --------- = ----
x2 - x1 DxTaking the
difference of the points' y-positions and dividing it by the difference of
the points' x-positions gives you the slope of the line which would
connect the two points. We can extend this idea a little bit more and
instead of picking any two arbitrary points you could use two points on a
graph. Let's say we had a function, f, and we went down the x-axis
and picked a random spot at x. The ordered pair on the graph of
f at x would be [x, f(x)]. Then we travel a little bit
further down the x-axis at a distance of h. The ordered pair on the
graph would now be [x+h, f(x+h)]. The line which connects these two points
is called a secant line. Here is a picture: |
![]() |
|
So, you can think of a secant line as a line which connects two points on a graph. A general equation for finding the slope of any secant line is: f(x+h) - f(x)
m = ---------------
(x+h) - x
This slope has also been given another name: the difference quotient. Finding the slope of a secant line is easy. Just as easy as finding the slope of two points. But, what if we were to think of h as getting smaller and smaller? So small that it is nearly zero! We can write this as a limit: lim f(x+h) - f(x)
h->0 -------------
h
What does this limit represent? It just happens to be the derivative!
As h gets indefinitely close to zero (meaning as the two points get
really close) the secant line becomes the tangent line. Here
is an animation I made to show you: |
|
Hopefully it should become clear as to why dx and dy are very small. From the difference quotient you can think of dy as the numerator and dx as the denominator. Thus: dy lim f(x+h) - f(x)
-- = h->0 -------------
dx hWell, if h becomes indefinitely small
then [f(x+h) - f(x)] should be extremely small too. This is why calculus
is only concerned with very small quantities of x and y. Now
that you should be comfortable with the overall concept of the derivative,
let's find out how to get the derivative of a
function.Differentiation The process of getting the derivative of a function is called differentiation. Differentiating a function does not directly give you the slope of a function at a point. In fact, a derivative is just another function. You then use that new function to plug-in a few numbers and find the numerical value of the slope. Before we get into differentiating functions let us look at exactly how we should write it. Here are some examples: Our function: f(x) -- or -- y = (something)
The derivative of our function:
1.) dy
-- (read as "dee-Y" over "dee-X" or "the derivative of y with
dx respect to x")
2.) d
-- f(x) (read as "the derivative of f with respect to x")
dx
3.) f'(x) (the apostrophe denotes the function of x has been differentiated)
4.) y' (read as "Y-prime")
Now we will take a stab at differentiating a few functions. We will first use limits to differentiate and then I will show you a non-limit method for those who did not quite "get" limits (even though both ways are exactly the same). So, an example: Find the derivative of the following function: f(x) = x2
// start with your general equation for a derivative
d f(x+h) - f(x)
-- f(x) = lim -------------
dx h->0 h
// substitute our function in the general equation
d (x+h)2 - x2
-- f(x) = lim -----------
dx h->0 h
// Note: just in case you did not know, if you were given a function of x, f(x),
and asked to evaluate f(x+a) where a is any constant then you simply
substitute (x+a) in for x in your function.
// Moving on: next you expand out the (x+h)2 term
d x2 + 2hx + h2 - x2
-- f(x) = lim ------------------
dx h->0 h
// Now you have a positive and negative x2 so they cancel out and you
are left with:
d 2hx + h2
-- f(x) = lim ---------
dx h->0 h
// All your terms in the numerator have an h and you are dividing them by h
therefore the h's cancel out. But, remember that only one h is canceled
out of the h2 term
d
-- f(x) = lim 2x + h
dx h->0
// You are now left with a very easy limit to compute
d
-- f(x) = 2x
dx
Congratulations! You have just differentiated your first function (or maybe you have done this before?). The function (2x) is the derivative of (x2). Rather simple? Yes it is. Let us look at another example (this time I will not explain the steps as thoroughly though): Differentiate: f(x) = x3
// general equation of a derivative
d f(x+h) - f(x)
-- f(x) = lim -------------
dx h->0 h
// substitute our function in the general equation of the derivative
d (x+h)3 - x3
-- f(x) = lim -----------
dx h->0 h
// expand the binomial (x+h)3
d x3 + hx2 + 2hx2 + 2h2x + h2x + h3 - x3
-- f(x) = lim --------------------------------------
dx h->0 h
// the positive and negative x2 term cancel out:
d hx2 + 2hx2 + 2h2x + h2x + h3
-- f(x) = lim ----------------------------
dx h->0 h
// you can cancel out an h in every term of the numerator
d
-- f(x) = lim x2 + 2x2 + 2hx + hx + h2
dx h->0
// which is another easy limit to compute. All terms with an h in it
will cancel out and you are left with
d
-- f(x) = 3x2
dx
// Note that the x2 and 2x2 term combine to make 3x2
Terrific! Another differentiated function. Let's look at one more example which is a little bit harder: Differentiate: f(x) = 1 / x
// Always start with the general equation of a derivative
d f(x+h) - f(x)
-- f(x) = lim -------------
dx h->0 h
// Substitute the function in the above
1 - 1
d x+h x
-- f(x) = lim ---------
dx h->0 h
// The first thing we need to do is get a common denominator for the two
fractions up top so we can subtract them. You should have learned
this in Algebra but to do this we are going to multiply the left term
by (x/x) and the right term by [(x+h)/(x+h)]. Notice that since both
of those expressions are equal to one they will not change the fraction's
value but it will give them the same denominator:
/ 1 * x - 1 * x+h \ x - x+h
d \ x+h x x x+h / x2+hx x2+hx
-- f(x) = lim --------------------- = lim ------------------
dx h->0 h h->0 h
// We can now subtract the two fractions up top. All that will be left though
is an h since the two x's cancel out. But, take note that the h will be
negative since in essence you doing this: [x - (x+h)] ... so if you were
to distribute the negative and then solve you would get (x-x-h) which
simplifies to negative h
-h
d x2+hx
-- f(x) = lim --------
dx h->0 h
// This is a very odd fraction and is not considered "correct" in math so
to simplify it we will multiply the numerator and denominator of the main
fraction by (1/h). That way the denominator will cancel out and we will
be left with:
d -h
-- f(x) = lim -------
dx h->0 hx2+h2x
// We can now cancel out the h's
d -1
-- f(x) = lim -------
dx h->0 x2 + hx
// And finally we are left with an easy limit to compute:
d -1
-- f(x) = --
dx x2
// Which also equals:
d
-- f(x) = -x-2
dx
The final answer can be written as either one of those equations above.
So far differentiating seems like a lot of work and just an overall pain
to do. And in fact the way we have done it so far is. But, we will
use these very general methods of differentiating to develop some rules
and techniques of differentiating (next tutorial). Now, I am going to
describe the non-limit way of differentiating. These methods come out
identical but, I will let you choose which one you
like. Differentiate: y = x2
// substitute (x+dx) and (y+dy) for x and y
y + dy = (x + dx)2
// subtract the first equation from the above
y + dy = (x + dx)2
- [ y = x2 ]
--------------------
dy = (x+dx)2 - x2
// expand the (x+dx)2 term
dy = x2 + 2x*dx + dx2 - x2
// the positive and negative x2 terms cancel out
dy = 2x*dx + dx2
// Do you remember what I said previously about having one of those dx or dy
terms taken to a power greater than one? If the term is already extremely
small then squaring it or cubing is just going to make it even smaller so
we can just disregard it...therefore we are left with:
dy = 2x*dx
// Divide by sides by dx :
dy
-- = 2x
dx
And there it is! Our differentiated function. The limit method is the preferred way since you will be encountering limits all throughout calculus but it is good to know that they are not necessary. Here is the work for the other two problems (without any comments): 1.) Differentiate: y = x3
y + dx = (x + dx)3
- [ y = x3 ]
dy = (x + dx)3 - x3
dy = (x+dx)(x+dx)(x+dx) - x3 = (x2 + 2x*dx + dx2)(x+dx) - x3
= x3 + x2*dx + 2x2*dx + 2x*dx2 + x*dx2 + dx3 - x3
dy = x2*dx + 2x2*dx + 2x*dx2 + x*dx2 + dx3
// all the terms with dx to a power cancel out
dy = x2*dx + 2x2*dx
dy
-- = 3x2
dx
3.) Differentiate: y = 1 / x
1
y + dx = ------
x + dx
- [ y = 1/x ]
1 1
dy = ---- - ---
x+dx x
// get common denominator for subtraction
1 x 1 x+dx x x+dx
dy = ---- * --- - --- * ---- = ------- - --------
x+dx x x x+dx x2+x*dx x2+x*dx
x - (x+dx) -dx
dy = ----------- = ---------
x2+x*dx x2+x*dx
// divide both sides by dx
dy -dx 1
-- = -------- * --
dx x2+x*dx dx
// simplify
dy -1
-- = --- --or-- = -x-2
dx x2
So for all three problems we got the same answers. Like I said before,
differentiating in this fashion is tedious and a pain. We will see in the
next article different techniques of differentiation where we can get the
derivative of complex functions with no trouble at all. We are nearing the
end of this tutorial but still one more thing... |