Finding the Domain of the composition of piecewise functions

by Diego

Find the domain of: fog, gof, fof, gog.

For me these are the hardest types of problems one could face on a test regarding functions. I mean finding the domain of the composition of picewise defined functions.

I just found the fog function wich i think is:

1+x if x is less or equal to 0
(x+1)^2 if x is greater or equal to 1

I really just want to know the steps to solve this kind of problmes not this specific one (but that will be appreciated also).

Answer by Pablo:

These are indeed tricky problems. Here I'll try to give you some steps to follow for this kind of problems. To solve this analytically you need to have some experience dealing with inequalities.

Instead of that, I'll show you a graphic method. I'll walk you through the steps I'll follow to solve the specific problem you posted.

Let's say we want to find the domain of fog. The best way I can think of of doing this is to find the function itself. The notation fog means that
given a number x, we first apply g to it and then f.

So, we might write f as a function of y instead of x to clarify what is going on:

The domain of this function is clearly the set of real numbers. Now, what is the y we'll be using? It is f(x):

We now must consider all cases. We can do this analytically, but I think the easiest way is to graph these functions. You can quickly do this by hand, since they are fairly simple.

We will first graph g(x), since it is the first function to be applied:

We see that for x<0, g(x) is positive. So, according to our definition of f(y):

But what is g(x) for x<0? It is -x, because x<0 implies x<1. So we have:

We can now add that part of fog to our graph (in green):

Now, for 0

And for those values, g(x) = -x. So:

Let's add that to our graph:

And finally, for x>1 or x=1 we have that g(x) is postive. So:

For those values, g(x)=x+1. So:

And let's see what that looks like:

And that's it. Our piecewise function is:

Now, the original question is what is the domain of the function. Here we can consider the domain of this function the set of values that g(x)
actually takes. Let's look at the graph of this function:

We see that the values it takes is the set:

I think that this is what the question meant by domain of function. Because, we can consider the function fog as a function of x also. In this case, the domain of fog is the domain of g, which is the set of real numbers.

Return to Composite Functions

Comments for Finding the Domain of the composition of piecewise functions

Average Rating starstarstarstarstar

Click here to add your own comments

Sep 14, 2012
by: Pablo

To Jesse:

These problems are indeed hard to explain. At the point where I say that:

f(g(x)) = [g(x)]^2 at x < 0

I'm using the definition of the function f, and using g(x) as the variable y (that's the reason why I wrote f as a function of y first, but I forgot to note that later). Well, if you write:

y = g(x)


(because y>0, look at the definition of the function f.)

But in reality, g(x) = -x for x<0. So, we have:

f(y)=f(g(x))=y^2=[g(x)]^2=(-x)^2=x^2, x<0

In the part where I say for 0, I mean 0

Sep 14, 2012
by: Jesse

I was less interested in the domain part of the problem than understanding some
of the steps. As it happens, the problem in the example is the same as in one
of my textbooks.

Anyhow, the answer I always get is different from the one you do in that
example. It seems "backwards" and I am trying to understand how this happens.

You mention redefining f(x) in terms of y. But what I don't undersand is how
going from that gets you to

f(g(x)) = [g(x)]^2 at x < 0

because in the original problem it says that for x > 0 f(x) = x^2. How does it
change to being at x<0? That makes no sense to me. The problem states that f(x)
= 1-x at x<= 0.

Anyhow, if you could explain that it would be most helpful, this is a problem
that I seem to be struggling with.


Jesse Emspak

Click here to add your own comments

Join in and write your own page! It's easy to do. How? Simply click here to return to Your Doubts and Problems.

Share this page: