# Math Help - composite functions

1. ## composite functions

i'm confused....

If f(x)=3x+5 and g(x)=x^2+2x-3, determine x such that f(g(x))=g(f(x)).

2. $f(g(x))=3 \cdot g(x)+5=3x^2+6x-9+5=3x^2+6x-4$

$g(f(x))=(3x+5)^2+2(3x+5)-3=9x^2+30x+25+6x+10-3=9x^2+36x+32$

So we require the solutions to $3x^2+6x-4=9x^2+36x+32$

$6x^2+30x+36=0$

$\Rightarrow x^2+5x+6=(x+3)(x+2)=0$

So the values of x we require are $x=-3$ and $x=-2$.

3. $f(x)=3x+5$ and $g(x)=x^2+2x-3$

$f(g(x))=3(x^2+2x-3)+5$
$g(f(x))=(3x+5)^2+2(3x+5)-3$