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.

Finding composite functions

Given that f(x)=√(x²-1) and g(x)=x/(1+x), Sal finds f(g(x)) and g(f(x)). Created by Sal Khan.

Want to join the conversation?

• Would one be able to define the new function as its own function.
For example, the new f(g(x)) would simply be h(x) instead?
• There is an addition sign separating the two terms, so cancelling them would not be possible
• How do you find a composite function when one is missing for example if the question is "if g(x) = 2x and f(g(x))=3/x, what is f(x)?"
• I am lost, bad at math and give up oof oof ooof oooof I try but I suck :((((
• keep going! I feel the same way sometimes, a snack usually helps
• couldn't sal simplify the answer in ?
• Hi Mirghani,

You can simplify the expression, but it will still be a hairy expression.

Let's see how it turns out-
f(g(x)) = sqrt (x/x+1)^2 - 1
= sqrt x^2/(x+1)^2 - 1
= sqrt x^2/(x+1)^2 - (x+1)^2/ (x+1)^2
= sqrt x^2 - (x+1)^2/ (x+1)^2
= sqrt x^2 - (x^2 +2x + 1)/ x^2 +2x + 1
= sqrt x^2 - x^2 -2x - 1 / x^2 +2x + 1
= sqrt -2x -1/ x^2 + 2x +1

You can see that it is still is a hairy number and will not help us much if we factored and simplified it.

I hope that this helps.

Aiena.
• At around the mark, isn't your answer not simplified enough? The three basic rules of simplifying a radical state that the radicand must not have any perfect square factors, there can't be a radical in the denominator of a fraction, and the radicand can't be a fraction. So, to simplify Sal's answer further we would do sqrt((x^2-1)/(1+sqrt(x^2-1)))*(((1-sqrt(x^2-1))/(1-sqrt(x^2-1))). Therefore, we would get (x^2-1-sqrt(x^2-1))/x^2.

• I would agree with you...a simplified answer would have no radical in the denominator. Though, when I did it I got: (x^2 +1-sqrt(x^2-1))/x^2.
Sal doesn't consistently simplify the radicals in his videos, which is frustrating.
• For f( g(x)), couldn't we just plug in the value of g(x)?
• You could if you were looking at a particular value of x. In this example, Sal was simply using the two functions to build a single function. This is useful in that if you knew a value for x, you could now evaluate a single function rather than having to successively evaluate two different functions. If you need to evaluate the composition at many different input values, generating a composition function algebraically is often more efficient.
• I was able to further simplify f(g(x)) =
sqrt((x^2/(1+x)^2) + 1)
Normalize the 1 = (x+1)^2/(x+1)^2 and expand quadratics
sqrt((x^2-x^2+2x+1)/(x+1)^2)
= sqrt(2x+1) / (x +1)

Is this correct?
• Almost. In the video, it's sqrt((x^2/(1+x)^2) - 1), not sqrt((x^2/(1+x)^2) + 1). Therein lies your mistake; sqrt(-1) is an impossible number. However, all the math beyond that small error works out. (Don't worry, I fell for it too.)
• Is it possible to do this mentally? Or is better to write the whole thing out? What do you guys think?
• With practice, you will most likely be able to find composite functions mentally. This may not happen for all problems, but for some, it certainly will.

For example, if f(x) = x + 1, and g(x) = x^2, finding f(g(x)) wouldn't most likely be regarded as hard, since you can simply substitute the x^2 in to get f(g(x)) = x^2 + 1

However, if you were given a harder example, such as f(x) = (x + tanxsecx - x!/sqrt(x)) and g(x) = cscx * arccos(x), then finding the composite function mentally would probably be harder.