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.

## 100 Comments

## Antonio Fidelis

I liked the way you explained. Thank you!

## JayATL

Bae (;

## Brownskn beauty

too confusing

## Aileen Sun

Really helpful. Thanks!

## Gabe Pont

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

## Miss Mania

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

## Leeland Anderson

I have that orange bible in your background!

## Kriya Giresh

how to write the domain in interval notation?Β

## Billy N

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

## Reagan Hesse

Great job very helpful and clear keep making videos

## Kervin M.

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

## Rethna Gireeshwar

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

## gogetta90001

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.

## Toniipp

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

## Gamer Samista

Thank u so much helped me a lot

## Honest Lie

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

## nury izmailov

thank u

## Sanjeev

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

## 7906jun

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).

## pietrom2

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

## GOH ZHENG FENG

why there is no nid of multiply the denominator

## Mostafa Didar

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

## Sai Meghana

thanks a lot!

P.S. what software was that? π

## Ayden Yeung

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

## Chaos Earthquake

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

## PassitonMatt

Nice explanation !

## TheGrasspond

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

## Euler13

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]

## Omar Hamdan

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

6:15–6:30 i think

## RSJ- Raul Sanchez

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

## RSJ- Raul Sanchez

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.

## ColoradoSnows

Best video of composition functions! Thank you!

## Ray gautam

that really helped me a lot for my semester examinations

## Albert Flores

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.

## Aman Budgujar

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.

## Aeryn

you are a life saver.!! β₯

## Enzo celecio

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

## epistrophy99

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?

## Moiz Marvi

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?

## Tamara

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

## Rachel Huston

yeah still dont know lol i give up

## NISAR ALI

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….

## Maweth OVO

CLEVER BEAUTIFUL WOMAN <3

## Christian Marshall

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.

## Rodrigo Ordonez

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

## Kenny Bassarath

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

## LordJabaJaba

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

## Robert.E. Lee

Hello, Krista.

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

Thanks advance,

Robert

## Ali Raza

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

## Taifur Rahaman

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

## Jazmin Zenteno

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

## Joana Paula Dato-on

YOU JUST SAVED ME FROM DOOM. THANK YOU SO MUCH

## MAHMUDUL HASAN MAHIM

Nice …………

## MAHMUDUL HASAN MAHIM

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

## Gregorys Mode

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

## Rae Johnson

Thank you for this helpful video!

## FIFA Lords & Legends

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

## C F

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

## Kyle Seager

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

## salina martinez

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?

## blockmichael

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

## vine

you explained well but duuh

my head hurts

## viggu bala

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

## Richard Stern

Great work… Really cleared up the fog on finding domain of a composition and the steps to find it. Eeeasy ,,, Peeeasy!

## Muhammad Zafar

very best explanation.

i love you Miss.

## Tom Galarneau

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

## Nipun Garg

Thanks beautiful π

## Mohab Esam Abdelrazek Mohamed Youssef

that was really helpful

## Mohab Esam Abdelrazek Mohamed Youssef

thx

## Abdulkareem Alnoaman

Good job explaining the composed functions and finding their domains.

## CRAY VERSACE

Really helpful thanks.

## rvbesme

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

## Siyabulela Manona

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

## Lehlohonolo Tlhako

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

## DAMANJEET SINGH

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

## MrShockedmushroom

Well IΚ»m gonna fail my finals and not be able to graduate lol

## amandeep singh

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

## cliffoconda

i trust u with my life

## Craig Bell

Krista do you do graphing of complex composition of functions

## Vigyan PHYSICIST

you are just amazing….

## CAT

I love youuuu. Thanks you are the bestttt

## Bryan Campos

@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 ????

## Venkat Lol

Nice video and good explanation mam….

## MlondiG Nzimande

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

## Heith Heithinson

Iβm in love

## Adnaan Mastan

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

## Manara Alcius

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

## Dipjyoti Kalita

Please

One help me

## Alejandro Cs

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

## Saaniyah Sajed

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

## sailinginwater sailinginwater

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

## David Shaw

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

## Youmana Al lawendy

This helped me so much, thank you!!

## Sky Limits

damn how could that function be so hard to understand

## Vincent Ortega

Awesome! Krista. Great teaching thank you.

## Krisitonic Platinum

I still don't understandddddd whattttttt

## Mary T.

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

## Vivek The vicky

ππππ

## Hamza Ahmed

NITTTYYYYY