
Nathan N. answered 03/27/20
Kind & Experienced Senior Software Engineer | Python, Java, & Web Dev
Hi Misha,
To evaluate functional compositions, we need to evaluate functions from the inside first, and move outside. Since the innermost function is f(2), we evaluate that first:
We know that f( x ) = -3x + 4, so all we need to do is substitute 2 for x, which gives us the following:
f ( 2 ) = -3 (2) + 4
Which, after multiplication and addition, gives us
f ( 2 ) = -2
Now, knowing the value of f ( 2 ), we can substitute again -- this time, we replace f ( 2 ) with -2 in our composed function. So, g ( f ( 2 ) ) becomes g ( - 2 ).
Now, as before, we simply plug into our equation -- this time, it is g( x ), which gives us:
g ( -2 ) = -2 + 7
g ( -2 ) = 5
So, we have shown that g ( f ( 2 ) ) = 5.
Hope this helps!
Best,
Nate