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

$f(x)=x^{n}$ $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

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

Now ${\frac {dy}{du}}=9u^{8}$ and ${\frac {du}{dx}}=4x^{3}$ So using the chain rule we have $9{(x^{4}+1)}^{8}.4x^{3}=36x^{3}{(x^{4}+1)}^{8}$ ## Differentiating a product

${\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 $\tan$ .

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

Differentiate with respect to $x$ $3x^{2}-x(1+x)(1-x)$ Notice we have $(a^{2}-b^{2})$ . $4x^{7}-3x^{2}$ ${(3x+2)}2+e^{x}$ $8x^{6}-12{\sqrt {x}}$ $x{(x+3)}2$ $x^{2}(3x-(2+x)(2-x))$ Evaluate the inner brackets first.

Evaluate

${\frac {\rm {d}}{{\rm {d}}z}}\left(e^{z}-{\frac {z^{9}}{18}}-{\frac {3}{z^{2}}}\right)$ ${\frac {\rm {d}}{{\rm {d}}c}}\left({\sqrt {c^{5}}}\right)$ ${\frac {\rm {d}}{{\rm {d}}\omega }}\left({\frac {1}{\omega }}-{\frac {1}{\omega ^{2}}}-{\frac {1}{\omega ^{3}}}\right)$ ${\frac {\rm {d}}{{\rm {d}}\phi }}\left(e^{\phi }-\left({\frac {1}{\phi ^{2}}}+{\frac {3}{2}}\phi ^{2}\right)\right)$ ${\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 $r$ .

$3re^{-3r}$ ${\frac {\rm {d}}{{\rm {d}}x}}\left(x^{6}e^{x}\right)$ $3x^{2}+6x-1$ $28x^{6}-6x$ $e^{x}+18x+12$ $48x^{5}-{\frac {6}{\sqrt {x}}}$ $3x^{2}+12x+9$ $4x^{3}+9x^{2}-8x$ $e^{z}+{\frac {z^{8}}{2}}+{\frac {6}{z^{3}}}$ ${\frac {5}{2}}c^{3/2}{\rm {or}}{\frac {5}{2}}{\sqrt {c^{3}}}$ $-{\frac {1}{\omega ^{2}}}+{\frac {2}{\omega ^{3}}}+{\frac {3}{\omega ^{4}}}$ $e^{\phi }+{\frac {2}{\phi ^{3}}}-3\phi$ $5e^{5r}+{\frac {3a}{r^{4}}}+{\frac {6b}{r^{7}}}+{\frac {9c}{r^{10}}}$ $e^{-3r}(3-9r)$ $x^{5}e^{x}(x+6)$ ### Harder differentiation problems

Differentiate with respect to $x$ :

$x^{4}{(x+9)}^{5}$ $5x^{2}{(x^{2}-7x+9)}^{5}$ Differentiate with respect to $r$ ${(r^{2}+3r-1)}^{3}e^{-4r}$ Differentiate with respect to $\omega$ ${\frac {1}{{\omega }^{4}}}\left({{\omega }^{2}-3\omega -19}\right)$ ${\frac {e^{\omega }}{{\omega }^{4}}}$ Evaluate

${\frac {\rm {d}}{{\rm {d}}z}}\left(e^{-4z}\left({z-1}^{2}\right)\right)$ ${\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

${\frac {dy}{dx}}$ is the tangent or gradient. At a minimum ${\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 ${\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 $y=x^{3}$ is plotted, is is possible to see that at $x=0$ there is a third kind of point, an inflection point, where both ${\frac {dy}{dx}}$ and ${\frac {d^{2}y}{dx^{2}}}$ are zero.

$y=f(x){\frac {dy}{dx}}=f^{'}(x){\frac {d^{2}y}{dx^{2}}}=f^{''}(x)$ Plot $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 $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 $x=-b\dots$ . This gives the position of the 2 turning points either side of zero. As the equation is only in $x^{3}$ it has 3 roots and 2 maxima / minima at the most therefore we have solved everything. Differentiate your quadratic again to get ${\frac {d^{2}y}{dx^{2}}}$ . Notice that the turning point to the left of zero is a maximum i.e. ${\frac {d^{2}y}{dx^{2}}}=-ve$ and the other is a minimum i.e. ${\frac {d^{2}y}{dx^{2}}}=+ve$ .

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

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

(The 3 roots are -3,0 and +2. ${\frac {{\rm {d}}y}{{\rm {d}}x}}=f^{'}(x)=3x^{2}+2x-6$ Solutions are $1/3({\sqrt {19}}-1)$ and $-1/3({\sqrt {19}}+1)$ , i.e. -1.7863 and 1.1196.

${\frac {d^{2}y}{dx^{2}}}=f^{''}(x)=6x+2$ There are 3 coincident solutions at $x=0$ , ${\frac {d^{2}y}{dx^{2}}}=0$ , at 0 so this is an inflection point.

The roots are 0, 1 and -1.