# Functions

Functions refers to a relation between two sets that associates each element

## How to find the value and inverse of a function

For the function $\mathrm{f\left(x\right)}=\mathrm{4x - 6}$ and $\mathrm{g\left(x\right)}=\frac{\mathrm{6x + 2}}{2x + 3}$, find

(a). f(4)

(b). g(2)

(c). ${f}^{-1}\left(x\right)$

(d). ${g}^{-1}\left(x\right)$

(e). ${f}^{-1}\left(6\right)$

(f). ${g}^{-1}\left(1\right)$

Solutions:

(a)

To find f(4 ) substitute 4 where there is x in f(x) = 4x - 6

$\mathrm{f\left(4\right)}=\mathrm{4\left(4\right) - 6}$

$\mathrm{f\left(4\right)}=\mathrm{16 - 6}$

Answer: $\mathrm{f\left(4\right)}=\mathrm{10}$

(b)

To find g(2) we substitute 2 where there is x in $\mathrm{g\left(x\right)}=\frac{\mathrm{6x + 2}}{2x + 3}$

$\mathrm{g\left(x\right)}=\frac{\mathrm{6x + 2}}{2x + 3}$

$\mathrm{g\left(2\right)}=\frac{\mathrm{6\left(2\right) + 2}}{2\left(2\right) + 3}$

$\mathrm{g\left(2\right)}=\frac{\mathrm{12 + 2}}{4 + 3}$

$\mathrm{g\left(2\right)}=\frac{\mathrm{14}}{7}$

Answer: $\mathrm{g\left(2\right)}=2$

(c)

To find ${f}^{-1}\left(x\right)$ first equate $\mathrm{f\left(x\right)}=\mathrm{4x - 6}$ to y then make x the subject of the formula

$\mathrm{f\left(x\right)}=\mathrm{4x - 6}$

$y=\mathrm{4x - 6}$

$\mathrm{y + 6}=\mathrm{4x}$

$\frac{\mathrm{y + 6}}{4}=\frac{\mathrm{4x}}{4}$

$x=\frac{\mathrm{y + 6}}{4}$

Then where there is x write ${f}^{-1}\left(x\right)$ and where there is y write x

Answer: ${f}^{-1}\left(x\right)=\frac{\mathrm{x + 6}}{4}$

(d)

To find ${g}^{-1}\left(x\right)$ equate g(x) = to y and make x the subject of the formula.

$\mathrm{g\left(x\right)}=\frac{\mathrm{6x + 2}}{2x + 3}$

$y=\frac{\mathrm{6x + 2}}{2x + 3}$

$y\left(2x + 3\right)=\mathrm{6x + 2}$

$\mathrm{6x + 2}=2xy + 3y$

collect terms with x on the same side

$6x -2xy=\mathrm{3y - 2}$

$x\left(6 -2y\right)=\mathrm{3y - 2}$

$\frac{\mathrm{x \left(6 -2y\right)}}{\left(6 -2y\right)}=\frac{\mathrm{3y - 2}}{\left(6 -2y\right)}$

$x=\frac{\mathrm{3y - 2}}{\left(6 -2y\right)}$

Where there is x write ${g}^{-1}\left(x\right)$ where there is y write x

Answer: ${g}^{-1}\left(x\right)=\frac{\mathrm{3x - 2}}{\left(6 -2x\right)}$

(e)

To find ${f}^{-1}\left(x\right)$ substitute 6 fro x in ${f}^{-1}\left(x\right)=\frac{\mathrm{x + 6}}{4}$ where there is x so we have

${f}^{-1}\left(x\right)=\frac{\mathrm{x + 6}}{4}$

${f}^{-1}\left(6\right)=\frac{\mathrm{6 + 6}}{4}$

${f}^{-1}\left(6\right)=\frac{\mathrm{12}}{4}$

Answer: ${f}^{-1}\left(6\right)=3$

(f)

To find ${g}^{-1}\left(1\right)$ just substitute 1 where x is in ${g}^{-1}\left(x\right)=\frac{\mathrm{3x - 2}}{\left(6 -2x\right)}$

${g}^{-1}\left(x\right)=\frac{\mathrm{3x - 2}}{\left(6 -2x\right)}$

${g}^{-1}\left(1\right)=\frac{\mathrm{3\left(1\right) - 2}}{\left(6 -2\left(1\right)\right)}$

${g}^{-1}\left(1\right)=\frac{\mathrm{3 - 2}}{\left(6 -2\right)}$

Answer: ${g}^{-1}\left(1\right)=\frac{1}{4}$

## Example on how to solve a function

A function f is defined by $f\left(x\right)=\mathrm{2x}-5$

Find

(a) ${f}^{-1}\mathrm{\left(x\right)}$

(b) ${\mathrm{ff}}^{-1}\mathrm{\left(2\right)}$

(c) the value of x if $\mathrm{ff\left(x\right)}=x$

Solution:

(a)

## Steps to find the inverse of a function

1. First step change f(x) to y

2. Second step find x the subject of the formula

3. last replace y with x , hence with that done the inverse of the function has been found

$y=\mathrm{2x}-5$

$y+5=\mathrm{2x}$

$\mathrm{2x}=y+5$

$\frac{x}{2}=\frac{\mathrm{y + 5}}{2}$

$x=\frac{\mathrm{y + 5}}{2}$

Answer: ${f}^{-1}\mathrm{\left(x\right)}$ = $\frac{\mathrm{x + 5}}{2}$

(b)

### Point to note

1. To find ${\mathrm{ff}}^{-1}\mathrm{\left(2\right)}$ join the inverse of ${f}^{-1}\mathrm{\left(x\right)}$ with the function f(x). This is done by getting the function of f(x) and replace it in the inverse of ${f}^{-1}\mathrm{\left(x\right)}$ on the variable x

$f\left(x\right)=\mathrm{2x}-5$

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

${\mathrm{ff}}^{-1}\mathrm{\left(2\right)}$ $=\mathrm{2\left(\frac{\mathrm{2 + 5}}{2}\right)}-5$

${\mathrm{ff}}^{-1}\mathrm{\left(2\right)}$ $=\mathrm{2\left(\frac{9}{2}\right)}-5$

${\mathrm{ff}}^{-1}\mathrm{\left(2\right)}$ $=\frac{\mathrm{18}}{2}-5$

${\mathrm{ff}}^{-1}\mathrm{\left(2\right)}$ $=9-5$

Answer: ${\mathrm{ff}}^{-1}\mathrm{\left(2\right)}$ $=4$

(c)

### Point to note:

1. Get function of f(x) and replace the other function f(x) on the variable x

$f\left(x\right)=\mathrm{2x}-5$

$\mathrm{ff\left(x\right)}=$$\mathrm{2\left(2x - 5\right)}-5$

$x=$$\mathrm{2\left(2x - 5\right)}-5$

$x=$$\mathrm{4x - 10}-5$

$x=$$\mathrm{4x - 15}$

$\mathrm{x - 4x}=$$\mathrm{- 15}$

$\mathrm{-3x}=$$\mathrm{- 15}$

$\frac{x}{3}=$$\frac{\mathrm{-15}}{3}$

## Solve composite functions

A composite functions is a joining of function this is achieved by writing one function in another function.

## How to solve a composite function

1. It is solved by replacing one function on the variable of another function

2. To Join the functions e.g: $\mathrm{fg}\mathrm{\left(x\right)}$ and function g(x) we will replace variable x with the function g(x)

3. The order of what function should replace variable x in another function follows the priority of the main function. With this said f(x) is the main function because it is declared first therefore g(x) is the minor(secondary) function and should replace variable x in f(x)

The function f and g are defined as $f\left(x\right) =2x + 1$ and $g\left(x\right) =\frac{\mathrm{3x - 5}}{2}$

(a) ${f}^{-1}\mathrm{\left(x\right)}$

(b) $\mathrm{fg}\mathrm{\left(x\right)}$

(b) $\mathrm{fg}\mathrm{\left(4\right)}$

Solution:

(a)

$f\left(x\right) =2x + 1$

$y =2x + 1$

$y - 1 =2x$

$2x =y - 1$

$\frac{x}{2}=\frac{\mathrm{y - 1}}{2}$

Answer: ${f}^{-1}\mathrm{\left(x\right) =}$ $\frac{\mathrm{x - 1}}{2}$

(b)

$f\left(x\right) =2x + 1$

$\mathrm{fg}\mathrm{\left(x\right)}$ = $2\left(\frac{\mathrm{3x - 5}}{2}\right) + 1$

$\mathrm{fg}\mathrm{\left(x\right)}$ = $\frac{\mathrm{6x - 10}}{2}+ 1$

$\mathrm{fg}\mathrm{\left(x\right)}$ = $\mathrm{3x - 5}+ 1$

Answer: $\mathrm{fg}\mathrm{\left(x\right)}$ = $\mathrm{3x - 4}$

(c)

$\mathrm{fg}\mathrm{\left(x\right)}$ = $\mathrm{3x - 4}$

$\mathrm{fg}\mathrm{\left(x\right)}$ = $\mathrm{3\left(4\right) - 4}$

$\mathrm{fg}\mathrm{\left(x\right)}$ = $\mathrm{12 - 4}$

Answer: $\mathrm{fg}\mathrm{\left(x\right)}$ = $8$