# Composite functions and their domains (KristaKingMath)

Hi everyone!

Today we’re going to talk about how to calculate composite functions and their domains. To

complete this problem, we’ll calculate four composites from two functions and then specify

the domain of each. Let’s take a look.

In this particular problem, we’ve been given two functions, f of x equals x plus one over

x and g of x equals x plus one over x plus two, and we’ve been asked to find the compositions,

f of g, g of f, f of f, and g of g, and once we find the compositions we’ve been asked

to state their domains, the domains of the compositions. So this will be in two parts,

one will be finding the compositions of these functions and then we’ll be stating the

domains of the compositions. So let’s take a look at f of g first. We

can denote f of g as f of g like this, dot composition notation, that’s equal to f

of g of x, and both of these kinds of notations mean the same thing, we’re just going to

be plugging g of x here into our f of x function. So we have to look at g of x as x plus one

over x plus two and we’re going to be plugging that in to f of x everywhere where we see

x in our f of x function. So what that looks like here, we’ll take g of x and we’ll

plug it in to f of x here and here. So, that looks like this, x plus one over x plus two

for that first x, then, continuing on with our f of x function, plus one divided by,

and now we’re plugging in x again, x plus one over x plus two. So you’re just taking

g of x and plugging it in to f of x. So at this point, we’ve really found the composition;

all we have left to do is simplify this function and find the domain. So, in order to simplify,

this second term here, one divided by x plus one over x plus two, we can just flip that

fraction here in the denominator and take the reciprocal. So we’ll have x plus one

over x plus two, this second fraction is just going to flip and it’s going to be x plus

two over x plus one. Whenever you have one divided by a fraction like that you just flip

the fraction and the one goes away. And now we can find the common denominator by multiplying

the first term by x plus one and the second… x plus one over x plus one and the second

term by x plus two over x plus two and what we’ll end up with is basically x plus one

times x plus one plus x plus two times x plus two with a common denominator here of x plus

one times x plus two. So, when we simplify our numerator, we’ll get x squared plus

two x plus one plus x squared plus four x plus four all over our denominator, x plus

one times x plus two. And when we simplify, you can see that we’ll get two x squared

plus six x plus five all over x plus one times x plus two. At this point, because we can’t

simplify any further or factor anything out, we know that our domain will be all real numbers

except those that cause the denominator to be equal to zero. So we know that the denominator

will be equal to zero when x is equal to negative one and when x is equal to negative two so

we can say that the domain here… the domain is x not equal to negative one or negative

two. The important thing to remember about domains of compositions is that the domain

is defined by the composition itself but also by the inside function here, g of x. So, whatever

we put inside, the domain has to consider that as well. So, if we look at the domain

of g of x itself, we can see that the domain of g of x is x not equal to negative two.

We already indicated that x cannot be equal to negative two and the domain that we found

for the composition f of g of x. So in this case, we don’t have to include any other

qualifiers on the domain but if our answer here had been different for the domain of

g of x we would have had to include that as well.

So let’s look at another example here, g of f, which we know to be the same thing as

g of f of x, and in this case we’ll just be plugging in f of x to our function, g of

x. So, we’re going to take x plus one over x and plug it in to g of x everywhere where

we see x, so here and here, and what we’ll get is x plus one over x, plus one because

we’re in the denominator of our g of x function, divided by x plus one over x, plus two. Now

we just need to simplify our composition and find the domain. So, simplifying the composition,

we’ll multiply everything by x over x to find a common denominator in both the numerator

and the denominator. So, we’ll get x squared over x plus one over x plus x over x, again,

multiplying each term by x over x, and then in the denominator here, same kind of thing,

we’ll get x squared over x plus one over x plus two x over x. Then, when we find the

common denominator, we’ll get x squared plus one plus x all divided by x over x squared

plus two x plus one, just reordering terms a little bit, all over x. Our x terms here

in the denominator will cancel, these will cancel, and we’ll just be left with x squared

plus x plus one, again, reordering terms from that numerator there, all divided by x squared

plus two x plus one which we can factor into x plus one times x plus one or the quantity

x plus one squared. So this is our composition and we can see, since it’s a rational function,

where the quotient of two polynomials, that the domain is just going to be all real numbers

except where the denominator is equal to zero. So we can see that the denominator will be

equal to zero whenever x is equal to negative one so we know that x cannot be equal to negative

one. But, as we learned in the last example, we can’t just stop there we have to also

include the domain of f of x. We know that f of x has to be considered here because it’s

the inside function so the domain over here of f of x is all x not equal to zero. We can’t

have x equal to zero because we have this x in the denominator here. So, we have to

modify the domain of the composition g of f and say that x cannot be equal to negative

one but it can also not be equal to zero. Our last two compositions, f of f and g of

g, we can look at in the same way. So we know that f of f is equal to f of f of x and it’s

the same concept, we’re just going to be plugging x plus one over x into our same function,

f of x, wherever we see x. So, we’ll take x plus one over x, that will come in for x,

then we’ll say plus one divided, and plug it in again for this x here, so we’ll say

x plus one over x. And now we just need to simplify. Again, we’ll need to find a common

denominator and the way that we’ll do that is by finding a common denominator here in

the denominator of our third term. So we’ll multiply this first term by x over x to get

x squared plus one all over x. Because it’s one divided by that fraction, it’s just

going to flip that fraction upside down, we will get x plus one over x plus x over x squared

plus one. And now, you can see we need to find a common denominator between all three

of these terms so we’ll see that we can find the common denominator of x times x squared

plus one. So we’ll multiply our first term here times x times x squared plus one over

x times x squared plus one, our second term here by x squared plus one over x squared

plus one, and our third term by x over x. And now, when we simplify, we’ll see that

we get x to the fourth plus x squared plus x squared plus one plus x squared all divided

by x times x squared plus one. When we simplify the numerator, we’ll get x to the fourth

plus three x squared plus one all divided by x times x squared plus one. This is our

composite, we just need to identify the points where our denominator is equal to zero and

we just need to exclude those points from our domain. So this term here, x squared plus

one can never be equal to zero because no matter what we plug in for x we’ll get a

positive number, when we add one to that we’ll still have a positive number, no problem.

But this variable here, x, will give us a zero when we plug in zero so we know that

for our domain x cannot equal zero. We also have to check f of x, because it’s the inside

function, and look at its domain. We already know that the domain of f of x says that x

cannot be equal to zero, we’ve already indicated that in our domain for f of f, the composite,

so we know that the domain for the entire composite is x not equal to zero.

For the last composite, g of g, we know that g of g is equal to g of g of x and we’ll

take g of x and plug that into g of x everywhere where we see x. So we know that we’re plugging

in x plus one over x plus two everywhere where we see x so we’ll say x plus one over x

plus two plus one for the numerator all over x plus one over x plus two plus two for the

denominator. Now, we just need to simplify our composite and then define the domain.

So we’ll find a common denominator in both the numerator and the denominator of our fraction

and we’ll get x plus one, we’ll multiply this one here by x plus two over x plus two

to find the common denominator, so we’ll get plus x plus two all over x plus two. In

the denominator, same thing, we’ll multiply this two by x plus two over x plus two and

we’ll get x plus one plus two x plus four all divided by x plus two. Our x plus two’s

will cancel from our denominators and we’ll just be left with the numerator here which

we’ll simplify to two x plus three all divided by our simplified denominator here which is

three x plus five and we have our simplified composite function. Now, for the domain, we

just have to figure out where this composite is undefined and where g of x is undefined,

since it’s the inside function. Here, since we have a rational function, the quotient

of two polynomials, our function is only undefined where the denominator is equal to zero. So

we need to figure out where three x plus five is equal to zero, we’ll get three x equal

to negative five or x equals negative five thirds. So we know that x cannot equal negative

five thirds but we also have to consider g of x itself. We know that the domain of g

of x is x not equal to negative two so we can say that the domain of the composite g

of g or g of g of x is equal to x not equal to negative five thirds or negative two.

And that’s it. That’s how you find the composition of functions and their domains.

So I hope you found that video helpful. If you did, like this video down below and subscribe

to be notified on future videos.

thank you so much. ย this cleared up so many issues for me!!

Thank you for your help! You explain this sooo well! ๐ I totally get it!

I have that orange bible in your background!

how to write the domain in interval notation?ย

Shouldn't we figure the D of f and the R of g before solving (F o G) just to make sure that there is intersection between them ? because if there is no intersection the whole equation will be wrong

Great job very helpful and clear keep making videos

Great video. Btw Do you have a lazy eyelid or one eye is more open than the other one? Anyway this video really helped me

Thanks for ur tutor ๐ i like ur turtorials very useful ๐ i have a small doubt @2:05… if (1/2)divided by(4/1) we can take reciprocal of 4/1 ย thus answer is 1/8… but hw it become (x+2)/(x+1) ..? according to me 1/(x+1)(x+2) pls rectify me.. Thank you

I'm confused at 2:40

How can x+1/x+2 be simplified by x+1, shouldn't it be simplified by x+2 reducing it to X+1? same type of confusing on the other side.

5:51 shouldn't the middle term be x/x^2 for both num and den

Thank u so much helped me a lot

how can the domain of f(g(x)) be written in interval notation? I was having trouble with that part in my class. :/

thank u

hmmmm….really enjoyin learning math through all you videos ๐ i am going to subscribe (y)

You dont't read the fuction symbol as F of G. It is read F circle G or G followed by F.

F of G would be F(G).

You are really strong. Your command is fantastic. I missed out when you were converting the fractions so that they all had the lowest common denominator. Have to go back to basics. Thank you though.

thank you for your great job … please what is the derivative of sinยฒ(5X+3) …. my respect to you from algeria

why there is no nid of multiply the denominator

Thank you so much. I have my Pre-calc finals day after tomorrow and you may just have saved my semester. <3 Thanks!

thanks a lot!

P.S. what software was that? ๐

You're literally saving me in pre calc 12 for summer school! Thanks a ton! ๐

You cleared this up for me, thank you very much!

Nice explanation !

whish you would have spent a little more time explaining the common denominator

That's a really good video with some well thought out examples.

[edit]I thought that I had spotted an oversight, but I had a momentary lapse of reason. I've removed my blunder. Thanks for correcting me, epistopht99.[/edit]

how is x/x times 1/x = 1/x?

6:15–6:30 i think

WOW! Thank you so much for the amazing explanation. My light bulb just turned on!

at min 5:40, why is it necessary to multiply by x/x to get a common denominator if im not adding or subtracting by another fraction? Plz help.

Best video of composition functions! Thank you!

that really helped me a lot for my semester examinations

how can you solve 3/ร-1=8 is there a website where they can explain to me step by step? i really want to learn so i can help my sister with her homework thanks.

I think that she doesn't't explain that well.

To find fog(x) we need to put the value of whole g(x) at the place of x in f(x).

But we need not to be concerned about what she said.

We need to be concerned about this.

The g(x) should lie in the domain of the f(x) and the also value of x should lie in the domain of g(x) .

After finding that function the domain of fog(x) would be the INTERSECTION of the value of x from "domain of x from from the function g(x) that lies in the domain of f(x) and the domain of x from the function g(x)."

What she taught us can be applied to minor problems but when the level increases that method is totally wrong.

I am not screaming on her or something. Just it cannot be applied to the higher level and I came here for that only.

you are a life saver.!! โฅ

Your videos helps me a lot. So much thanks. ๐ Continue to spread your wonderful ideas and knowledge!

To Calculus expert. Below is a comment that for g o g , x cannot = -3/2 in addition to the values you suggest (x unequal to – 2 or x unequal to -5/3) (comment posted by Euler13

If I input -3/2 into the inside function I get -1 which makes the numerator of the outside function = 0, but not the denominator.

So, do you agree that -3/2 is a solution or is not a solution?

Hi there, thanks for the tutorials. In this video I didn't understand, how did you take LCD of polynomial when finding the domain of f o f. Please can you make me understand it?

thanks a lot. You explained it better than my professor did

yeah still dont know lol i give up

hi …. I found your videos very useful… I need help on asymptotic solution of nonlinear non homogeneous second order differential equations…. please shear some video….

CLEVER BEAUTIFUL WOMAN <3

So question, how does 1/x times x/x equal 1/x still. Do you get x/x if you divide? Referring to the gof part of the video.

Not only a fantastic teacher but a beatiful, beatiful girl… OMG….. Thanks Krista!!

Krista, You are the best and easy on the eyes too.

why do I have to learn this in algebra 1A?

Hello, Krista.

Could you please assist in solving composition function: x^3/2x-1?

Thanks advance,

Robert

You're my maths guru. Thank you very much.

Beauty with brain….i think i am in love <3 <3

at 2:24 how do we know when we should flip them and why does the one go away?

YOU JUST SAVED ME FROM DOOM. THANK YOU SO MUCH

Nice …………

What about the range………….Help me please

Superb thanks Krista, my tutor just said "plug in" you were much clearer. Tar

Thank you for this helpful video!

gahhh I like maths but I really hate the tedious little arithmetic.

Another very helpful video. Thank you so much, I've subscribed!

Thank you so much!!!!! You literally saved me, thanks for the amazing video! It makes so much more sense!

Hi! Quick Question!

At 5:50 since you were multiplying the top and bottom by x/x then why didn't 1/x become x/x as well? Is it because it was already made into a fraction?

OMG i just wanted help with math now im distracted by the most beautiful face ive ever seen…

you explained well but duuh

my head hurts

Thank You Mam.You taught very well .You are so beautiful mam.I love you.

very best explanation.

i love you Miss.

Video liked, will be using for future reference, thank you very much.

Thanks beautiful ๐

that was really helpful

thx

Good job explaining the composed functions and finding their domains.

Really helpful thanks.

Does anyone know what software she is using? Need something like this for my assignment at school. Thank you in advance!!

thank you very. i think u might have forgotten to include some domains but thank you anyway your god sent.

Hey krista that was really helpful,can you please create one where you explain how to find a range(composite function).

Thank you for patiently working every single step. It really helped me. You're explanation is the probably best in the world.

Well Iสปm gonna fail my finals and not be able to graduate lol

you are a awesome teacher…you done a great job of teaching …keep it up makes more videos we like u ๐๐๐๐๐

i trust u with my life

Krista do you do graphing of complex composition of functions

you are just amazing….

I love youuuu. Thanks you are the bestttt

@5:58 how is the numerator of 1/x still 1/x if you multiplying everthing be x/x shouldnt it be x/x^2 ????

Nice video and good explanation mam….

hey, I am from South Africa, Thank you for the awesome video. In Zulu We say "Ngiyabonga-Thank you"

Iโm in love

Awful job explaining the algebra, couldn't follow after the first problem.

I get the concept but all those x and fraction thows me off

Please

One help me

Very well explained thanks! And oh she's cute as sugar ๐

this helps so much! i was so confused for the longest time. you resolved it. thank you!

f(x) =sqrt(x+1), with a restricted domain of [0, infinity), h(x) = x^2+3, with a domain of R, to find the range of the composite function f(h(x)), the domain would be the domain of the inner function, h(x), which is R, but do we also need to take into account the domain of the outer function, f(x), which is [0, infinity)? Please explain reasoning

g(x) = x^2+4x+4,with a restricted domain of (-infinity, -3], to find the range of the composite function, f(g(x)), the domain of f(g(x)) would be the domain of g(x), which is restricted to (-infinity, -3], but do we also need to take into account the domain of f(x), which is restricted to [0, infinity)? Please explain reasoning

Thanks

Can we start off with easy next time and build it up?

This helped me so much, thank you!!

damn how could that function be so hard to understand

Awesome! Krista. Great teaching thank you.

I still don't understandddddd whattttttt

That's a lot easier than calculating the domain using set ๐ ๐

EDIT: my tutor says this technique is wrong. You should always calculate the domain of composite function using set, or you may miss something that cannot be taken from the final function

๐๐๐๐

NITTTYYYYY

Nice work phone number please

Nice concept krista…..i m able to clear my doubts…. excellent …..

You and your explanation are beautiful โค๏ธ

The initial stage of the tuition is phenomenal but towards the end losing you especially where you are dividing fractions by fractions; you have been too quick for me.

Grinding out those common denominators is the hardest part imo