Calculus I 070829
Scheme of derivative functions:
The derivative of a function y(x) is the limiting value, as `dx -> 0, of ( y(x + `dx) – y(x) ) / `dx.
The derivative of a function y with respect to the variable x gives us the instantaneous rate of change of y with respect to x, which is identified with the slope of the graph of y vs. x.
The first derivative we obtained was for T(L) = .2 sqrt(L), the period vs. length function for the pendulum. Our derivative was obtained by some standard but not completely familiar algebra, and was T ‘ (L) = .1 / sqrt(L). This is related to the general formula for the square root function, which is as follows:
y = sqrt(x) has derivative y ‘ = 1 / (2 sqrt(x) )
We will see more about the derivative of this function near the end of this class, but the algebra we use to obtain this derivative follows exactly the same steps we used in finding the derivative of T(L).
The following derivatives were obtained in previous classes, in both cases by writing out and simplifying the expression ( y(x + `dx) – y(x) ) / `dx and considering what happens when `dx approaches 0:
y(x) = m x + b has derivative y ‘ = m
y(x) = a x^2 + b x + c has derivative y ‘ (x) = a x + b
In today's class we use the derivative of the quadratic function to determine the vertex of that function. We then find the expression for the derivative of y = x^3, and see how to extend the process to derivatives of y = x^4, y = x^5 and in general to y = x^n, where n is any integer except -1.
Quadratic functions
Most of you know that a quadratic function of the form y(x) = a x^2 + b x + c has a graph which is a parabola, opening either upward or downward. You probably also know the quadratic formula, which tells us that y(x) = a x^2 + b x + c takes value 0 if, and only if, x takes one of the values (-b +- sqrt(b^2 - 4 a c) ) / (2 a).
I had to drag it out of the class, but eventually we remembered that the point at the 'tip' of the parabola (a somewhat blunt tip) is called the vertex of the parabola.
We are going to use the derivative of the quadratic to locate the vertex:
If we sketch the graph of a parabola, it is clear that the line tangent to the vertex is horizontal.
A horizontal line has slope 0 (between any two distinct points of the horizontal line the rise is 0 and the run is not 0, so the slope is rise / run = 0 / something that isn't 0. This gives you 0 (it's not 'undefined'; it's division by 0 that's undefined because, while you can count to and beyond any number by .1, or .01, or .001, etc., you can't count to anything by 0's--you never get anywhere). So at the vertex, the slope of the parabolic function, and therefore its derivative, is 0 .
If we let x_vertex or x_symm be the x coordinate of the vertex (note that the vertex is on the axis of symmetry, which is defined by the value of x, hence the notation x_symm), then since the derivative is 0 at the vertex we have
y ' (x_vertex) = 0.
This is an equation we can solve for x_vertex. Using the fact that the derivative of the quadratic function is y ' (x) = 2 a x + b, we just substitute x_vertex for x and get
y ' (x_vertex) = 2 a * x_vertex + b so that
2 a * x_vertex + b = 0.
We very easily solve this equation for x_vertex (just subtract b from both sides then divide both sides by 2 a) and obtain
x_vertex = - b / (2 a).
In general if we want to find where the graph of a function 'levels off', as a smooth function does at its peaks and valleys, we just set the derivative equal to zero and solve the resulting equation.
It's worth noting that for a quadratic function with zeros at x values (-b +- sqrt(b^2 - 4 a c) ) / (2 a), the vertex lies right between those zeros, at x = - b / (2 a).
Note that the derivative y ' (x) = 2 a x + b of a quadratic function is a linear function. We can draw some interesting conclusions from this fact:
Since a linear function changes at a constant rate, it follows that the derivative of a quadratic function changes at a constant rate.
One property of linearity is that over any x interval, the average value of a linear function occurs at the midpoint of that interval.
We therefore conclude that over any given x interval, the average value of the derivative of a quadratic function y(x) is taken at the midpoint of that interval; that is, the average rate of change occurs at the midpoint of the interval.
You should remember from a week ago that the average value of the rate of change of pendulum period with respect to length was not equal to the midpoint value of the rate; this is because pendulum period is not a quadratic function of its length (if it was the midpoint value would be equal to the average over the interval).
In fact, a function is quadratic if and only if the average rate of change over any interval is equal to the rate of change at the midpoint of the interval. This logical statement says two things:
If the function is quadratic, the two rates are always equal.
And if the two rates are always equal, the function is quadratic.
We can also find other important properties of quadratic functions using the derivative.
For example if a is positive, it's easy to show that 2 a x + b > 0 if x > - b / (2 a), which tells us that the graph slopes upward to the right of the vertex. Also 2 a x + b would be an increasing function, so the derivative increases and as a result the graph gets steeper as we move to the right.
The derivative of y = x^3
If y = x^3, then the expression y(x + `dx) is (x + `dx)^3, which is equal to (x + `dx) ( x + `dx) ( x + `dx). We expand this expression as follows:
(x + `dx) ( x + `dx) ( x + `dx) = (x + `dx) [ ( x + `dx) ( x + `dx) ]
= (x + `dx) ( x ( x + `dx) + `dx ( x + `dx) )
= (x + `dx) ( x^2 + x `dx + x `dx + (`dx)^2)
= (x + `dx) ( x^2 + 2 x `dx + (`dx)^2)
= x ( x^2 + 2 x `dx + (`dx)^2) + `dx ( x^2 + 2 x `dx + (`dx)^2)
= x^3 + x^2 `dx + x (`dx)^2 + x^2 `dx + 2 x (`dx)^2 + (`dx)^3
= x^3 + 3 x^2 `dx + 3 x (`dx)^2 + (`dx)^3.
To get the derivative we must first simplify the expression ( y(x + `dx) – y(x) ) / `dx:
( y(x + `dx) – y(x) ) / `dx
= [ (x^3 + 3 x^2 `dx + 3 x (`dx)^2 + (`dx)^3) - x^3) ] / `dx
= (3 x^2 `dx + 3 x (`dx)^2 + (`dx)^3) / `dx
= (3 x^2 + 3 x `dx + (`dx)^2) * `dx / `dx
= 3 x^2 + 3 x `dx + (`dx)^2.
As `dx shrinks to 0, all these terms except 3 x^2 will also shrink to 0, so that
Derivatives of higher integer powers of x
If we want to find the derivative of y = x^4, we start with the expression y(x + `dx) = (x + `dx)^4.
This expression is just equal to (x + `dx) ( x + `dx)^3, so using the expression we obtained for (x + `dx)^3 we obtain
(x + `dx)^4 = (x + `dx) ( x^3 + 3 x^2 `dx + 3 x (`dx)^2 + (`dx)^3 ).
You may simplify this for yourself, and you should do so, but you should also think about how you could see, without doing the entire expansion, that the only terms in the expansion that do not contain at least the square of `dx would be the x^4 and x^3 `dx terms.
If the expansion is completed you have
(x + `dx)^4 = x^4 + 4 x^3 `dx + ...,
where ... indicates terms containing at least `dx^2.
Plugging into ( y(x + `dx) – y(x) ) / `dx we obtain
( ( x^4 + 4 x^3 `dx + ... ) - x^4 ) / `dx
= (4 x^3 `dx + ... ) / `dx, where ... is as before
= (4 x^3 + ... ) * `dx / `dx, where now all terms of ... contain at least `dx (rather than (`dx)^2, since `dx has now been factored out)
= 4 x^3 + ...
Since all terms in ... contain `dx, they all shrink to 0 when we take the limit, and the derivative is 4 x^3.
The scheme for integer power of x is thus
derivative of x^2 is 2 x
derivative of x^3 is 3 x^2
derivative of x^4 is 4 x^3
and the pattern continues, so that the derivative of x^n is n x^(n - 1).
The formula for the derivative of x^n holds even for non-integer n.
Not gonna prove that here, but we will prove it later in the course.
So for example if n = 1/2, the derivative of x^(1/2) is 1/2 x^(1/2 - 1) = 1/2 x^(-1/2) = 1 / (2 x^(1/2) ).
Since x^(1/2) = sqrt(x), this means that the derivative of sqrt(x) is 1 / (2 sqrt(x)).
That's pretty much where we started today.
The derivative of a polynomial is a polynomial whose degree is 1 less than that of the original.
The terms of a polynomial in x are multiples of integer powers of x. The derivative of an integer power is also an integer power, but of degree 1 less than the original. So the degrees of all terms of the polynomial decrease by 1 when the derivative is taken.