If f(x) = x^2 - x and g(x) = 3x + 1 how do you find f(g(x))?

May 12, 2016

f(g(x))=color(green)(3x^2+3x

Explanation:

The problem with this type of question is often the confusion that results from two different uses of $x$

$\textcolor{w h i t e}{\text{XXX}} f \left(\textcolor{b l u e}{w}\right) = {\textcolor{b l u e}{w}}^{2} - \textcolor{b l u e}{w}$
then there is less difficulty in replacing $\textcolor{b l u e}{w}$ with $\textcolor{red}{g \left(x\right)}$
$\textcolor{w h i t e}{\text{XXX}} f \left(\textcolor{red}{g \left(x\right)}\right) = {\textcolor{red}{g \left(x\right)}}^{2} - \textcolor{red}{g \left(x\right)}$
and then replacing $\textcolor{red}{g \left(x\right)}$ with $\textcolor{b r o w n}{3 x + 1}$
$\textcolor{w h i t e}{\text{XXX}} f \left(g \left(x\right)\right) = {\left(\textcolor{b r o w n}{3 x + 1}\right)}^{2} - \left(\textcolor{b r o w n}{3 x + 1}\right)$
$\textcolor{w h i t e}{\text{XXXXXXX}} = 3 {x}^{2} + 6 x + 1 - 3 x - 1$
$\textcolor{w h i t e}{\text{XXXXXXX}} = 3 {x}^{2} + 3 x$