Jonathan said:
Yes, but it's all very confusing. A real world example would be
helpful.
Is there a real world example of using 2X, (the derivative of X^2) to
obtain some useful information from the function y=x^2 ?
Not exactly, but try to figure out the maximum size of package that can be
mailed, considering that the maximum size is 108 inches in combined length
and girth (distance around the thickest part). Note that I did not say the
shape has to be rectangular or cylindrical.
To expand on the above comment....
When a curve rises and then falls, or falls and then rises, it must
pass through a point where the slope is zero. This fact is one of
those things taken advantage of, using derivatives. By no means is
this the only use. Just one of many.
An example is finding the case where you minimize the amount of sheet
metal used to make a can for soup or tuna. If you know the volume you
need to enclose, that is.
A can is a right circular cylinder and has two ends (top lid and
bottom lid) and body cylinder itself that must be made out of the
sheet metal. Let's call the height H, the cylinder's diameter D, the
volume V, and the total area of sheet metal required A. For these
purposes, lets ignore the bit of metal used to seal the edges or form
flaps or lips and just focus on the simplified surface area and make
that what we want to minimize (for cost reasons, let's say.)
The area is:
A = top lid area + bottom lid area + side cylinder area
= PI*(D/2)^2 + PI*(D/2)^2 + PI*D*H
and after a little algebraic manipulation,
A = PI * D * [ H + D/2 ]
Hopefully, Bill, you can get this far without too much difficulty. At
this point, we have two variables, H and D, and there are an infinite
number of possible combinations that could be used to achieve any
particular A. Worse than that, we aren't even given the area, but
instead given some volume. So let's look at the equation for the
volume:
V = PI*(D/2)^2*H
Well, that's not too bad. Except it also has those two variables, H
and D, and for any given volume we can still have an infinite number
of possible H's and D's to achieve any particular V.
In thinking just a moment about this before going further, you should
be able to think about and realize that there are two incredible
extreme cases. One where the area of the lids is about zero and the
height must be very, very high in order to achieve some volume V. The
other where the height is about zero and the area of the lids must be
very, very large to achieve some volume V. In this two extremes, it
should be fairly easy to see that a lot of sheet metal would be needed
and that it would be a lot more than the optimum. So you should be
able to guess that the amount of metal goes from a very large number
when the height is near zero down to some smaller value where the
height is reasonable and then back up to a very large amount as the
height nears infinity. We know the answer must be in-between.
Imagine plotting such a curve of area versus, for example, just the
height of the can. It would go from infinity at H=0, down to some
minimum value at some H we don't yet know, then back up to infinity
when H=infinity. All this with the volume V remaining constant, of
course. Remember that when a curve rises and then falls, or falls and
then rises, it must pass through a point where the slope is zero. This
must apply here, just by thinking about it.
So what we want to do is find the point where the area is a minimum.
That says that the A= equation mentioned above needs to be minimized
and suggests that to do so we just need to find where the slope is
zero.
But we are still stuck with those two pesky variables, H and D. So
let's get rid of one, right now.
To do that, take the volume equation and solve for H, instead (or you
could do that for D as that's another path that will get you to the
same place.) It is:
H = (4*V) / (PI*D^2)
Now we can substitute that into the A= equation, thus:
A = PI * D * [ (4*V) / (PI*D^2) + D/2 ]
Again, some re-adjusting with typical algebra skills yields:
A = 4*V/D + PI*D^2/2
Now, there is just the one variable, D. At this point we can use
calculus rules to produce the derivative:
dA = (-4*V/D^2 + PI*D) dD, or
dA/dD = (-4*V/D^2 + PI*D)
This represents the slope. Just set it to zero and solve or inspect
it.
0 = (-4*V/D^2 + PI*D)
4*V/D^2 = PI*D
4*V = PI*D^3
D^3 = 4*V/PI
D = CUBEROOT( 4*V/PI )
There it is. For any volume, this will tell you what the diameter of
the lids should be.
So let's look at the height. If D is the value above, what would the
height then be. Well, we can plug in the D= equation we just
generated back into the volume equation:
V = PI*(CUBEROOT(4*V/PI)/2)^2*H
= (PI/4) * CUBEROOT(4*V/PI)^2 * H
= (PI/4) * CUBEROOT(16*V^2/PI^2) * H
= CUBEROOT(PI^3/4^3 * 16*V^2/PI^2) * H
= CUBEROOT((PI/4)*V^2) * H
Solving this for H gives us:
H = V / CUBEROOT((PI/4)*V^2)
= CUBEROOT( V^3 / [(PI/4)*V^2] )
= CUBEROOT( V / (PI/4) )
= CUBEROOT( 4*V/PI )
Note that this H value is the same as the D value we also worked out.
In other words, the optimum is found when both D and H are the same. A
kind of "square can" so to speak. At least in profile.
This could have been solved differently, as well. We could have set
up a ratio, H/D, as a new variable and then worked out the equations
in terms of that H/D variable. In the end, we would have also set
that derivative equation to zero and solved and, I predict, would have
found a value of 1 as the answer.
In fact, this is the differential equation in that case (I'm skipping
all the drudgery here.) I'll use X = H/D:
dA = PI*CUBEROOT([4*V/(PI*X)]^2)*(X-1)/(3*X) dX
Setting this to zero, is:
0 = PI * CUBEROOT([4*V/(PI*X)]^2) * (X-1) / (3*X)
Upon inspection, you can see that this is zero if X = 1 simply because
the term (X-1) there will be zero forcing the rest to go to a zero
value. Also, if V=0, then the CUBEROOT will go to zero and the
equation will be zero then, too. But I suppose that is kind of an
obvious possibility. But the main point is that you can see that
(X-1) term in there and that tells us that when X=1 the area equation
will be at a minimum. Confirmation of what we discovered otherwise.
Similar reasoning using partial differentials and a basic description
of an error term allows one to develop the standard "least squares
fit" method used to fit a line to a set of data points taken in the
face of measurement error. There are many such applications using
this idea. And this is only one of many ideas using the derivative,
each of them with many interesting applications.
So it is important.
Jon
Jon,
Thanks for the explanation of sizing a can for maximum volume and
minimum area. It was very helpful. I follow most of it, but forget the
rules for derivatives. It was a good example of using derivatives to
find some optimum value.
The rules take a little getting used to. Most important is that you
understand WHY. Then memorize some of the basics. There are two
"spaces" to consider -- one is your mental space which allows you to
think and understand the where's and whyfor's but where it also isn't
strictly necessary for you to know some specific detail that you can
go look up somewhere; and the other is your result space where you
must be quantitative. A little bit of both is needed -- a good feel
for the meanings; and a few memorized details to get you by, as well.
I find that derivatives are rather easy to deal with, with few
exceptions that I need to look up these days. On the other hand, the
integrals of some things are hard enough to solve by hand and varied
enough in their approaches that you often accept a facility with some
and just keep a book nearby tabulating many other solutions for you.
You then learn to find the ones you need for some problem. Not that
you might not be able, on your own and with enough time and
creativity, to solve them. But some of these really take a LOT of
creativity and facility to figure out and it's handy to tap into
someone else's skills, there.
It will take practice and work to gain an intuition. I don't know of
any way to short-cut that, though some folks I suppose just tumble
naturally to all this like they do to breathing. Not me, anyway. Took
years of banging my head against the wall.
By the way, one helpful way to look at these "dx" and "dy" things is
to see them as a special kind of variable added to standard algebra.
In algebra, your variables can hold any finite value at all. In
calculus, these new variables can't hold finite values but only
infinitesimal values. Note that there is an infinity of these
infinitesimal values, too. Some bigger than others, just like the
case with finite values. So you have two kinds of variables in
calculus -- finite-holding ones and infinitesimal-holding ones. They
can be mixed and multiplied and cancelled and so on.
So when you see dy/dx, just think that this is two variables that only
hold really tiny values -- smaller in magnitude than any possible
finite value, yet not zero. And that this is a ratio of the two. It
may be the case (often is) that the ratio of two infinitesimal values
has a finite ratio, too. For example, that dy/dx = 2. That just
means that dy is twice the size of dx. That's all. You could also
look at it as dy = 2*dx.
Similarly, when you see the equation:
D = S * t
to describe the case showing the relationship of speed, time, and
distance, you need to realize that in algebra these variables are
finite in size. You normally don't even think about it and may not
even have this fact staring you in the face, but you use specific
values and plug them in and calculate results. However, these are
average values you use. Your car was going an _average_ of 40 MPH,
right? The time over which this average was true was, say, 1/2 hour.
So the total distance traveled was 20 miles.
But in calculus, you might want exact and precise, moment by moment,
knowledge. One more precise way of stating the able is to write:
dD = S(t) * dt
Here, S(t) may not be constant and an average may only approximate,
but not be exact. For example, a falling rock (without an atmosphere
to interfere) doesn't have any one speed. The speed is constantly
changing as it falls. If you pick any particular speed, how long is
that truely the exact speed? For an infinitely small time! So you
represent this tiny time with dt. How far does the object fall in
this infinitely small time? Well, an infinitely small distance,
that's how far. So you represent that with dD. So it is the same
equation except you don't use averages, you use exact time-dependent
values. But it is the same equation as before, except that you have
replaced two finite variables with two infinitesimal values, instead.
Of course, it's not practical. You can't really build anything
infinitely small and you can't measure infinitely small distances or
time bits. So to be practical you need to add a bunch of them
together so that they make a finite value, again. How many infinitely
small values does that take? An infinite number of them. That's how
many. So that is why that integral symbol -- it just means to add up
an infinite number of things so that you can get back your finite
values.
Taking this falling rock example, let's say it starts at S=0 at time
t=0. [S(t=0) = 0, in other words.] What is its speed at some future
time? Well, according to the rule for acceleration of gravity, it is
S(t)=g*t. Just acceleration times time. So the equation becomes:
dD = g * t * dt
To make anything of this you need to do those infinite sums, and what
you do to one side you need to do to the other, so:
Integral( dD ) = Integral( g*t*dt )
On the left side, what happens when you add up an infinite number of
infinitely small pieces of D? Well, you get D back, of course. If
you divide up D into an infinite number of tiny pieces and then add
them all back up again, you just get what you started with. So the
equation trivially becomes:
D = Integral( g*t*dt )
Now, as you already know, if you look at this:
Y = ( 5*2 + 5*4 + 5*6 + 5*8 )
You can easily see that we can extract out the 5 and make:
Y = 5 * ( 2 + 4 + 6 + 8 )
Similarly, the same happens with infinite sums, too. If there is a
constant multiplier, you can extract it out. Since 'g' is a constant
(near Earth's surface, anyway) we can rewrite:
D = g * Integral( t*dt )
Better, eh? Okay, now we have a problem. What is this weird product
in there and how do we handle it?
Well, one way to "see" this is that it is a product of two measures,
which make up an area. An area? Yes, an area. The rectangle is 't'
high, let's say, and 'dt' wide. Okay, so it is pretty narrow indeed.
I mean, dt can only hold infinitely small values, right? So it must
be pretty narrow. About as narrow as a line, yes?? But an area, just
the same.
So what does the first rectangle look like? Well, at t=0, it is 0
high and dt wide. Just next to that one, we place the next rectangle
we are adding up. It starts at t=dt and is dt high and dt wide. The
next one starts at t=2*dt and is 2*dt high and also dt wide. And so
on. If you think about this closely, you will see that as we progress
from t=0 towards t = some t we want to get to, that the height
continues to climb up until at the end of this we have a height of 't'
for the last narrow area. This shape is a right triangle that is 't'
wide at the base and 't' high at the end of it. The area of this
triangle is obviously (1/2)*t*t or t^2/2. That's the sum. Done.
So the answer is:
D = 1/2 * g * t^2
I'm sure you've seen that somewhere.
But keep in mind you can cancel these new variables like before, move
them around, play with them, etc.
In electronics, there is this:
Q = C * V
Q being Coulombs, C in Farads, and V in volts. The charge on the
capacitor is simply its capacitance times the voltage. However, a
more precise expression is:
dQ = C * dV
Note that all I did was to replace V with dV and was then forced to
swap dQ for Q. But let's not stop there. We can divide both sides by
a new variable, dt. So that,
dQ/dt = C * dV/dt
But Coulombs divided by time (infinitesimal or finite) is current. So
this is just:
I = C * dV / dt
Found in most any electronics book.
You can substitute finite differences for the infinitesimals, so that
if you know that there will be a change of 2 volts over 1 millisecond,
you can replace dV/dt with the average value of 2000 volts per second
and use that to compute the current.
But it's about as facile as that. Just playing with infinitesimal
variables, I mean. The choice of dividing by 'dt' above was a
practical one. I suppose I could have divided both sides by some
other infinitesimal, for example using dX to mean some displacement.
But in most common cases, that would not have been very useful. Still,
it's up to your imagination and there may be cases where that is
important.
Something else before leaving that capacitor equation:
dQ = C * dV
Capacitors usually don't have a fixed capacitance -- as they often
change their capacitance against the voltage applied on them. So the
function might really look like:
dQ = C(V) * dV
In other words, with a C that varies with voltage. While this
equation:
Q = C * V
would be very often inaccurate in such a case, this equation:
dQ = C(V) * dV
is perfectly accurate, throughout.
Calculus lets you express more precision over varying situations.
I checked a tuna can on my shelf that measures 3.25 diameter by 1.75
inch high, which is not optimum and apparently wastes about 1.6 sq.
inch of area. But tuna cans are probably designed for convenience of
use and not optimum volume.
And being of a recognizable style, which helps people find them
quickly.
Thanks again for the math lesson.
No problem.
Jon