g(x) = 5x2+7 and f(x)= x2+1.
Before solving for g(f(x)) and f(g(x)), lets understand what these are. So, these are called composite functions in which you can input one function into another function. So, we know we have two functions named f(x) and g(x). When we say g(f(x)), you notice that f(x) replace the x part inside of the g(x). Since the f(x) replace the x, it means we also replace the x of the g(x) function with whatever f(x) is. We know f(x) is x2+1 which replaces the x inside of g(x) so it becomes:
g(f(x)) = 5(x2+1)2 + 7 Notice we just replaced the x of g(x) with what f(x) is. And now we can just simplify it.
= 5(x2+1)(x2+1) + 7
= 5(x4 + x2 + x2 + 1) + 7
= 5(x4 + 2x2 + 1) + 7
= 5x4 + 10x2 + 5 + 7
g(f(x)) = 5x4 + 10x2 + 12
In the same way, we can solve for f(g(x)) but now we replace the x of f(x) with g(x) this time.
f(g(x)) = (5x2 + 7)2 + 1 Now, simplify it
= (5x2 + 7)(5x2 + 7) + 1
= (25x4 + 35x2 + 35x2 + 49) + 1
= 25x4 + 70x2 + 49 + 1
f(g(x)) = 25x4 + 70x2 + 50
Now, to solve for the value of both equations if x = 2, we can just plug in 2 for x into both of our equations.
The first equation that we solved for:
g(f(x)) = 5x4 + 10x2 + 12 We plug in 2 into x
g(f(2)) = 5(2)4 + 10(2)2 + 12
= 5(16) + 10(4) + 12
= 80 + 40 + 12
g(f(2)) = 132
The second equation that we solved for:
f(g(x)) = 25x4 + 70x2 + 50 We plug in 2 into x
f(g(x)) = 25(2)4 + 70(2)2 + 50
= 25(16) + 70(4) + 50
= 400 + 280 + 50
f(g(2)) = 730