# Mathematics for Chemistry/Differentiation

## Free web-based material from HEFCE

There is a DVD on differentiation at Math Tutor.

## The basic polynomial

The most basic kind of differentiation is:

${\displaystyle f(x)=x^{n}}$

${\displaystyle f^{'}(x)=nx^{n-1}}$

There are two simple rules:

1. The derivative of a function times a constant is just the same constant times the derivative.
2. The derivative of a sum of functions is just the sum of the two derivatives.

To get higher derivatives such as the second derivative keep applying the same rules.

One of the big uses of differentiation is to find the stationary points of functions, the maxima and minima. If the function is smooth, (unlike a saw-tooth), these are easily located by solving equations where the first derivative is zero.

## The chain rule

${\displaystyle {\frac {dy}{dx}}={\frac {dy}{dw}}.{\frac {dw}{dx}}}$

This is best illustrated by example: find ${\displaystyle {\frac {dy}{dx}}}$  given ${\displaystyle y={(x^{4}+1)}^{9}}$

Let ${\displaystyle y=u^{9}}$  and ${\displaystyle u=x^{4}+1}$ .

Now ${\displaystyle {\frac {dy}{du}}=9u^{8}}$  and ${\displaystyle {\frac {du}{dx}}=4x^{3}}$

So using the chain rule we have ${\displaystyle 9{(x^{4}+1)}^{8}.4x^{3}=36x^{3}{(x^{4}+1)}^{8}}$

## Differentiating a product

${\displaystyle {\frac {d(u.v)}{dx}}=v{\frac {du}{dx}}+u{\frac {dv}{dx}}}$

Notice when differentiating a product one generates two terms. (Terms are mathematical expression connected by a plus or minus.) An important point is that terms which represent physical quantities must have the same units and dimensions or must be pure dimensionless numbers. You cannot add 3 oranges to 2 pears to get 5 orangopears. Integration by parts also generates an extra term each time it is applied.

## Differentiating a quotient

You use this to differentiate ${\displaystyle \tan }$ .

${\displaystyle {\frac {d}{dx}}\left({\frac {u}{v}}\right)={\frac {v{\frac {du}{dx}}-u{\frac {dv}{dx}}}{v^{2}}}}$

### Problems

Differentiate with respect to ${\displaystyle x}$

${\displaystyle 3x^{2}-x(1+x)(1-x)}$

Notice we have ${\displaystyle (a^{2}-b^{2})}$ . ${\displaystyle 4x^{7}-3x^{2}}$

${\displaystyle {(3x+2)}2+e^{x}}$

${\displaystyle 8x^{6}-12{\sqrt {x}}}$

${\displaystyle x{(x+3)}2}$

${\displaystyle x^{2}(3x-(2+x)(2-x))}$

Evaluate the inner brackets first.

Evaluate

${\displaystyle {\frac {\rm {d}}{{\rm {d}}z}}\left(e^{z}-{\frac {z^{9}}{18}}-{\frac {3}{z^{2}}}\right)}$

${\displaystyle {\frac {\rm {d}}{{\rm {d}}c}}\left({\sqrt {c^{5}}}\right)}$

${\displaystyle {\frac {\rm {d}}{{\rm {d}}\omega }}\left({\frac {1}{\omega }}-{\frac {1}{\omega ^{2}}}-{\frac {1}{\omega ^{3}}}\right)}$

${\displaystyle {\frac {\rm {d}}{{\rm {d}}\phi }}\left(e^{\phi }-\left({\frac {1}{\phi ^{2}}}+{\frac {3}{2}}\phi ^{2}\right)\right)}$

${\displaystyle {\frac {\rm {d}}{{\rm {d}}r}}\left(e^{5r}-\left({\frac {a}{r^{3}}}+{\frac {b}{r^{6}}}+{\frac {c}{r^{9}}}\right)\right)}$

a, b and c are constants. Differentiate with respect to ${\displaystyle r}$ .

${\displaystyle 3re^{-3r}}$

${\displaystyle {\frac {\rm {d}}{{\rm {d}}x}}\left(x^{6}e^{x}\right)}$

${\displaystyle 3x^{2}+6x-1}$

${\displaystyle 28x^{6}-6x}$

${\displaystyle e^{x}+18x+12}$

${\displaystyle 48x^{5}-{\frac {6}{\sqrt {x}}}}$

${\displaystyle 3x^{2}+12x+9}$

${\displaystyle 4x^{3}+9x^{2}-8x}$

${\displaystyle e^{z}+{\frac {z^{8}}{2}}+{\frac {6}{z^{3}}}}$

${\displaystyle {\frac {5}{2}}c^{3/2}{\rm {or}}{\frac {5}{2}}{\sqrt {c^{3}}}}$

${\displaystyle -{\frac {1}{\omega ^{2}}}+{\frac {2}{\omega ^{3}}}+{\frac {3}{\omega ^{4}}}}$

${\displaystyle e^{\phi }+{\frac {2}{\phi ^{3}}}-3\phi }$

${\displaystyle 5e^{5r}+{\frac {3a}{r^{4}}}+{\frac {6b}{r^{7}}}+{\frac {9c}{r^{10}}}}$

${\displaystyle e^{-3r}(3-9r)}$

${\displaystyle x^{5}e^{x}(x+6)}$

### Harder differentiation problems

Differentiate with respect to ${\displaystyle x}$ :

${\displaystyle x^{4}{(x+9)}^{5}}$

${\displaystyle 5x^{2}{(x^{2}-7x+9)}^{5}}$

Differentiate with respect to ${\displaystyle r}$

${\displaystyle {(r^{2}+3r-1)}^{3}e^{-4r}}$

Differentiate with respect to ${\displaystyle \omega }$

${\displaystyle {\frac {1}{{\omega }^{4}}}\left({{\omega }^{2}-3\omega -19}\right)}$

${\displaystyle {\frac {e^{\omega }}{{\omega }^{4}}}}$

Evaluate

${\displaystyle {\frac {\rm {d}}{{\rm {d}}z}}\left(e^{-4z}\left({z-1}^{2}\right)\right)}$

${\displaystyle {\frac {\rm {d}}{{\rm {d}}\phi }}\left(\phi ^{2}e^{-2\phi }\left(1-{\frac {1}{{\phi }^{2}}}\right)\right)}$

## Using differentiation to check turning points

${\displaystyle {\frac {dy}{dx}}}$  is the tangent or gradient. At a minimum ${\displaystyle {\frac {dy}{dx}}}$  is zero. This is also true at a maximum or an inflection point. The second gradient gives us the nature of the point. If ${\displaystyle {\frac {d^{2}y}{dx^{2}}}}$  is positive the turning point is a minimum and if it is negative a maximum. Most of the time we are interested in minima except in transition state theory.

If the equation of ${\displaystyle y=x^{3}}$  is plotted, is is possible to see that at ${\displaystyle x=0}$  there is a third kind of point, an inflection point, where both ${\displaystyle {\frac {dy}{dx}}}$  and ${\displaystyle {\frac {d^{2}y}{dx^{2}}}}$  are zero.

${\displaystyle y=f(x){\frac {dy}{dx}}=f^{'}(x){\frac {d^{2}y}{dx^{2}}}=f^{''}(x)}$

Plot ${\displaystyle x^{3}+x^{2}-6x}$  between -4 and +3, in units of 1. (It will speed things up if you factorise it first. Then you will see there are 3 places where ${\displaystyle f(x)=0}$  so you only need calculate 5 points.) By factorising you can see that this equation has 3 roots. Find the 2 turning points. (Differentiate once and find the roots of the quadratic equation using ${\displaystyle x=-b\dots }$ . This gives the position of the 2 turning points either side of zero. As the equation is only in ${\displaystyle x^{3}}$  it has 3 roots and 2 maxima / minima at the most therefore we have solved everything. Differentiate your quadratic again to get ${\displaystyle {\frac {d^{2}y}{dx^{2}}}}$ . Notice that the turning point to the left of zero is a maximum i.e. ${\displaystyle {\frac {d^{2}y}{dx^{2}}}=-ve}$  and the other is a minimum i.e. ${\displaystyle {\frac {d^{2}y}{dx^{2}}}=+ve}$ .

What is the solution and the turning point of ${\displaystyle y=x^{3}}$ .

Solve ${\displaystyle x^{3}-x=0}$ , by factorisation.

(The 3 roots are -3,0 and +2. ${\displaystyle {\frac {{\rm {d}}y}{{\rm {d}}x}}=f^{'}(x)=3x^{2}+2x-6}$

Solutions are ${\displaystyle 1/3({\sqrt {19}}-1)}$  and ${\displaystyle -1/3({\sqrt {19}}+1)}$ , i.e. -1.7863 and 1.1196.

${\displaystyle {\frac {d^{2}y}{dx^{2}}}=f^{''}(x)=6x+2}$

There are 3 coincident solutions at ${\displaystyle x=0}$ , ${\displaystyle {\frac {d^{2}y}{dx^{2}}}=0}$ , at 0 so this is an inflection point.

The roots are 0, 1 and -1.