Main content

### Course: Precalculus > Unit 1

Lesson 1: Composing functions- Intro to composing functions
- Intro to composing functions
- Composing functions
- Evaluating composite functions
- Evaluate composite functions
- Evaluating composite functions: using tables
- Evaluating composite functions: using graphs
- Evaluate composite functions: graphs & tables
- Finding composite functions
- Find composite functions
- Evaluating composite functions (advanced)

© 2024 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Evaluating composite functions (advanced)

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?(142 votes)
- 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.(147 votes)

- 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)(10 votes)
- 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 votes)

- 2.25 -2 times 8 does not equal 18(0 votes)
- It was -2 times 8 MINUS 2 equaling the -18.(4 votes)

- if f(x)=4x+5 and f.g(x)=8x+13,find the value of "x" such that g.f(x)=28!(4 votes)
- 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*.(14 votes)

- 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(6 votes)
- 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 at3:30in 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.

Hope this helps, and please reply if you're still confused!(7 votes)

- 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)?"(3 votes)
- 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!(5 votes)

- 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(2 votes)
- 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.(5 votes)

- 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.(6 votes)

- 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 votes)- (𝑓 − 𝑔)(𝑥) = 𝑓(𝑥) − 𝑔(𝑥) = 2𝑥 − (√𝑥 − 1) = 2𝑥 − √𝑥 + 1

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

Thereby, the domain is 𝑥 ≥ 0.(4 votes)

- what is the problem is f(f(x)).....how would you solve that problem.(2 votes)
- Replace the inner f(x) with the definition of the function, e.g.

f(x) = x^2 + 1

f(f(x)) = ((f(x))^2 + 1

f(x^2+1) = (x^2 + 1)^2 + 1(2 votes)

## Video transcript

We are told that h
of x is equal to 3x. g of t is equal to negative
2t minus 2 minus h of t. f of n is equal to negative
5n squared plus h of n. So we have three
function definitions, and two of these
function definitions are actually defined in
terms of another function-- in particular, in terms
of the function h. And then we're asked to
calculate, what is h of g of 8? And this can be very
daunting, but we just have to remember that all a
function is is something that takes an input and gives
you an output for it. And this somewhat
convoluted looking statement is another way of
saying, look, we are going to take
the number 8, and we are going to input it
into the function g. And then that is going
to produce g of 8. And then we're going to
take whatever value that is and input that
into the function h. So we're going to
take this whole thing, and then we're going to input
that into the function h. And what we will have will
be h of what we inputted, h of g of 8. So let's just do it
one step at a time. Let's figure out what g of 8 is. And I'm going to color code it,
so we can keep track of things. g of 8 is equal to-- well, g of
t, we have our definition here. So our input now, 8 is going
to be our t, so our input is 8. So every place where we see a
t in this function definition, we replace it with an 8. So it's going to be negative
2 times 8 minus 2 minus-- and this might be
a little daunting, but let's just replace
this t with an 8 and then see if we
can make sense of it. h minus-- and let me do
it in the right color-- minus 2 minus h of 8. Notice, to evaluate g of 8,
all we did is, everywhere we saw a t, we replaced
it with the input 8. Now let's see if we
can calculate this. This is going to be equal
to negative 2 times 8 is negative 16. Minus 2 is negative 18. Let me do that the same. So this is going to be equals
negative 18 minus-- what is h of 8 going to be equal to? So let's do that over here. So h of 8-- this thing, h of 8. Now we go to the
definition of h. Don't worry about
later we're going to input all this
business into h again. Just let's worry about
it one step at a time. We need to calculate h of 8. So h of 8 is just going to be--
well, every time we see an x, we replace it with an 8--
it's going to be 3 times 8, which is equal to 24. So this value right
over here is 24. We are subtracting it,
so we have minus 24. Negative 18 minus 24 is what? That's negative 42. So all of this
business is going to be equal to-- did I do that right? Yeah-- negative 42. So we figured out
what g of 8 is. It is negative 42. So this right over
here is negative 42. And now we can input
negative 42 into h. Let me do it right over here.
h of negative 42-- remember, negative 42 is the
same thing as g of 8. So this is h of g of 8 is the
same thing as h of negative 42. Let me do that in
the same color. This is going to be equal to
3 times negative 42, which is equal to-- this
is negative 126. And we are done. So it seemed
convoluted at first, but if you just
keep track of what's our input, what's our
output, and really just evaluate the functions,
it should hopefully be reasonably straightforward.