double functions
`f g (x)` = Composite function (`x`)
Always work right hand side to left. This means you take the entire machine `g (x)` and plug it into machine `f (x)` everywhere where there is an input `x`.
1 a. `g (x) = x + 4`
Then this machine "`g`" takes the input `x` and adds 4.
1 b. `f (x) = 2x^2``-3x - 5`
This machine `f` takes the input `x` and squares it, multiplies by 2, it then multiplies the input `x` by 3 and takes it away, it then takes away 5.
1 c. `f g (x)`
From the right hand side take `g (x)` and plug it into `f (x)` everywhere there is an input `x`.
| `f g (x)` | = | `2 (x +4)^2` | — | `3 (x+4)` | — | `5` |
| = | `2 (x +4) (x+4)` | — | `3x -12` | — | `5` | |
| = | `2 (x^2+ 8x +16)` | — | `3x - 17` | |||
| = | `2x^2 + 16x + 32` | — | `3x - 17` | |||
| = | `2x^2 + 13x + 15` |
2 a. `g (x) = (x - 1)^2` and `h (x) = 1 — 2 x`
Work out `gh (5)`
To do this start from the right hand side.
2 b. `h (x) = 1 - 2 x`
`h (5)` means this machine "`h`", takes the input 5 multiplies it by 2 and takes it away from 1.
`h (5) = 1 - 2 (5) = 1 - 10 = -9`
2 c. `gh (5)`
This means this machine "`g`" uses the input `h (5)` which we know is -9.
`g (- 9) = (x - 1)^2`
`g (- 9) = (-9 - 1)^2`
`g (- 9) = (-10)^2 = 100`
Answer: `g h (5) = 100`
3. `f (x) = x^2` and `g (x) = x + 1`
Find `f g (x)`
From the right hand side take `g (x)` and plug it into `f (x)` everywhere where there is an input `x`.
Answer `f g (x) = (x + 1)^2`