# A-level Mathematics/AQA/MPC3
## Functions
### Mappings and functions

We think of a function as an operation that takes one number and transforms it into another number. A mapping is a more general type of function. It is simply a way to relate a number in one set, to a number in another set. Let us look at three different types of mappings:
* one-to-one - this mapping gives one unique output for each input.
* many-to-one - this type of mapping will produce the same output for more than one value of $x$.
* one-to-many - this mapping produces more than one output for each input.
Only the first two of these mappings are functions. An example of a mapping which is not a function is $f(x)=\pm {\sqrt {x}}$

### Domain and range of a function

In general:
* $f(x)$ is called the image of $x$.
* The set of permitted $x$ values is called the domain of the function
* The set of all images is called the range of the function

### Modulus function

The modulus of $x$, written $|x|$, is defined as
    $|x|={\begin{cases}x&{\mbox{for }}x\geq 0\\-x&{\mbox{for }}x<0\end{cases}}$

## Differentiation
### Chain rule

The chain rule states that:
If $y$ is a function of $u$, and $u$ is a function of $x$,
    ${\frac {dy}{dx}}={\frac {dy}{du}}{\frac {du}{dx}}$
As you can see from above, the first step is to notice that we have a function that we can break down into two, each of which we know how to differentiate. Also, the function is of the form $f(g(x))$. The process is then to assign a variable to the inner function, usually $u$, and use the rule above;
Differentiate $y=2(x-1)^{3}$
We can see that this is of the correct form, and we know how to differentiate each bit.
Let $u=x-1$
Now we can rewrite the original function, $y=2u^{3}$
We can now differentiate each part;
${\frac {dy}{du}}=6u^{2}$ and ${\frac {du}{dx}}=1$
Now applying the rule above; ${\frac {dy}{dx}}={\frac {dy}{du}}*{\frac {du}{dx}}=6u^{2}*1=6u^{2}=6(x-1)^{2}$

### Product rule

The product rule states that:
If $y=uv$, where $u$ and $v$ are both functions of $x$, then
    ${\frac {d}{dx}}(uv)=u{\frac {dv}{dx}}+v{\frac {du}{dx}}$
An alternative way of writing the product rule is:
    $(uv)'=uv'+u'v\,\!$
Or in Lagrange notation:
If $k(x)=f(x)g(x)$,
then $k'(x)=f'(x)g(x)+f(x)g'(x)$

### Quotient rule

The quotient rule states that:
If $y={\frac {u}{v}}$, where $u$ and $v$ are functions of $x$, then
    ${\frac {d}{dx}}\left({\frac {u}{v}}\right)={\frac {v{\frac {du}{dx}}-u{\frac {dv}{dx}}}{v^{2}}}$
An alternative way of writing the quotient rule is:
    $\left({\frac {u}{v}}\right)'={\frac {u'v-uv'}{v^{2}}}$

### x as a function of y

In general,
    ${\frac {dy}{dx}}={\frac {1}{\frac {dx}{dy}}}$

## Trigonometric functions
### The functions cosec θ, sec θ and cot θ

$\operatorname {cosec} {\theta }={\frac {1}{\sin {\theta }}}$
$\sec {\theta }={\frac {1}{\cos {\theta }}}$
$\cot {\theta }={\frac {1}{\tan {\theta }}}$

### Standard trigonometric identities

$\cot {\theta }={\frac {\cos {\theta }}{\sin {\theta }}}$
$\sec ^{2}{\theta }=1+\tan ^{2}{\theta }\,\!$
$\operatorname {cosec} ^{2}{\theta }=1+\cot ^{2}{\theta }$

### Differentiation of sin x, cos x and tan x

${\frac {d}{dx}}\left(\sin {x}\right)=\cos {x}$
${\frac {d}{dx}}\left(\cos {x}\right)=-\sin {x}$
${\frac {d}{dx}}\left(\tan {x}\right)=\sec ^{2}{x}$

### Integration of sin(kx) and cos(kx)

In general,
$\int \cos {kx}\ dx={\frac {1}{k}}\sin {kx}+c$
$\int \sin {kx}\ dx=-{\frac {1}{k}}\cos {kx}+c$

## Exponentials and logarithms
### Differentiating exponentials and logarithms

In general,
${\mbox{when}}\ y=e^{kx},\ {\frac {dy}{dx}}=ke^{kx}$
$\int e^{kx}\ dx={\frac {1}{k}}e^{kx}+c$

### Natural logarithms

If $y=\ln {x}$, then
    ${\frac {dy}{dx}}={\frac {1}{x}}$
It follows from this result that
    $\int {\frac {1}{x}}\ dx=\ln {x}+c$
$\int {\frac {f'(x)}{f(x)}}\ dx=\ln {f(x)}+c,\ {\mbox{provided}}\ f(x)>0$

## Integration
### Integration by parts

$\int u{\frac {dv}{dx}}\ dx=uv-\int v{\frac {du}{dx}}\ dx$

### Standard integrals

$\int {\frac {dx}{a^{2}+x^{2}}}={\frac {1}{a}}\tan ^{-1}{\left({\frac {x}{a}}\right)}+c$
$\int {\frac {dx}{\sqrt {(a^{2}-x^{2})}}}=\sin ^{-1}{\left({\frac {x}{a}}\right)}+c$

### Volumes of revolution

The volume of the solid formed when the area under the curve $y=f(x)$, between $x=a$ and $x=b$, is rotated through 360° about the $x$-axis is given by:
    $V=\pi \int _{a}^{b}y^{2}\ dx$
The volume of the solid formed when the area under the curve $y=f(x)$, between $y=a$ and $y=b$, is rotated through 360° about the $y$-axis is given by:
    $V=\pi \int _{a}^{b}x^{2}\ dy$

## Numerical methods
### Iterative methods

An iterative method is a process that is repeated to produce a sequence of approximations to the required solution.

### Numerical integration

Mid ordinate rule
    $\int _{a}^{b}y\ dx\approx h\lbrack y_{\frac {1}{2}}+y_{\frac {3}{2}}+\ldots +y_{n-{\frac {3}{2}}}+y_{n-{\frac {1}{2}}}\rbrack$
    ${\mbox{where}}\ h={\frac {b-a}{n}}$
Simpson's rule
    $\int _{a}^{b}y\ dx\approx {\frac {h}{3}}\lbrack \left(y_{0}+y_{n}\right)+4\left(y_{1}+y_{3}\ldots +y_{n-1}\right)+2\left(y_{2}+y_{4}+\ldots +y_{n-2}\right)\rbrack$
    ${\mbox{where}}\ h={\frac {b-a}{n}}\ {\mbox{and}}\ n\ {\mbox{is even}}$