$f(g(x))$计算示例

Before this, know什么是复合/变换?乘法函数和除法函数

Interactive · 1 question

You can use your substitution abilities to simplify a composition of functions! When we're simplifying f(g(x)),f(g(x)), we substitute our g(x)g(x) function into our f(x)f(x) function. In other words, everywhere we see an xx in our f(x)f(x) function, we plug in our g(x)g(x) function!

One important thing to note is that there are different notations that represent f(g(x)),f(g(x)), including the following: f(g(x))=(f∘g)(x)f(g(x))=(f\circ g)(x) So, if you're asked to find (f∘g)(x),(f\circ g)(x), remember that the question is asking you to find f(g(x)).f(g(x)). THEY MEAN THE SAME THING.

Let's say you're given two functions, f(x)=x2f(x)=x^2 and g(x)=x+a,g(x)=x+a, and you're asked to evaluate f(g(x)).f(g(x)). This means that you're going to substitute the inner function, g(x),g(x), for xx in the outer function, f(x).f(x). Here's how it works: f(g(x))=f(x+a), since g(x)=x+a=(x+a)2, since we replace the x′s in f(x) with g(x)=x+a=(x+a)(x+a)=x2+2ax+a2\begin{align} f(g(x)) &= f(x+a), \text{ since $g(x)=x+a$}\\ &=(x+a)^2, \text{ since we replace the $x's$ in $f(x)$ with $g(x)=x+a$}\\ &=(x+a)(x+a)\\ &=x^2+2ax+a^2 \end{align}

So, f(g(x))=x2+2ax+a2.f(g(x))=x^2+2ax+a^2. Let's think about whether this is the same as g(f(x))g(f(x)). Does the order in which you write the function composition matter? Let's see: g(f(x))=g(x2), since f(x)=x2=(x2)+a, since we are replacing the x′s in g(x) with f(x)=x2=x2+a\begin{align} g(f(x)) &= g(x^2), \text{ since $f(x)=x^2$}\\ &=(x^2)+a, \text{ since we are replacing the $x's$ in $g(x)$ with $f(x)=x^2$}\\ &=x^2+a\\ \end{align}

Since f(g(x))=x2+2ax+a2f(g(x))=x^2+2ax+a^2 and g(f(x))=x2+a,g(f(x))=x^2+a, we can see that f(g(x))f(g(x)) does not always equal g(f(x)).g(f(x)). So be careful −- order matters!

If you're asked to find f(g(x)),f(g(x)), plug g(x)g(x) into your f(x)f(x) function. On the other hand, if you're asked to find g(f(x)),g(f(x)), plug f(x)f(x) into your g(x)g(x) function. Think about it this way: always plug the inner function into the outer function.

Let's do another example.

Let f(x)=5x2+2x+8f(x)=5x^2+2x+8 and g(x)=2x.g(x)=2x. Find f(g(x))f(g(x)) and g(f(x)).g(f(x)).

Choose one answer

Video

(Video) Composition of Functions

by PatrickJMT

Here's a video by PatrickJMT showing you what a composition of a function is.

Here is a pair of practice questiosn to accompany the video. You should try them after watching the video.

If f(x)=x2f(x) = x^2 and g(x)=x−3,g(x) = x - 3, what is f(g(x))?f(g(x))?

Choose one answer

Read · 4 min

The concept of a composite function is that it helps answer the question, "what happens when you plug a function into a function?" Well, the answer is that you get a different function, and you can even give it its own name if you so choose. Basically, we evaluate the inside function, and then we evaluate the outside function.

If f(x)f(x) is a function, we can take the value we get and plug it back into a different function, treating it like a different input. If that new function is called g,g, then we call this operation g(f(x)).g(f(x)). Before moving on, caution that this is different from f(g(x)),f(g(x)), which involves finding g(x)g(x) and plugging THAT value into f,f, so the application of the two starting functions ff and gg is done in the reverse order.

Finally, you might see the symbols f∘g(x)f \circ g(x) floating around. This means the same thing as f(g(x)).f(g(x)).

Let's do some practice and evaluate a composition. Be mindful of which is the input to the function. Start by evaluating the inner function, but always read the input and the output.

Example: If f(x)=x2+1f(x) = x^2 + 1 and g(x)=5x+3,g(x) = 5x + 3, then find f(g(x))f(g(x)) and g(f(x)).g(f(x)).

Solution: In most cases f(g(x))f(g(x)) and g(f(x))g(f(x)) will end up being different, so we calculate both to demonstrate that this happens (in fact, functions ff and gg where f(g(x))=g(f(x))f(g(x)) = g(f(x)) are quite rare).

Let's start with f(g(x)).f(g(x)). We know that g(x)=5x+3,g(x) = 5x + 3, so plugging this in gives

f(g(x))=f(5x+3).f(g(x)) = f(5x + 3).

Now, we take the definition of ff and replace xx with 5x+35x + 3. This means

f(5x+3)=(5x+3)2+1.f(5x + 3) = (5x + 3)^2 + 1.

Finally, simplify by expanding the square:

(5x+3)2+1=(5x+3)(5x+3)+1=25x2+30x+9+1=25x2+30x+10.\begin{align} (5x + 3)^2 + 1 = (5x + 3)(5x + 3) + 1 = \\ 25x^2 + 30x + 9 + 1 = 25x^2 + 30x + 10. \end{align}

This means that f(g(x))=25x2+30x+10.f(g(x)) = 25x^2 + 30x + 10. Now let's find g(f(x)),g(f(x)), which is done in basically the same way. Since f(x)=x2+1,f(x) = x^2 + 1,

g(f(x))=g(x2+1).g(f(x)) = g(x^2 + 1).

Now we take the definition of gg and replace xx with x2+1x^2 + 1 wherever it appears:

g(x2+1)=5(x2+1)+3=5x2+5+3=5x2+6.g(x^2 + 1) = 5(x^2 + 1) + 3 = 5x^2 + 5 + 3 = 5x^2 + 6.

This means g(f(x))=5x2+6,g(f(x)) = 5x^2 + 6, which is not the same function as f(g(x)),f(g(x)), which we calculated to be 25x2+30x+10.25x^2 + 30x + 10.

Now we're going to do a different type of example. Remember how I said functions ff and gg for which f(g(x))=g(f(x))f(g(x)) = g(f(x)) are hard to find? Well, we're going to discuss that a bit more now.

If ff and gg are in fact the same function, then replacing gg with ff above gives f(f(x))=f(f(x)),f(f(x)) = f(f(x)), which is true for any function f.f.

Another way to do this is to pick a function ff and then "guess" functions gg for which f(g(x))=g(f(x)).f(g(x)) = g(f(x)). We can do function composition calculations even if we're guessing g,g, so we'll explain how.

Example: If f(x)=x+2,f(x) = x + 2, find a polynomial function g(x)g(x) of degree 22 or less so that f(g(x))=g(f(x)).f(g(x)) = g(f(x)).

Solution: All polynomials of degree 22 resemble

g(x)=ax2+bx+c,g(x) = ax^2 + bx + c,

where a,b,a, b, and cc are real numbers we can choose. This equation comes from the standard form of a quadratic.

So now here's the game plan: we want to find a,b,a, b, and cc so that g(f(x))=f(g(x)).g(f(x)) = f(g(x)). We let a,b,a, b, and cc be variables when we calculate f(g(x))f(g(x)) and g(f(x)),g(f(x)), and go from there.

Since f(x)=x+5,f(x) = x + 5, to find g(f(x))g(f(x)) we plug x+5x + 5 in for ff and have

g(f(x))=g(x+5).g(f(x)) = g(x + 5).

now we plug x+5x + 5 in the definition of g:g:

g(x+5)=a(x+5)2+b(x+5)+c⇒g(x+5)=a(x2+10x+25)+bx+5b+c⇒g(x+5)=ax2+(10a+b)x+(25a+5b+c).\begin{align} g(x + 5) &= a(x + 5)^2 + b(x + 5) + c \Rightarrow \\ g(x + 5) &= a(x^2 + 10x + 25) + bx + 5b + c \Rightarrow \\ g(x + 5) &= ax^2 + (10a + b)x + (25a + 5b + c). \end{align}

This means that g(f(x))=ax2+(10a+b)x+(25a+5b+c).g(f(x)) = ax^2 + (10a + b)x + (25a + 5b + c). Now we calculate f(g(x))f(g(x)) in much the same way. Since g(x)=ax2+bx+c,g(x) = ax^2 + bx + c, we plug this into f(g(x))f(g(x)) to get

f(g(x))=f(ax2+bx+c).f(g(x)) = f(ax^2 + bx + c).

Now since f(x)=x+5,f(x) = x + 5, we replace xx with ax2+bx+cax^2 + bx + c to see that

f(ax2+bx+c)=ax2+bx+c+5.f(ax^2 + bx + c) = ax^2 + bx + c + 5.

As a result of this, g(f(x))=ax2+bx+c+5.g(f(x)) = ax^2 + bx + c + 5. We wanted f(g(x))=g(f(x)),f(g(x)) = g(f(x)), so we require the following equation to be true:

ax2+bx+c+5=ax2+(10a+b)x+(25a+5b+c)ax^2 + bx + c + 5 = ax^2 + (10a + b)x + (25a + 5b + c)

These are both quadratic functions. If they are to be the SAME quadratic function, then the quadratic, linear, and constant terms must be the same. In particular, they have the same coefficients. Matching up the coefficients of the quadratic terms gives

a=a.a = a.

Matching up the coefficients of the linear terms gives

b=10a+b.b = 10a + b.

Finally, matching up the coefficients of the constant terms gives

c+5=25a+5b+c.c + 5 = 25a + 5b + c.

These equations together give us a system

a=ab=10a+bc+5=25a+b+c.\begin{align} a &= a \\ b &= 10a + b \\ c + 5 &= 25a + b + c. \\ \end{align}

If we subtract bb from both sides of the second equation then we get 10a=0,10a = 0, which means a=0.a = 0. So, we don't actually want gg to be a quadratic; rather we want it to be linear. Then the first equation in the system becomes 0=0,0 = 0, so let's turn our attention to the third equation in the system. Plugging in a=0a = 0 gives

c+5=b+c,c + 5 = b + c,

so subtracting cc from both sides gives b=5.b = 5. Since we have gotten rid of every instance of cc in the system, it can be whatever we want. Let's just have c=1,c = 1, meaning that g(x)=0x2+5x+1=5x+1.g(x) = 0x^2 + 5x + 1 = 5x + 1.

The best part is, now we know g(f(x))g(f(x)) for free because we already found a formula for it in terms of a,b,a, b, and c.c. We already calculated

g(f(x))=ax2+bx+c+5,g(f(x)) = ax^2 + bx + c + 5,

so setting a=0,a = 0, b=5,b = 5, and c=1c = 1 tells us

g(f(x))=5x+6.g(f(x)) = 5x + 6.

Some people find it easier to solve composite functions using tables, where we write the functions as tables. There is a column for functions expressed as formulas, a column for inputs for functions expressed, and a column for outputs. You can use this table to evaluate, too! However, this method is mainly to keep all of your numbers clear. You will still use the method we described earlier.

Illustrated · 1 min

Simplifying Composite Functions

When we simplify composite functions, we are working with two functions where one function is inside the other function. We've covered this previously, so we will take this concept a step further by understanding the various tools we have to simplify composite functions.

Simplifying Composite Functions
You may need to: expand the square, introduce a variable, move variables, combine like terms, simplify brackets

Image source: by Anusha Rahman

You will use the same tools you used when expanding, simplifying, and solving for functions. Examples include expanding the square, simplifying brackets, or combining like terms.

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems