Calculus/Derivatives

Derivative of a function f at a number a

edit

Notation

edit

We denote the derivative of a function   at a number   as  .

Definition

edit

The derivative of a function   at a number   a is given by the following limit (if it exists):

 


An analagous equation can be defined by letting  . Then  , which shows that when   approaches  ,   approaches  :

 


Interpretations

edit

As the slope of a tangent line

edit

Given a function  , the derivative   can be understood as the slope of the tangent line to   at  :

Example
edit

Find the equation of the tangent line to   at  .

Solution
edit

To find the slope of the tangent, we let   and use our first definition:

 


It can be seen that as   approaches  , we are left with  . If we plug in   for  :

 


So our preliminary equation for the tangent line is  . By plugging in our tangent point   to find  , we can arrive at our final equation:

 


So our final equation is  .

As a rate of change

edit

The derivative of a function   at a number   can be understood as the instantaneous rate of change of   when  .

The derivative as a function

edit

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

edit

Likewise to the derivative of   at  , the derivative of the function   is denoted  .

Definition

edit

The derivative of the function   is defined by the following limit:

 

Also,

 

or

 

d(x^n)/dx

edit

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

edit

 

 

   

   

 

Without Using Calculus

edit

Derivative of cubic function

edit
 
Graph of cubic function illustrating use of associated quadratic.
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  

Derivative of quartic function

edit

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:

  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)

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  

Product Rule

edit

Let    where  

      

    

   

   

Examples

edit

Let   Calculate  

 

Differentiate both sides.

 

         

This shows that   as above is valid when   is a positive fraction.

Let  . Calculate  .

 

Differentiate both sides.

 

 

This shows that   as above is valid for negative  .

Let  . Calculate  .

 

Differentiate both sides.

 

       

This shows that   as above is valid when   is a negative fraction.

Quotient rule

edit

Used where  

 

 

 

 

 

Derivatives of trigonometric functions

edit

sine(x)

edit

 

 

 

   

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

edit
 
Figure 1:  

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  

 


       

       

cosine(x)

edit

 

  

Differentiate both sides:

  

 

tan(x)

edit

 

 

Differentiate both sides:

  

  

 

Derivatives of inverse trigonometric functions

edit

arcsine(x)

edit
 
Figure 2: Graph of   and associated curves.

 

 

 

 


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  

arccosine(x)

edit
 
Figure 3: Graph of   and associated curves.

 

 

 

 

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  

arctan(x)

edit
 
Figure 4: Graph of   and associated curves.

 

 

 

 

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  

Derivatives of logarithmic functions

edit

a^x or  

edit

 

 

 

 

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: Graphs of   for a =   .

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.

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)
>>>

When  

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    

ln(x)

edit

 

 

 

 

Examples

edit

 

 

 

 

  Calculate  

 

 

 

     

Careful manipulation of logarithms converts exponents into simple constants.

Chain rule

edit

Used where  

Examples

edit

 

Let   where  .

 

 

Let   where  .

 

Applications of the Derivative

edit

Shape of curves

edit

The first derivative of   or   As shown above,   at any point   gives the slope of   at point  

  is the slope of   when  

 
Figure 1: Diagram illustrating relationship between  and  
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.

 
Figure 1: Diagram illustrating relationship between   and  
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.

Maxima and Minima

edit

Electric water heater

edit
 
Figure 1(a): Graph of   and   for  
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.

Square and triangle

edit
 
Figure 1(b): Graph of parabola   with   axis compressed.

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

edit
 
Figure 1(c): Plan of county road between Town A and Town B to be constructed so that cost is minimum.

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      

 
Figure 1(d): Graphs showing cost of county road   and  
Curve showing   is actually  .
Cost is minimum where  

Cost   in units of $100k.

For minimum cost  

 

 

 

 

Cardboard box

edit
 
Figure 1(e): Sheet of cardboard to be cut and folded to make box of maximum possible volume.
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?

 
Figure 1(f): Curves associated with design of cardboard box.
  and   is maximum when  

 

 

 

For maximum volume  

 

  inches.

Solving ellipse at origin

edit
 
Figure 1: Graph of ellipse showing semi-chord through center.
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 =  

Let   and  

Then   and  

Substitute these values in  

 

Calculate  

 

 

 

 

 

 

For maximum or minimum  

 

 

 

Square both sides, substitute   for   and result is:

  where:

 

 

 

 

An example
edit

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:  

# 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)

(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)))

Minimum value of   Length of minor axis  

Maximum value of   Length of major axis  

edit

Rates of Change

edit

The car jack

edit
 
Figure 2: Photo of car jack illustrating horizontal   and vertical   rates of change.

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   inches minute.

Vertical motion
edit
 
Figure 3: Curves and values associated with car jack.
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   inches minute.

When   inches minute.

When   and   inches minute.

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.

Change of area
edit
 
Figure 4: Graph of   and