# A-level Mathematics/CIE/Pure Mathematics 2/Differentiation
## Differentiating Logarithmic and Exponential functions

The function $y=e^{x}$ is its own derivative: ${\dfrac {d}{dx}}e^{x}=e^{x}$. The constant $e$ is defined such that this is true.
An exponential function with a different base can be converted into a function of the form $e^{kx}$ using logarithms, e.g. $2^{x}=e^{\ln 2x}$. The derivative of such an expression can be found using the chain rule: ${\dfrac {d}{dx}}2^{x}={\dfrac {d}{dx}}e^{\ln 2x}=\ln 2\ e^{\ln 2x}=2^{x}\ln 2$.
${\dfrac {d}{dx}}e^{f(x)}=f'(x)e^{f(x)}$
The derivative of a logarithm is ${\dfrac {d}{dx}}\ln x={\frac {1}{x}}$. Applying the chain rule to this produces the result:
${\dfrac {d}{dx}}\ln(f(x))={\frac {f'(x)}{f(x)}}$
It is important to know how these rules interact with other expressions.
e.g. ${\dfrac {d}{dx}}e^{x^{2}+\ln {\tfrac {1}{x}}}=e^{x^{2}+\ln {\tfrac {1}{x}}}({\dfrac {d}{dx}}x^{2}+\ln {\tfrac {1}{x}})=e^{x^{2}+\ln {\tfrac {1}{x}}}(2x+{\frac {-x^{-2}}{1/x}})=e^{x^{2}+\ln {\tfrac {1}{x}}}(2x-x^{-1})$

## Differentiating Trigonometric Functions

The proof of these derivatives is beyond the scope of the syllabus, but we can find them using the addition formulae.
The trigonometric functions have the following derivatives:
* ${\dfrac {d}{dx}}\sin x=\cos x$
* ${\dfrac {d}{dx}}\cos x=-\sin x$
* ${\dfrac {d}{dx}}\tan x=\sec ^{2}x$
* ${\dfrac {d}{dx}}\tan ^{-1}x={\frac {1}{1+x^{2}}}$

## The Product Rule

Consider a rectangle where one side is of length $f(x)$ and the other side is of length $g(x)$. The area of the rectangle is equivalent to the value of the product. As x increases by a small amount $\delta x$, the area changes. The new area is $f(x+\delta x)g(x+\delta x)$. Thus, the change in area is $f(x+\delta x)g(x+\delta x)-f(x)g(x)$
which is equivalent to $(f(x)+\delta f)(g(x)+\delta g)-f(x)g(x)$
where $\delta f$ is the difference $f(x+\delta x)-f(x)$
and $\delta g$ is the difference $g(x+\delta x)-g(x)$.
${\begin{aligned}&(f(x)+\delta f)(g(x)+\delta g)-f(x)g(x)\\=&f(x)g(x)+f(x)\delta g+g(x)\delta f+\delta f\delta g-f(x)g(x)\\=&f(x)\delta g+g(x)\delta f+\delta f\delta g\end{aligned}}$
As $\delta x$ approaches zero, the term $\delta f\delta g$ becomes negligible. Thus, the change in area is $f(x)\delta g+g(x)\delta f$ and because the derivative of the product is the change in area over a change in $x$, ${\dfrac {d}{dx}}f(x)g(x)=f(x){\dfrac {dg}{dx}}+g(x){\dfrac {df}{dx}}$
The product rule states that:
${\dfrac {d}{dx}}f(x)g(x)=f(x)g'(x)+g(x)f'(x)$
e.g. ${\dfrac {d}{dx}}xe^{x}=x{\dfrac {d}{dx}}e^{x}+e^{x}{\dfrac {d}{dx}}x=xe^{x}+e^{x}=e^{x}(x+1)$

### The Quotient Rule

The quotient rule is a special case of the product rule when one of the terms in the product is a reciprocal.
e.g. Evaluate ${\dfrac {d}{dx}}{\frac {2x+3}{x+4}}$
${\begin{aligned}{\dfrac {d}{dx}}{\frac {2x+3}{x+4}}&={\dfrac {d}{dx}}(2x+3){\frac {1}{x+4}}\\&=(2x+3){\dfrac {d}{dx}}\left({\frac {1}{x+4}}\right)+{\frac {1}{x+4}}{\dfrac {d}{dx}}(2x+3)\\&=-(2x+3)(x+4)^{-2}+{\frac {1}{x+4}}(2)\\&={\frac {-(2x+3)}{(x+4)^{2}}}+{\frac {2}{x+4}}\\&={\frac {-(2x+3)}{(x+4)^{2}}}+{\frac {2x+8}{(x+4)^{2}}}\\&={\frac {2x+8-2x-3}{(x+4)^{2}}}\\&={\frac {5}{(x+4)^{2}}}\end{aligned}}$
In general:
${\begin{aligned}{\dfrac {d}{dx}}{\frac {u}{v}}&=u{\dfrac {d}{dx}}{\frac {1}{v}}+{\frac {1}{v}}{\dfrac {du}{dx}}\\&=u(-v)^{-2}{\dfrac {dv}{dx}}+{\frac {v}{v^{2}}}{\dfrac {du}{dx}}\\&={\frac {-u{\tfrac {dv}{dx}}+v{\tfrac {du}{dx}}}{v^{2}}}\\&={\frac {v{\tfrac {du}{dx}}-u{\tfrac {dv}{dx}}}{v^{2}}}\end{aligned}}$

## Implicit Differentiation

Implicit differentiation is where we differentiate a function which is not defined explicitly, with y as the subject. To do this, it is sensible to use the chain rule.
e.g. Find an expression for ${\dfrac {dy}{dx}}$ when $x^{2}+y^{2}=1$.
${\begin{aligned}x^{2}+y^{2}&=1\\{\dfrac {d}{dx}}x^{2}+y^{2}&={\dfrac {d}{dx}}1\\2x+{\dfrac {dy^{2}}{dx}}&=0\\2x+{\dfrac {dy^{2}}{dy}}{\dfrac {dy}{dx}}&=0\quad {\text{Use the chain rule}}\\2x+2y{\dfrac {dy}{dx}}&=0\\2y{\dfrac {dy}{dx}}&=-2x\\{\dfrac {dy}{dx}}&=-{\frac {2x}{2y}}=-{\frac {x}{y}}\end{aligned}}$
Sometimes, we need to use the product rule too.
e.g. Find an expression for ${\dfrac {dy}{dx}}$ when $x^{2}+6xy+y^{2}=1$.
${\begin{aligned}x^{2}+6xy+y^{2}&=1\\{\dfrac {d}{dx}}x^{2}+6xy+y^{2}&={\dfrac {d}{dx}}1\\2x+{\dfrac {d}{dx}}6xy+{\dfrac {d}{dx}}y^{2}&=0\\2x+6x{\dfrac {dy}{dx}}+y{\dfrac {d}{dx}}6x+{\dfrac {dy^{2}}{dy}}{\dfrac {dy}{dx}}&=0\\2x+6x{\dfrac {dy}{dx}}+6y+2y{\dfrac {dy}{dx}}&=0\\2x+6y+(6x+2y){\dfrac {dy}{dx}}&=0\\(6x+2y){\dfrac {dy}{dx}}&=-2x-6y\\{\dfrac {dy}{dx}}&={\frac {-2x-6y}{6x+2y}}\\{\dfrac {dy}{dx}}&={\frac {-x-3y}{3x+y}}\end{aligned}}$

## Parametric Differentiation

A parametric function is where instead of $y$ being defined by $x$, $y$ and $x$ are both linked to a third parameter, $t$. e.g. $x=3t,y=t^{2}$
To find ${\dfrac {dy}{dx}}$ when $y$ and $x$ are defined parametrically, we need to use the chain rule:
${\dfrac {dy}{dx}}={\dfrac {dy}{dt}}\times {\dfrac {dt}{dx}}={\dfrac {dy}{dt}}\div {\dfrac {dx}{dt}}$
So for the example $x=3t,y=t^{2}$, ${\dfrac {dx}{dt}}=3$ and ${\dfrac {dy}{dt}}=2t$, thus ${\dfrac {dy}{dx}}={\dfrac {dy}{dt}}\div {\dfrac {dx}{dt}}=2t\div 3={\frac {2t}{3}}$
← Trigonometry · Integration →