If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: Algebra (all content)>Unit 7

Lesson 15: Composing functions (Algebra 2 level)

Given that h(x)=3x and g(t)=-2t-2-h(t), Sal finds h(g(8)). Created by Sal Khan.

## Want to join the conversation?

• Was f(n) included only as a distractor?
• Basically a distraction. It's really only there to trick you.
The exercises sometimes do that as well so it was a good choice by Sal to familiarize us with it.
• How can we find the value of a function if we know the result? For example we have to find f(x) and g(x) if f(g(x)) = 5/(x+7)
• I know this is a very old comment, but i still think it is insightful to answer.

The thing here is that there doesn't exist a unique pairwise decomposition for f(g(x))=5/(x+7) for example on such decomposition can be f(x) = 5/x and g(x) = x+7 but another may be f(x) = 5x and g(x)= 1/(x+7)
• 2.25 -2 times 8 does not equal 18
• It was -2 times 8 MINUS 2 equaling the -18.
• if f(x)=4x+5 and f.g(x)=8x+13,find the value of "x" such that g.f(x)=28!
• 38111043076464232562687999998.5
Unless that exclamation mark is just an exclamation mark and not a factorial sign.
Also this question isn't really about what's in the video, involving as it does a function decomposition.
• So what I'm not getting is how x...t...n...etc. can all have the same value. Is that just an arbitrary thing where we say that even though they are different variables they are all representing the same input? If so then why even use different variables in the first place. My physics teacher would slap me for doing such a thing. lol
• You mentioned that "...they are different variables representing the same input..." However, you'll notice the inputs actually vary. The initial equations, g(t) receives 8 as the input, but as we move along the equations you'll notice that h(x) takes the value of -42 when we run it through at in the video and not 8, because 8 is the value of t (the initial place we put it). As we run the original integer through the various functions, it evolves, which is why the variables change as well- to represent those evolved versions rather than the original.

To add to that, for clarity:
The original problem was H(g(8)). So t is 8 and x is g(8), which is a different value than just plain 8.

• So how would one go about finding the answer to a question like "If f(x)= x+ 6 and h(x)= 5x+8, find g(x) such that (g o f)(x)=h(x)?"
• Assuming that 𝑔 is a linear polynomial function in 𝑥. Then we have:
𝑔(𝑥 + 6) = 5𝑥 + 8
The variable we use doesn't matter, so to avoid confusion, we will write this functional equation in 𝑘 instead of 𝑥:
𝑔(𝑘 + 6) = 5𝑘 + 8
Since 𝑘 ∈ ℝ, we let 𝑘 = 𝑥 – 6 where 𝑥 ∈ ℝ. Thus:
𝑔(𝑥 – 6 + 6) = 5(𝑥 – 6) + 8
Which we reduce to:
𝑔(𝑥) = 5𝑥 – 22
Comment if you have questions!
• So the problem I was given doesn't have two equations for me to go back and forth between.. I'm given that f(x)=sqrt(x+4) find and simplify (f(2+h)-f(2))/h. The teacher gives us the answer to check ourselves but I don't understand how they got there. ans:1/(sqrt(6+h)+sqrt(6)). Please help
• f(2) means use f(x) with an input of 2
= sqrt(2+4) = sqrt(6)

f(2+h) means use f(x) with an input of (2+h)
= sqrt(2+h+4) = sqrt(6+h)

Now, use these to create: (f(2+h)-f(2))/h
= [sqrt(6+h)-sqrt(6)]/h

The answer is simplified in this form. The only way to get to the result you were given is to rationalize the numerator. Did the instructions ask you to rationalize the numerator? This means the end result can't have any radicals in the numerator. We multiply by the conjugate: [sqrt(6+h)+sqrt(6)]/[sqrt(6+h)+sqrt(6)]

[sqrt(6+h)-sqrt(6)]/h * sqrt(6+h)+sqrt(6)]/[sqrt(6+h)+sqrt(6)]
= [sqrt(6+h)-sqrt(6)]*[sqrt(6+h)+sqrt(6)]/{h*[sqrt(6+h)+sqrt(6)]}

Use FOIL or extended distributed to simplify the numerator
= [6+h-6]/{h*[sqrt(6+h)+sqrt(6)]}
= h/{h*[sqrt(6+h)+sqrt(6)]}

Cancel out the common factor of h:
= 1/[sqrt(6+h)+sqrt(6)]

Hope this helps.
• Is f(g(x) different than (f o g)(x)?
(1 vote)
• No, they are the same thing written differently. Both are f of g of x.
• Let f(x) = 2x and g(x) =√x - 1
Perform each function operation and then find the domain of the result.
problem (f-g) (x)
• (𝑓 − 𝑔)(𝑥) = 𝑓(𝑥) − 𝑔(𝑥) = 2𝑥 − (√𝑥 − 1) = 2𝑥 − √𝑥 + 1

All terms are defined for all 𝑥, except √𝑥 which is only defined for 𝑥 ≥ 0.
Thereby, the domain is 𝑥 ≥ 0.