# Is there a certain formula for derivatives?

Mar 20, 2017

Yes, but not just one formula. There are many.

The derivative (of a differentiable function), $y = f \left(x\right)$, at the point $x = a$ is defined by the following limit

$f ' \left(a\right) = {\lim}_{x \rightarrow a} \frac{f \left(x\right) - f \left(a\right)}{x - a}$

With a slight change of notation we can write:

$\frac{\mathrm{dy}}{\mathrm{dx}} = f ' \left(x\right) = {\lim}_{h \rightarrow 0} \frac{f \left(x + h\right) - f \left(x\right)}{h}$

In some older texts the notation may involve $\delta x$ or $\Delta x$, instead of $h$ giving an identical result:

$f ' \left(x\right) = {\lim}_{\delta x \rightarrow 0} \frac{f \left(x + \delta x\right) - f \left(x\right)}{\delta x} = {\lim}_{\Delta x \rightarrow 0} \frac{f \left(x + \Delta x\right) - f \left(x\right)}{\Delta x}$

It represents both the rate of change of the function, and the gradient of the tangent line at any particular point. If the limit does not exists then the function is not differentiable.

In practice we do not derive the derivative from first principles using the limit definition, but instead we use various rules that can be proved to be true;

Power Rule: $\frac{d}{\mathrm{dx}} \left({x}^{n}\right) = n {x}^{n - 1}$

Example: Find $\frac{\mathrm{dy}}{\mathrm{dx}}$ for $y = 2 {x}^{7}$.

We have $n = 7$, so the derivative is $\frac{\mathrm{dy}}{\mathrm{dx}} = 14 {x}^{7 - 1} = 14 {x}^{6}$

Chain Rule: d/dx(f(g(x)) = f'(g(x)) * g'(x), in other words the derivative of the composition $f \left(g \left(x\right)\right)$ is the inner function times the outer function.

Example: Find $\frac{\mathrm{dy}}{\mathrm{dx}}$ for $y = {\left(x + 2\right)}^{7}$

We let $u = x + 2$ and $y = {u}^{7}$. Then, by the power rule, $\frac{\mathrm{dy}}{\mathrm{du}} = 7 {u}^{6}$ and $\frac{\mathrm{du}}{\mathrm{dx}} = 1$.

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\mathrm{dy}}{\mathrm{du}} \cdot \frac{\mathrm{du}}{\mathrm{dx}}$

$\frac{\mathrm{dy}}{\mathrm{dx}} = 1 \cdot 7 {u}^{6}$

$\frac{\mathrm{dy}}{\mathrm{dx}} = 7 {\left(x + 2\right)}^{6}$

Product Rule: $\frac{d}{\mathrm{dx}} \left(f \left(x\right) \times g \left(x\right)\right) = f ' \left(x\right) g \left(x\right) + f \left(x\right) g ' \left(x\right)$

Example: Find $\frac{\mathrm{dy}}{\mathrm{dx}}$ for $y = \left(x + 2\right) \left({x}^{2} - 1\right)$

We let $f \left(x\right) = x + 2$ and $g \left(x\right) = {x}^{2} - 1$. Then $f ' \left(x\right) = 1$ and $g ' \left(x\right) = 2 x$.

$\frac{\mathrm{dy}}{\mathrm{dx}} = 1 \left({x}^{2} - 1\right) + 2 x \left(x + 2\right)$

$\frac{\mathrm{dy}}{\mathrm{dx}} = {x}^{2} - 1 + 2 {x}^{2} + 4 x$

$\frac{\mathrm{dy}}{\mathrm{dx}} = 3 {x}^{2} + 4 x - 1$

Quotient rule: $\frac{d}{\mathrm{dx}} \left(\frac{f \left(x\right)}{g \left(x\right)}\right) = \frac{g \left(x\right) f ' \left(x\right) - f \left(x\right) g ' \left(x\right)}{g \left(x\right)} ^ 2$

Example: Find $\frac{\mathrm{dy}}{\mathrm{dx}}$ for $y = \frac{x}{x + 1}$

We let $f \left(x\right) = x$ and $g \left(x\right) = x + 1$. Then $f ' \left(x\right) = 1$ and $g ' \left(x\right) = 1$
$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{1 \left(x + 1\right) - 1 \left(x\right)}{x + 1} ^ 2$

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{1}{x + 1} ^ 2$

Here are a few other useful derivative formulas I think you should know.

$\frac{d}{\mathrm{dx}} \left(\ln x\right) = \frac{1}{x}$

$\frac{d}{\mathrm{dx}} \left(\sin x\right) = \cos x$

$\frac{d}{\mathrm{dx}} \left(\cos x\right) = - \sin x$

Once you get good at the basic differentiation rules, you may be asked to solve problems that combine the differentiation rules in interesting ways.

Example: Find $\frac{\mathrm{dy}}{\mathrm{dx}}$ for $y = \ln \left(\sec x\right)$

First of all, note that $\sec x = \frac{1}{\cos} x$. The function becomes

$y = \ln \left(\frac{1}{\cos} x\right)$

There are a few ways of differentiating this.

a) you could use the quotient rule to differentiate $\frac{1}{\cos} x$ and then the chain rule to differentiate $y$.

b) you could rewrite $\frac{1}{\cos} x$ as ${\left(\cos x\right)}^{-} 1$ and then differentiate using the chain rule twice.

c) you could use the laws of logarithms to simplify and then differentiate. I'll use this method.

By the rule $\ln \left(\frac{a}{b}\right) = \ln a - \ln b$, we have:

$y = \ln \left(\frac{1}{\cos} x\right) = \ln 1 - \ln \cos x = 0 - \ln \left(\cos x\right) = - \ln \left(\cos x\right)$

By the chain rule, we have

$\frac{\mathrm{dy}}{\mathrm{dx}} = - \frac{1}{\cos} x \cdot - \sin x = \sin \frac{x}{\cos} x = \tan x$

Hopefully you now get a good idea what differentiation is about!