# How do you find (g@f)(-2+x) given g(x)=2x-2 and f(x)=x^2+3x?

Aug 19, 2016

$2 {x}^{2} - 2 x - 6$

#### Explanation:

The first step is to find an expression for (g ￮ f ), which can also be written as g(f(x)).

To do this substitute x = f(x) into g(x)

$\Rightarrow g \left(f \left(x\right)\right) = g \left(\textcolor{red}{{x}^{2} + 3 x}\right) = 2 \left(\textcolor{red}{{x}^{2} + 3 x}\right) - 2$

$\Rightarrow g \left(f \left(x\right)\right) = 2 {x}^{2} + 6 x - 2$

To evaluate (g ￮ f)(-2 +x) substitute x = - 2 +x into g(f(x))

rArr(g(f(color(magenta)(-2+x)))=2(color(magenta)(-2+x))^2+6(color(magenta)(-2+x))-2

$= 2 \left(4 - 4 x + {x}^{2}\right) - 12 + 6 x - 2$

$= 8 - 8 x + 2 {x}^{2} - 12 + 6 x - 2 = 2 {x}^{2} - 2 x - 6$