Question 243864
f(x) = x^2
g(x) = x^3 + 2x + 4


to get f(g(x)), you start with f(x) = x^2


you replace x with g(x) to get:


f(g(x)) = (g(x))^2


you replace g(x) with x^3 + 2x + 4 to get:


f(g(x)) = (x^3 + 2x + 4)^2


you simplify to get:


f(g(x) = x^6 + 4x^4 + 8x^3 + 4x^2 + 16x + 16


you confirm your answer is good by taking any value of x and substituting i the original equation and the final equation to see if the equations are true.


I did with x = 2 and confirmed the answers were the same so I believe the answer is good.


----------------------


to get g(f(x)):


you start with g(x) = x^3 + 2x + 4


you replace x with f(x) to get:


g(f(x)) = (f(x))^3 + 2*(f(x)) + 4


you replace f(x) with x^2 to get:


g(f(x)) = (x^2)^3 + 2*(x^2) + 4


you simplify to get:


g(f(x)) = x^6 + 2x^2 + 4


You confirm by replacing x with a random value and solving both the original equation and the final equation to see if they are the same.


I did with x = 3 and both equations came out the same so I believe the answer is good.


----------------------


The domains are all real values of x since there is no division of 0 and there are no even roots of negative numbers (square root, fourth root, etc).   Those, if present, would restrict the domain.


Graph of x^2 looks like this:


{{{graph(400,400,-20,20,-20,20,x^2)}}}


Graph of x^3 + 2x + 4 looks like this:


{{{graph(400,400,-20,20,-20,20,x^3+2x+4)}}}


Graph of x^6 + 4x^4 + 8x^3 + 4x^2 + 16x + 16 looks like this:


{{{graph(400,400,-20,20,-100,100,x^6 + 4x^4 + 8x^3 + 4x^2 + 16x + 16)}}}


Graph of x^6 + 2x^2 + 4 looks like this:


{{{graph(400,400,-20,20,-100,100,x^6 + 2x^2 + 4)}}}


In the last 2 graphs, the scale of the y-axis was changed from +/- 20 to +/- 100 because they become very large.