2

Given:

$$ f(x) = 3x-1 $$

$$ g(x) = x^3+2 $$

If you evaluate $g(f(1))$ by doing $f(1)$ first and inputting its value into $g(1)$, you get:

$$ f(1) = 3(1) - 1 = 2 $$

$$ g(f(1)) = 2^3+2 = 10 $$

But if you try to substitute $x$ with $f(x)$ in $g(x)$, i.e:

$$ f(x) = 3x-1 $$

$$ g(x) = x^3+2 $$

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

If you evaluate the last expression, you get:

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

i.e

$$ g(f(x)) = 27x^3+1 $$

$g(f(1))$ now gives a different value (28) instead of 10.

Did I make a mistake with the evaluation of the parenthesis or is there a rule here that the parenthesis shouldn't be evaluated in certain circumstances?

Thanks.

Dando18
  • 5,368
  • 1
    Your error is in stating $(3x-1)^3 = 27x^3 - 1$. This is not true. Are you familiar with the binomial formula? – platty Dec 11 '18 at 23:23
  • $(3x-1)^3 \neq 27x^3-1$. Indeed this is obvious if we let $x=1$, then we have $ (3x-1)^3=8 \neq 27-1=26$. – Mason Dec 11 '18 at 23:23

2 Answers2

5

Hint: You made a mistake. It is false to write $a^3-b^3$ for $(a-b)^3$. You have to perform polynomial multiplication to get $a^3-3a^2b+3ab^2-b^3$ instead.

MPW
  • 43,638
1

Well:

$$(3(1)-1)^3+2=2^3+2=10$$

You just havent expanded out $(3x-1)^3$ correctly.

Rhys Hughes
  • 12,842