High School Mathematics Extensions/Supplementary/Differentiation

From Wikibooks, open books for an open world
Jump to: navigation, search

Differentiate from first principle(otherwise known as differentialisation)[edit]

All supplementary chapters contain materials that are part of the standard high school mathematics curriculum, therefore the material is only provided for completeness and should mostly serve as revision. This section and the *differentiation technique* section can be skipped if you are already familiar with calculus/differentiation.

In calculus, differentiation is a very important operation applied to functions of real numbers. To differentiate a function f(x), we simply evaluate the limit

\lim_{h \to 0}\frac{f(x + h) - f(x)}{h}

where the \lim_{h \to 0} means that we let h approach 0. However, for now, we can simply think of it as putting h to 0, i.e., letting h = 0 at an appropriate time. There are various notations for the result of differentiation (called the derivative), for example

f'(x) = \lim_{h \to 0}\frac{f(x + h) - f(x)}{h}

and

 \frac{dy}{dx}= \lim_{h \to 0}\frac{f(x + h) - f(x)}{h}

mean the same thing. We say, f'(x) is the derivative of f(x). Differentiation is useful for many purposes, but we shall not discuss why calculus was invented, but rather how we can apply calculus to the study of generating functions.

It should be clear that if g(x) = f(x) then g^\prime(x) = f^\prime(x) the above law is important. If g(x) a closed-form of f(x), then it is valid to differentiate both sides to obtain a new generating function.

Also if h(x) = g(x) + f(x)
then
:<math>h^\prime(x) = g^\prime(x) + f^\prime(x) This can be verified by looking at the properties of limits.

Example 1[edit]

Differentiate from first principle f(x) where

f(x) = x^2

Firstly, we form the difference quotient

f^\prime(x) = \lim_{h\to 0}\frac{(x + h)^2 - x^2}{h}

We can't set h to 0 to evaluate the limit at this point. Can you see why? We need to expand the quadratic first.

 = \lim_{h\to 0}\frac{x^2 + 2xh + h^2 - x^2}{h}
 = \lim_{h\to 0}\frac{2xh + h^2}{h}

We can now factor out the h to obtain now

\lim_{h\to 0}2x + h

from where we can let h go to zero safely to obtain the derivative, 2x. So

f^\prime(x) = 2x

or equivalently:

(x^2)' = 2x

Example 2[edit]

Differentiate from first principles, p(x) = xn.

We start from the difference quotient:

p'(x)= \lim_{h\to 0}\frac{(x + h)^n - x^n}{h}

By the binomial theorem, we have:

=\lim_{h\to 0} \frac{1}{h}(x^n + nx^{n-1}h + ...+ h^n - x^n)

The first xn cancels with the last, to get

=\lim_{h\to 0} \frac{1}{h}(nx^{n-1}h + ...+ h^n)

Now, we bring the constant 1/h inside the brackets

=\lim_{h\to 0}nx^{n-1} +...+ h^{n-1}

and the result falls out:

=nx^{n-1}

Important Result

If


p(x) = x^n

then


p'(x) = nx^{n-1}

As you can see, differentiate from first principle involves working out the derivative of a function through algebraic manipulation, and for that reason this section is algebraically very difficult.

Example 3[edit]

Assume that if

h(x) = f(x) + g(x)

then

h^\prime(x) = f^\prime(x) + g'(x)

Differentiate  x^2 + x^5

Solution Let h(x) = x^2 + x^5

h'(x) = 2x + 5x^4

Example 4[edit]

Show that if

g(x) = Af(x) then
g^\prime(x) = Af^\prime(x)

Solution


\begin{matrix}
g(x) &=& Af(x)\\
\\
g'(x) &=& \lim_{h\to 0}\frac{A}{h}(f(x + h) - f(x))\\
\\
      &=& A\lim_{h\to 0}\frac{1}{h}(f(x + h) - f(x))\\
\\
      &=& Af'(x)
\end{matrix}

Example 5[edit]

Differentiate from first principle


\begin{matrix}
f(x) = \frac{1}{1-x}
\end{matrix}

Solution


\begin{matrix}
f'(x) &=& \lim_{h\to 0}\frac{1}{h}(\frac{1}{1-(x+h)}  - \frac{1}{1-x})\\
\\
      &=& \lim_{h\to 0}\frac{1}{h}(\frac{1 - x - (1 - (x+h))}{(1-(x+h))(1-x)})\\
\\
      &=& \lim_{h\to 0}\frac{1}{h}(\frac{h}{(1-(x+h))(1-x)})\\
\\
      &=& \lim_{h\to 0}\frac{1}{(1-(x+h))(1-x)}\\
\\
      &=& \frac{1}{(1-x)^2}
\end{matrix}

Exercises[edit]

1. Differentiate

f(z) = z^2

2. Differentiate

f(z) = (1 - z)^2

3. Differentiate from first principle

f(z) = \frac{1} {(1 - z)^2}

4. Differentiate

f(z) = (1 - z)^3

5. Prove the result assumed in example 3 above, i.e. if

f(x)=g(x)+h(x)

then

f′(x)=g′(x)+h′(x).

Hint: use limits.

Differentiating f(z) = (1 - z)^n[edit]

We aim to derive a vital result in this section, namely, to derive the derivative of

f(z) = (1 - z)^n

where n ≥ 1 and n an integer. We will show a number of ways to arrive at the result.

Derivation 1[edit]

Let's proceed:

f(z) = (1 - z)^n

expand the right hand side using binomial expansion

f(z) 
= 1 - {n \choose 1}z + {n \choose 2}z^2 + ... + (-1)^nz^n

differentiate both sides

f'(z) 
= - {n \choose 1} + {n \choose 2}2z + ... + (-1)^nnz^{n-1}

now we use {n\choose i} = \frac{n!}{i!(n-i)!}

f'(z) 
= - \frac{n!}{1!(n-1)!} + \frac{n!}{2!(n-2)!}2z + ... + (-1)^nnz^{n-1}

and there are some cancelling

f'(z) 
= - \frac{n!}{1!(n-1)!} + \frac{n!}{1!(n-2)!}z + ... + (-1)^nnz^{n-1}

take out a common factor of -n, and recall that 1! = 0! = 1 we get

f'(z) 
=-n(1 + \frac{n-1!}{1!(n-2)!}z + ... + (-1)^{n-1}z^{n-1})

let j = i - 1, we get

f'(z) 
=-n(1 + \frac{n-1!}{1!(n-2)!}z + ... + (-1)^{n-1}z^{n-1})

but this is just the expansion of (1 - z)n-1

f'(z) = -n(1 - z)^{n-1}

Derivation 2[edit]

Similar to Derivation 1, we use instead the definition of a derivative:

f'(z) = \lim_{h \to 0}\frac{(1 - (z+h))^n - (1-z)^n}{h}

expand using the binomial theorem

f'(z) = \lim_{h \to 0}\frac{\sum_{i=0}^n{n \choose i}(-1)^i(z+h)^i - \sum_{i=0}^n{n \choose i}(-1)^iz^i}{h}

factorise

f'(z) = \lim_{h \to 0}\frac{\sum_{i=0}^n{n \choose i}(-1)^i((z+h)^i - z^i)}{h}

take the limit inside (recall that [Af(x)]' = Af'(x) )

f'(z) = \sum_{i=0}^n{n \choose i}(-1)^i\lim_{h \to 0}\frac{(z+h)^i - z^i}{h}

the inside is just the derivative of zi

f'(z) = \sum_{i=1}^n{n \choose i}(-1)^iiz^{i-1}

exactly as derivation 1, we get

f'(z) = -n(1-z)^{n-1}

Example Differentiate (1 - z)2

Solution 1

f(z) = (1 - z)2 = 1 - 2z + z2
f'(z) = - 2 + 2z
f'(z) = - 2(1 - z)

Solution 2 By the result derived above we have

f'(z) = -2(1 - z)2 - 1 = -2(1 - z)

Exercises[edit]

Imitate the method used above or otherwise, differentiate:

1. (1 - z)3

2. (1 + z)2

3. (1 + z)3

4. (Harder) 1/(1 - z)3 (Hint: Use definition of derivative)

Differentiation technique[edit]

We will teach how to differentiate functions of this form:

f(z) = \frac{1} {g(z)}

i.e. functions whose reciprocals are also functions. We proceed, by the definition of differentiation:

f(z) = \frac{1} {g(z)}



\begin{matrix}
f'(z) &=& \lim_{h\to 0}\frac{1}{h} (\frac{1} {g(z+h)}   - \frac{1} {g(z)})\\
\\
      &=& \lim_{h\to 0}\frac{1}{h} (\frac{g(z) - g(z+h)} {g(z+h)g(z)}) \\
\\
      &=& \lim_{h\to 0}\frac{g(z+h) - g(z)}{h} \frac{-1} {g(z+h)g(z)} \\
\\
      &=& \lim_{h\to 0} g'(z) \frac{-1} {g(z+h)g(z)}\\
\\
      &=& -\frac{g'(z)} {g(z)^2}\\
\end{matrix}

Example 1[edit]


\begin{matrix}
\frac{1}{1-z}  & = & 1 +& z + z^2 + z^3 + ... \\
\\
(\frac{1}{1-z})' & = &    & 1 + 2z  + 3z^2 + ... \\
\end{matrix}

by

 (\frac{1}{g})' = \frac{-g'}{g^2}

where g is a function of z, we get


\begin{matrix}
\frac{1}{(1-z)^2} & = &    & 1 + 2z  + 3z^2 + ... \\
\end{matrix}

which confirmed the result derived using a counting argument.


Exercises[edit]

Differentiate

1. 1/(1-z)2

2. 1/(1-z)3

3. 1/(1+z)3

4. Show that (1/(1 - z)n)' = n/(1-z)n+1

Differentiation applied to generating functions[edit]

Now that we are familiar with differentiation from first principle, we should consider:

f(z) = \frac{1} {1 - x^2}

we know

\frac{1} {1 - x^2} = 1 + x^2 + x^4 + x^6 + ....

differentiate both sides

\begin{pmatrix}\frac{1} {1 - x^2}\end{pmatrix}' = 2x + 4x^3 + 6x^5 + ....


\frac{2x} {(1 - x^2)^2} = 2x(1 + 2x^2 + 3x^4 + ....)

therefore we can conclude that

\frac{1} {(1 - x^2)^2} = 1 + 2x^2 + 3x^4 + ....

Note that we can obtain the above result by the substituion method as well,

\frac{1} {(1 - z)^2} = 1 + 2z + 3z^2 + ....

letting z = x2 gives you the require result.

The above example demonstrated that we need not concern ourselves with difficult differentiations. Rather, to get the results the easy way, we need only to differentiate the basic forms and apply the substitution method. By basic forms we mean generating functions of the form:

\frac{1}{(1-z)^n}

for n ≥ 1.

Let's consider the number of solutions to

a_1 + a_2 + a_3 + ... + a_n = m

for ai ≥ 0 for i = 1, 2, ... n.

We know that for any m, the number of solutions is the coefficient to:

(1 + x + x^2 + ...)^n = \frac{1}{(1 - z)^n}

as discussed before.

We start from:

\frac{1}{1 - z} = 1 + x + x^2 + ... + x^n + ...

differentiate both sides (note that 1 = 1!)

\frac{1!}{(1 - z)^2} = 1 + 2x + 3x^2... + nx^{n-1} + ...

differentiate again

\frac{2!}{(1 - z)^3} = 2 + 2\times 3x... + n(n-1)x^{n-2} + ...

and so on for (n-1) times

\frac{(n-1)!}{(1 - z)^n} = (n - 1)! +  \frac{n!}{1!}x + \frac{(n + 1)!}{2!}x^2 + \frac{(n + 2)!}{3!}x^3 + ...

divide both sides by (n-1)!

\frac{1}{(1 - z)^n} = 1 +  \frac{n!}{(n-1)!1!}x + \frac{(n + 1)!}{(n-1)!2!}x^2 + \frac{(n + 2)!}{(n-1)!3!}x^3 + ...

the above confirms the result derived using a counting argument.