# Composite of piecewise functions

## Homework Statement

Find f°g for each pair of functions f and g.

## Homework Equations

f(x) = {x+1, if x≤0 or 2x, if x>0

g(x) = {2x, if x≤-1 or -x, if x>-1

## The Attempt at a Solution

I am able to determine the following:

(f°g)(x) = {2x+1, -2x, -x+1

However, these functions carry intervals, and I don't know how to obtain those intervals

For example, my book gives the following solution,

(f°g)(x) = {2x+1, if x≤-1 or -2x, if -1<x<0 or -x+1, if x≥0

I can obtain the equations, but I don't know how to determine the actual intervals for the individual equations.

Could someone please explain it to me?

Related Calculus and Beyond Homework Help News on Phys.org
SammyS
Staff Emeritus
Homework Helper
Gold Member

## Homework Statement

Find f°g for each pair of functions f and g.

## Homework Equations

f(x) = {x+1, if x≤0 or 2x, if x>0

g(x) = {2x, if x≤-1 or -x, if x>-1

## The Attempt at a Solution

I am able to determine the following:

(f°g)(x) = {2x+1, -2x, -x+1

However, these functions carry intervals, and I don't know how to obtain those intervals

For example, my book gives the following solution,

(f°g)(x) = {2x+1, if x≤-1 or -2x, if -1<x<0 or -x+1, if x≥0

I can obtain the equations, but I don't know how to determine the actual intervals for the individual equations.

Could someone please explain it to me?
It may help to graph the functions.

You're looking for (f○g)(x) = f(g(x)) .

You will have to look at g(x), to see what portion of the domain of g(x) has a range that's in the interval, (-∞, 0] and what portion of the domain of g(x) has a range that's in the interval, (0, +∞) .