Calculus/Derivatives
Derivative of a function f at a number a
Notation
We denote the derivative of a function at a number as .
Definition
The derivative of a function at a number a is given by the following limit (if it exists):
Template:Center topTemplate:Center bottom
An analagous equation can be defined by letting . Then , which shows that when approaches , approaches :
Template:Center topTemplate:Center bottom
Interpretations
As the slope of a tangent line
Given a function , the derivative can be understood as the slope of the tangent line to at :
Template:Center top
Template:Center bottom
Example
Find the equation of the tangent line to at .
Solution
To find the slope of the tangent, we let and use our first definition:
Template:Center topTemplate:Center bottom
It can be seen that as approaches , we are left with . If we plug in for :
Template:Center topTemplate:Center bottom
So our preliminary equation for the tangent line is . By plugging in our tangent point to find , we can arrive at our final equation:
Template:Center topTemplate:Center bottom
So our final equation is .
As a rate of change
The derivative of a function at a number can be understood as the instantaneous rate of change of when .
The derivative as a function
So far we have only examined the derivative of a function at a certain number . If we move from the constant to the variable , we can calculate the derivative of the function as a whole, and come up with an equation that represents the derivative of the function at any arbitrary value. For clarification, the derivative of at is a number, whereas the derivative of is a function.
Notation
Likewise to the derivative of at , the derivative of the function is denoted .
Definition
The derivative of the function is defined by the following limit:
Template:Center topTemplate:Center bottom
Also,
Template:Center topTemplate:Center bottom
or
Template:Center topTemplate:Center bottom
d(x^n)/dx
Template:RoundBoxTop Consider the sequences:
many terms containing
many terms containing
many terms containing
Therefore:
many terms with each and every term containing
read as "derivative with respect to of to the power ."
Later it will be shown that this is valid for all real , positive or negative, integer or fraction.
Examples
Without Using Calculus
Derivative of cubic function
When there is exactly 1 value of that gives
When there are 3 values of that give
When there are exactly 2 values of that give
Point is a stationary point.
In the diagram there is a stationary point at When there are exactly 2 values of that produce
Aim of this section is to derive the condition that produces exactly 2 values of
See Cubic function as
product
of linear function and quadratic.
The associated quadratic when
Divide by
This division gives a quotient of and remainder of
Factor divides exactly. Therefore, remainder the desired condition.
When the derivative of Template:RoundBoxBottom
Derivative of quartic function
Template:RoundBoxTop The quartic function:
In substitute for
In substitute for
Reduce (4) and (5) and substitute Q for qq:
Combine (4a) and (5a) to eliminate p and produce a function in Q: Template:RoundBoxTop where:
C0 = (- 2048aaaaacddeeee + 768aaaaaddddeee + 1536aaaabcdddeee - 576aaaabdddddee
+ 1024aaaacccddeee - 1536aaaaccddddee + 648aaaacdddddde - 81aaaadddddddd
- 1152aaabbccddeee + 480aaabbcddddee - 18aaabbdddddde + 640aaabcccdddee
- 384aaabccddddde + 54aaabcddddddd - 128aaacccccddee + 80aaaccccdddde
- 12aaacccdddddd + 216aabbbbcddeee - 81aabbbbddddee - 144aabbbccdddee
+ 86aabbbcddddde - 12aabbbddddddd + 32aabbccccddee - 20aabbcccdddde
+ 3aabbccdddddd)Template:RoundBoxBottom Coefficient of interest is which is in fact the value See Equal Roots of Quartic Function.
If is a solution and contains at least 2 roots of format
In other words 2 equal roots where
If and become:
is equivalent to and is derivative of Template:RoundBoxBottom
Product Rule
Let Template:Math where
Template:MathTemplate:MathTemplate:MathTemplate:MathTemplate:Math
Template:MathTemplate:MathTemplate:Math
Examples
Template:RoundBoxTop Let Calculate
Differentiate both sides.
This shows that as above is valid when is a positive fraction. Template:RoundBoxBottom
Template:RoundBoxTop Let . Calculate .
Differentiate both sides.
This shows that as above is valid for negative . Template:RoundBoxBottom
Template:RoundBoxTop Let . Calculate .
Differentiate both sides.
This shows that as above is valid when is a negative fraction. Template:RoundBoxBottom
Quotient rule
Used where
Derivatives of trigonometric functions
sine(x)
The value :
>>> # python code
>>> [ (math.cos(Δx)-1)/Δx for Δx in (.1,.01,.001,.0001,.0000_1,.0000_01,.0000_001,.0000_0001,.0000_0000_1) ]
[-0.049958347219742905, -0.004999958333473664, -0.0004999999583255033,
-4.999999969612645e-05, -5.000000413701855e-06, -5.000444502911705e-07,
-4.9960036108132044e-08, 0.0, 0.0]
>>>
by L'Hôpital's rule.
The value :
>>> # python code
>>> [ math.sin(Δx)/Δx for Δx in (.1,.01,.001,.0001,.0000_1,.0000_01,.0000_001,.0000_0001,.0000_0000_1) ]
[0.9983341664682815, 0.9999833334166665, 0.9999998333333416,
0.9999999983333334, 0.9999999999833332, 0.9999999999998334,
0.9999999999999983, 1.0, 1.0]
>>>
by L'Hôpital's rule.
Proof of 2 limits
Area of sector area of triangle
Area of triangle area of sector
In the diagram
Let be the area of a sector of a circle. Then and
Area of sector
Area of triangle
Area of sector
Therefore
Therefore Template:RoundBoxBottom
Template:RoundBoxBottom Template:RoundBoxBottom
cosine(x)
Differentiate both sides:
tan(x)
Differentiate both sides:
Derivatives of inverse trigonometric functions
arcsine(x)
In the figure to the right you can see that the curves are
the same curve. However curve is limited to
The derivative shows that the slope of is when and infinite when Template:RoundBoxBottom
arccosine(x)
In the figure to the right you can see that the curves are the same curve. However curve is limited to
The derivative shows that the slope of is when and infinite when Template:RoundBoxBottom
arctan(x)
In the figure to the right you can see that the curves are the same curve. However curve is limited to
The derivative shows that the slope of is when and when Template:RoundBoxBottom
Derivatives of logarithmic functions
a^x or
Consider the value specifically . L'Hôpital's rule cannot be used here because is what we are trying to find.
taken times.
We will look at the expression for different values of
with (approx) in which case the expression becomes
where is or taken
times. This approach is used here because function sqrt() can be written so
that it does not depend on logarithmic or exponential operations.
>>> # python code
>>> N=Decimal(2)
>>> v2 = ( [ n for n in (N,) for p in range (0,70) for n in (n.sqrt(),) ][-1] -1 )*(2**70) ; v2
Decimal('0.69314718055994530941743560122437474084363865015406919942144')
>>>
>>> N=Decimal(8)
>>> v8 = ( [ n for n in (N,) for p in range (0,70) for n in (n.sqrt(),) ][-1] -1 )*(2**70) ; v8
Decimal('2.07944154167983592825352768227031325913255072732801782513664')
>>>
>>> N=Decimal(32)
>>> v32 = ( [ n for n in (N,) for p in range (0,70) for n in (n.sqrt(),) ][-1] -1 )*(2**70) ; v32
Decimal('3.46573590279972654709124760144583715956091114572543812435968')
>>>
>>> N=Decimal(128)
>>> v128 = ( [ n for n in (N,) for p in range (0,70) for n in (n.sqrt(),) ][-1] -1 )*(2**70) ; v128
Decimal('4.85203026391961716593059535875094644210510807293198187102208')
>>>
Compare the values v8, v32, v128 with v2:
>>> v8/v2; v32/v2; v128/v2
Decimal('3.00000000000000000000176135549769209744528640235368520610520')
Decimal('5.00000000000000000000587118499230699148996545343403093128046')
Decimal('7.00000000000000000001232948848384468209997247971055570994695')
>>>
We know that . The values v2, v8, v32, v128 are behaving like logarithms.
In fact is the natural logarithm of
written as
Figure 5 contains graphs of for with graph of included for reference.
All values of are valid for all curves except where
The correct value of is:
>>> Decimal(2).ln()
Decimal('0.693147180559945309417232121458176568075500134360255254120680')
>>>
Our calculation produced:
Decimal('0.69314718055994530941743560122437474084363865015406919942144')
accurate to 21 places of decimals, not bad for one line of simple python code using high-school math.
Template:RoundBoxTop
This method for calculation of supposes that function sqrt() is available.
Programming language python interprets expression a**b as
Therefore, in python, can be calculated in accordance with the basic definition above:
# python code
>>> getcontext().prec
101 # Precision of 101.
>>> dx = Decimal('1E-50')
>>> (2**dx - 1)/dx
Decimal('0.69314718055994530941723212145817656807550013436026') # ln(2)
>>> (2**(-dx) - 1)/(-dx)
Decimal('0.693147180559945309417232121458176568075500134360253') # ln(2)
>>>
The base of natural logarithms is the value of that gives
This value of , usually called
>>> # python code
>>> N=e=Decimal(1).exp();N
Decimal('2.71828182845904523536028747135266249775724709369995957496697')
>>> ( [ n for n in (N,) for p in range (0,70) for n in (n.sqrt(),) ][-1] -1 )*(2**70)
Decimal('1.0000_0000_0000_0000_0000_0423_51647362715016770651530003719651328')
>>> # ln(e) = 1. Our calculation of ln(e) is accurate to 21 places of decimals.
When Template:MathTemplate:Math Template:RoundBoxBottom
ln(x)
Examples
Template:RoundBoxBottom Template:RoundBoxTop
Template:RoundBoxBottom Template:RoundBoxTop Calculate
Careful manipulation of logarithms converts exponents into simple constants. Template:RoundBoxBottom
Chain rule
Used where
Examples
Let where .
Template:RoundBoxBottom Template:RoundBoxTop
Let where .
Applications of the Derivative
Shape of curves
The first derivative of or As shown above, at any point gives the slope of at point
is the slope of when
When both and slope of
When both and slope of
When both and slope of
Point is absolute minimum.
In the example to the right, and
Of special interest is the point at which or slope of
When and
The point is called a critical point or stationary point of Because has exactly one solution for has exactly one critical point.
The value of at point is less than at both Therefore the critical point is a minimum of
In this curve the point is both local minimum and absolute minimum. Template:RoundBoxBottom
When or both and slope of
When both and slope of
When both and slope of
When both and slope of
Point is local maximum.
Point is local minimum.
In the example to the right, and
Of special interest are the points at which or slope of
When and or
When and
The points are critical or stationary points of Because has exactly two real solutions for has exactly two critical points.
Slope of to the left of is positive and
adjacent slope of to the right of is negative.
Therefore point is local maximum. Point is not absolute maximum.
Adjacent slope of to the left of is negative and
slope of to the right of is positive.
Therefore point is local minimum. Point is not absolute minimum.
Template:RoundBoxBottom
Maxima and Minima
Electric water heater
with axis compressed.
For maximum and
A cylindrical water heater is standing on its base on a hard rubber pad that is a perfect thermal insulator. The vertical curved surface and the top are exposed to the free air. The design of the cylinder requires that the volume of the cylinder should be maximum for a given surface area exposed to the free air. What is the shape of the cylinder?
Let the height of the cylinder be and let where is the radius and is a constant.
Surface of cylinder
Volume of cylinder
For maximum volume,
Therefore
The height of the cylinder equals the radius. Template:RoundBoxBottom
Square and triangle
A square of side has perimeter and area
An equilateral triangle of side has perimeter and area
Total area and must be minimum. What is the value of ?
For minimum
County Road
Template:RoundBoxTop Template:RoundBoxTop
Town B is 40 miles East and 50 miles North of Town A. The county is going to construct a road from Town A to Town B. Adjacent to Town A the cost to build a road is $500k/mile. Adjacent to Town B the cost to build a road is $200k/mile. The dividing line runs East-West 30 miles North of Town A. Calculate the position of point C so that the cost of the road from Town A to Town B is minimum.
Let point
Then distance from Town A to point
Distance from Town B to point Template:RoundBoxBottom Template:RoundBoxTop
Curve showing is actually .
Cost is minimum where
Cost in units of $100k.
For minimum cost
Cardboard box
Template:RoundBoxTop Template:RoundBoxTop
Cut on purple lines, fold on red lines.
Design of box includes top.
A piece of cardboard of length and width will be used to make a box with a top. Some waste will be cut out of the piece of cardboard and the remaining cardboard will be folded to make a box so that the volume of the box is maximum.
What is the height of the box? Template:RoundBoxBottom
and is maximum when
For maximum volume
inches. Template:RoundBoxBottom Template:RoundBoxBottom
Solving ellipse at origin
When length of is maximum, length of major axis
When length of is minimum, length of minor axis
An ellipse with center at origin has equation:
Given values calculate:
- length of major axis
- length of minor axis.
In Figure 1 is any line from origin to ellipse and is angle between axis and
Aim of this section is to calculate so that length of is maximum, in which case length of major axis = Template:RoundBoxTop Let and
Then and
Substitute these values in
Calculate
For maximum or minimum
Square both sides, substitute for and result is:
where:
An example
Template:RoundBoxTop Let equation of ellipse be:
# python code
>>> A,B,C = 55,-24,48
>>> a = (+ 4*A*A - 8*A*C + 4*B*B + 4*C*C);a
2500
>>> b = -a;b
-2500
>>> c = B*B;c
576
>>>
>>> a,b,c = [v/4 for v in (a,b,c)] ; a,b,c
(625.0, -625.0, 144.0)
>>> S = .36
>>> a*S*S + b*S + c
0.0
>>> S = .64
>>> a*S*S + b*S + c
0.0
>>>
The solutions of quadratic equation are or .
Therefore or .
From above: Template:RoundBoxTop
# python code
A,B,C,F = 55,-24,48, -2496
t1 = (0.6, 0.8)
dict1 = dict()
for v1 in (t1, t1[::-1]) :
c1,s1 = v1
for c in (c1,-c1) :
for s in (s1,-s1) :
t = (-F/( A*c*c + B*c*s + C*s*s ))**.5
if t in dict1 : dict1[t] += ((c,s),)
else : dict1[t] = ((c,s),)
L1 = [ (v, dict1[v]) for v in sorted([ v for v in dict1 ]) ]
for v in L1 : print (v)
Template:RoundBoxBottom Template:RoundBoxTop
(6.244997998398398, ((0.8, -0.6), (-0.8, 0.6)))
(6.34287855135306, ((0.6, -0.8), (-0.6, 0.8)))
(7.806247497997998, ((0.8, 0.6), (-0.8, -0.6)))
(7.999999999999999, ((0.6, 0.8), (-0.6, -0.8)))Template:RoundBoxBottom Minimum value of Length of minor axis
Maximum value of Length of major axis
Gallery
-
When line has direction cosines and length of is minimum.
-
When line has direction cosines and length of is maximum.
Template:RoundBoxBottom Template:RoundBoxBottom Template:RoundBoxBottom
Rates of Change
The car jack
Template:RoundBoxTop Template:RoundBoxTop
In triangle to the right:
- length inches,
- length inches and is horizontal,
- length inches and is vertical,
Point is moving towards point at the rate of inchesminute. Template:RoundBoxBottom
Vertical motion
When
When
When
At what rate is point moving upwards:
(a) when ?
(b) when ?
(c) when ?
We have to calculate when is given.
(equation of circle)
For convenience we'll use the negative value of the square root and say that
Relative to line
When inchesminute.
When inchesminute.
When and inchesminute.
This example highlights the mechanical advantage of this simple but effective tool. When the top of the jack is low, it moves quickly. As the jack takes more and more weight, the top of the jack moves more slowly. Template:RoundBoxBottom
Change of area
Area of is maximum when
At what rate is the area of changing when
(i) ?
(ii) ?
(iii) ?
where is area of and inches minute.
Calculate
When and area of is increasing at rate of square inches/minute.
When and area of is decreasing at rate of square inches/minute.
When is a maximum of square inches and Template:RoundBoxBottom Template:RoundBoxBottom
On the clock
An old fashion analog clock with American style face (12 hours) keeps accurate time. The length of the minute hand is inches and the length of the hour hand is inches.
At what rate is the tip of the minute hand approaching the tip of the hour hand at 3 o'clock?
Let be distance between the two tips.
The task is to calculate
where is angle subtended by side at center of clock.
Template:RoundBoxTop Calculating
Angular velocity of minute hand radians/hour.
Angular velocity of hour hand radians/hour.
angular velocity of minute hand relative to hour hand radians/hour. Template:RoundBoxBottom
Template:RoundBoxTop Calculating
inches/hour. Template:RoundBoxBottom
Radar Speed Trap
feet.
feet.
.
mph.
A multi-lane highway is oriented East-West. A vehicle is moving in the inside lane from West to East. A law-enforcement officer with a radar gun is in position 50 feet South of the center of the inside lane. When the vehicle is 200 feet from the radar gun, it shows the vehicle's speed to be 60 mph. What is the actual speed of the vehicle?
Let length
where mph.
The derivative
On the Water
Template:RoundBoxTop A ship is at sea nautical miles East and nautical miles South of a lighthouse, and the ship is steaming South-West at nautical miles/hour or knots.
At what rate is ship approaching lighthouse?
knots.
knots. Template:RoundBoxTop
Calculating
The sign indicates that, when is increasing, is decreasing. Template:RoundBoxBottom knots towards the lighthouse. Template:RoundBoxBottom
Reciprocating engine
Template:RoundBoxTop Template:RoundBoxTop
The diagram illustrates the piston, connecting rod and crankshaft of an internal combustion reciprocating engine.
The connecting rod is connected to piston on axis, and to crankshaft at end of on axis.
This section analyzes the motion of the piston as the crankshaft rotates through angle and the piston moves up and down on the axis. Template:RoundBoxBottom
Position of piston
Piston moves up and down between and inches.
Template:RoundBoxTop Code supplied to grapher (without white space) is:
(5)(cos(x)) + ( ((25)((cos(x))^2) + 144 )^(0.5) )
When expressed in this way, it's easy to convert the code to python code:
(5)*(cos(x)) + ( ((25)*((cos(x))**2) + 144 )**(0.5) )
Template:RoundBoxBottom Positions of interest: Template:RoundBoxTop
-
Graph and diagram of piston at top dead center.
-
Graph and diagram of piston at bottom dead center.
-
Graph and diagram of piston half-way between TDC and BDC.
-
Graph and diagram of crank half-way between TDC and BDC.
-
Graph and diagram of connecting rod tangential to crank.
Template:RoundBoxBottom Template:RoundBoxBottom
Velocity of piston
Strictly speaking, velocity
At constant RPM, is constant. Therefore is used to illustrate velocity.
Calculation of by implicit differentiation.
Acceleration of piston
Negative acceleration has a greater absolute value than the positive, but it does not last as long.
Acceleration introduces the second derivative. While velocity was the first derivative of position with respect to time, acceleration is the first derivative of velocity or the second derivative of position.
From velocity above
By implicit differentation:
Substitute for and as defined above, and you see the code input to grapher at top of diagram to right. Template:RoundBoxTop
axis compressed to illustrate shape of curves.
"Kinks" in the curve:
It is not obvious by looking at the curve of velocity that there are slight irregularities in the curve when velocity is increasing.
However, the irregularities are obvious in the curve of acceleration.
During one revolution of the crankshaft there is less time allocated for negative acceleration than for positive acceleration. Therefore, the maximum absolute value of negative acceleration is greater than the maximum value of positive acceleration. Template:RoundBoxBottom Template:RoundBoxBottom
Minimum and maximum velocity
In the first quadrant, from to the piston moves through inches.
In the second quadrant, from to the piston moves through inches.
Therefore, in the first quadrant, acceleration must be greater than in the second quadrant.
Velocity is rate of change of position. See also Figure 3 above.
Minimum velocity:
Velocity is zero when slope of curve of position is zero. This occurs at top dead center and at bottom dead center, ie, when and
Maximum velocity:
Intuition suggests that the position of maximum velocity might be the point at which the connecting rod is tangent to the circle of the crankshaft. In other words:
or, that the position of maximum velocity might be the point at which the piston is half-way between top dead center and bottom dead center. In other words:
However, velocity is maximum when acceleration is
which occurs when
Suppose that the engine is rotating at radians/second or approx. RPM.
abs inches/second or approx. mph. Template:RoundBoxBottom
Minimum and maximum acceleration
Acceleration is rate of change of velocity. See also Figures 4a and 4b above.
Minimum acceleration:
Acceleration is zero when slope of curve of velocity is zero. This occurs at maximum velocity or when is approx.
Maximum acceleration:
Acceleration is maximum when slope of curve of velocity is maximum.
Maximum negative acceleration occurs when slope of curve of velocity is maximum negative. This happens at top dead center when
Maximum positive acceleration occurs when slope of curve of velocity is maximum positive. This happens before and after bottom dead center when is approx.
Let the engine continue to rotate at radians/second.
abs inches/second or approx. times the acceleration due to terrestrial gravity.
This maximum value of acceleration is maximum negative when
According to Newtonian physics , force = mass*acceleration, and
, work = force*distance. In this engine energy expended in just accelerating piston to maximum velocity
is proportional to rpm.
Perhaps this helps to explain why a big marine diesel engine rotating at low RPM can achieve efficiency of Template:RoundBoxBottom Template:RoundBoxBottom
Simple laws of motion
Template:RoundBoxTop Let a body move in accordance with the following function of where means time:
where is position at time
has the dimension of length. Therefore, each component of must have the dimension of length.
For to have the dimension of length, must have the dimensions of or velocity.
For to have the dimension of length, must have the dimensions of or acceleration.
If and
The derivatives enable us to assign specific values to
where is velocity at time
If and
a constant equal to the acceleration to which the body is subjected.
For convenience let us say that where is the (constant) acceleration to which the body is subjected.
Then and Template:RoundBoxBottom