Algebraic Combinations of Functions

Just as we combine numbers with arithmetic, we can combine functions by addition, subtraction, multiplication, and division. The resulting function's domain is determined by where all component functions are simultaneously defined.

Quick Reference

Operation Formula Domain
Sum f + g ( f + g ) ( x ) = f ( x ) + g ( x ) Dom ( f ) Dom ( g )
Difference f g ( f g ) ( x ) = f ( x ) g ( x ) Dom ( f ) Dom ( g )
Product f g ( f g ) ( x ) = f ( x ) g ( x ) Dom ( f ) Dom ( g )
Quotient f / g ( f / g ) ( x ) = f ( x ) / g ( x ) Dom ( f ) Dom ( g ) { x g ( x ) 0 }

Arithmetic of Functions

Given two functions f and g , we define:

\begin{aligned} (f+g)(x) &= f(x) + g(x), \\ (f-g)(x) &= f(x) - g(x), \\ (f \cdot g)(x) &= f(x) \cdot g(x), \\ (f/g)(x) &= \frac{f(x)}{g(x)}. \end{aligned}

The domains of f + g , f g , and f g are

Dom ( f ) Dom ( g ) ,

the set of x -values where both f ( x ) and g ( x ) are defined simultaneously.

For f / g , we additionally exclude any x where g ( x ) = 0 :

Dom ( f / g ) = Dom ( f ) Dom ( g ) { x g ( x ) 0 } .
Example 1.

Let f ( x ) = 1 x 3 and g ( x ) = x 2 . Find f + g , f g , f g , f / g , and g / f , with their domains. Also evaluate each at x = 5 .

Solution

Domains of f and g :

Dom ( f ) = { 3 } , Dom ( g ) = [ 2 , ) .

Intersection: { x x 2  and  x 3 } = [ 2 , 3 ) ( 3 , ) .

Combined functions and their domains:

( f + g ) ( x ) = 1 x 3 + x 2 , Dom = [ 2 , 3 ) ( 3 , ) . ( f g ) ( x ) = 1 x 3 x 2 , Dom = [ 2 , 3 ) ( 3 , ) . ( f g ) ( x ) = x 2 x 3 , Dom = [ 2 , 3 ) ( 3 , ) .

For f / g , also exclude x = 2 where g ( 2 ) = 0 :

( f g ) ( x ) = 1 ( x 3 ) x 2 , Dom = ( 2 , 3 ) ( 3 , ) .

Since f ( x ) = 1 / ( x 3 ) 0 for all x in its domain:

( g f ) ( x ) = ( x 3 ) x 2 , Dom = [ 2 , 3 ) ( 3 , ) .

Values at x = 5 :

\begin{aligned} (f+g)(5) &= \frac{1}{2} + \sqrt{3}, \\ (f-g)(5) &= \frac{1}{2} - \sqrt{3}, \\ (fg)(5) &= \frac{\sqrt{3}}{2}, \\ \left(\frac{f}{g}\right)(5) &= \frac{1}{2\sqrt{3}}, \\ \left(\frac{g}{f}\right)(5) &= 2\sqrt{3}. \end{aligned}

A Subtle Domain Issue with Roots

Example 2.

Are the functions h 1 ( x ) = x 1 2 x and h 2 ( x ) = ( x 1 ) ( 2 x ) equal? What about u 1 ( x ) = x 1 x 2 and u 2 ( x ) = ( x 1 ) ( x 2 ) ?

Solution

(a) h 1 vs. h 2 :

Dom ( h 1 ) = [ 1 , ) ( , 2 ] = [ 1 , 2 ] .

For h 2 , we need ( x 1 ) ( 2 x ) 0 . A sign chart shows this holds on [ 1 , 2 ] .

So Dom ( h 1 ) = Dom ( h 2 ) = [ 1 , 2 ] , and h 1 ( x ) = h 2 ( x ) on [ 1 , 2 ] . They are equal.

Sign chart for (x-1)(2-x) with roots at x=1 and x=2.
Sign chart for ( x 1 ) ( 2 x ) : product is nonnegative on [ 1 , 2 ] .

(b) u 1 vs. u 2 :

Dom ( u 1 ) = [ 1 , ) [ 2 , ) = [ 2 , ) .

For u 2 , we need ( x 1 ) ( x 2 ) 0 . A sign chart shows this holds on ( , 1 ] [ 2 , ) .

So Dom ( u 1 ) = [ 2 , ) but Dom ( u 2 ) = ( , 1 ] [ 2 , ) . The domains differ, so u 1 and u 2 are not equal.

Sign chart for (x-1)(x-2) with roots at x=1 and x=2.
Sign chart for ( x 1 ) ( x 2 ) : product is nonnegative on ( , 1 ] [ 2 , ) .

Graphs of Combined Functions

To graph f + g : for each x , add the y -coordinates of f and g geometrically.

Example 3.

The graphs of f ( x ) = x and g ( x ) = x 3 4 x + 1 are given. Sketch the graph of h = f + g by graphical addition.

Solution

h ( x ) = f ( x ) + g ( x ) = x 3 3 x + 1 .

For each x , the height of h equals the sum of the heights of f and g :

Graphs of f(x) = x and g(x) = x³ - 4x + 1.
Graphs of f and g .

At the points where f and g intersect (approximately x 2.3 , 0.2 , 2.1 ), h ( x ) = 2 f ( x ) = 2 g ( x ) .

Resulting graph of h(x) = x³ - 3x + 1 by graphical addition.
Graph of h ( x ) = x 3 3 x + 1 obtained by graphical addition.

Exercises

Exercise 1.

Let f ( x ) = 2 x + 1 and g ( x ) = x 2 3 . Find ( f + g ) ( x ) , ( f g ) ( x ) , ( f g ) ( x ) and ( f / g ) ( x ) , and state the domain of each.

Answer

( f + g ) ( x ) = x 2 + 2 x 2 , ( f g ) ( x ) = x 2 + 2 x + 4 , ( f g ) ( x ) = 2 x 3 + x 2 6 x 3 , all with domain ; and ( f / g ) ( x ) = 2 x + 1 x 2 3 with domain { 3 , 3 } .

Solution

Domains of the ingredients. Both 2 x + 1 and x 2 3 are polynomials, and a polynomial can be evaluated at every real number. So

Dom ( f ) = Dom ( g ) = , Dom ( f ) Dom ( g ) = .

Sum.

( f + g ) ( x ) = f ( x ) + g ( x ) = ( 2 x + 1 ) + ( x 2 3 ) = x 2 + 2 x 2.

Domain: .

Difference. Subtracting a bracket changes the sign of every term inside it:

( f g ) ( x ) = ( 2 x + 1 ) ( x 2 3 ) = 2 x + 1 x 2 + 3 = x 2 + 2 x + 4.

Domain: . Note that ( 3 ) = + 3 ; dropping that sign change is the most common error here.

Product. Multiply each term of the first bracket by each term of the second:

( f g ) ( x ) = ( 2 x + 1 ) ( x 2 3 ) = 2 x x 2 + 2 x ( 3 ) + 1 x 2 + 1 ( 3 ) , ( f g ) ( x ) = 2 x 3 6 x + x 2 3 = 2 x 3 + x 2 6 x 3.

Domain: .

Quotient.

( f g ) ( x ) = 2 x + 1 x 2 3 .

For the domain we must also remove the points where the denominator is zero:

x 2 3 = 0 x 2 = 3 x = 3  or  x = 3 .

So the domain is { 3 , 3 } .

Check. Test x = 2 in each result. f ( 2 ) = 5 and g ( 2 ) = 1 . Then f ( 2 ) + g ( 2 ) = 6 , and the sum formula gives 4 + 4 2 = 6 ✓. f ( 2 ) g ( 2 ) = 4 , and the difference formula gives 4 + 4 + 4 = 4 ✓. f ( 2 ) g ( 2 ) = 5 , and the product formula gives 16 + 4 12 3 = 5 ✓. Finally f ( 2 ) / g ( 2 ) = 5 / 1 = 5 , and the quotient formula gives 5 / 1 = 5 ✓.

Exercise 2.

Let f ( x ) = x 2 and g ( x ) = x 4 . Evaluate, or state that the value does not exist.

(a) ( f + g ) ( 3 )   (b) ( f g ) ( 1 )   (c) ( f / g ) ( 2 )   (d) ( g / f ) ( 0 )   (e) ( f / g ) ( 4 )

Answer

(a) 8   (b) 5   (c) 2   (d) does not exist   (e) does not exist

Solution

The quickest route is to evaluate f and g separately at the given number, then combine.

(a) f ( 3 ) = 3 2 = 9 and g ( 3 ) = 3 4 = 1 . So

( f + g ) ( 3 ) = 9 + ( 1 ) = 8.

(b) f ( 1 ) = ( 1 ) 2 = 1 and g ( 1 ) = 1 4 = 5 . So

( f g ) ( 1 ) = 1 ( 5 ) = 5.

Be careful with ( 1 ) 2 : an even power of a negative number is positive, so f ( 1 ) = 1 , not 1 .

(c) f ( 2 ) = 4 and g ( 2 ) = 2 4 = 2 . So

( f g ) ( 2 ) = 4 2 = 2.

(d) g ( 0 ) = 0 4 = 4 and f ( 0 ) = 0 2 = 0 . The quotient g / f requires dividing by f ( 0 ) = 0 :

g ( 0 ) f ( 0 ) = 4 0 ,

which is undefined. So ( g / f ) ( 0 ) does not exist; the input 0 is excluded from the domain of g / f .

(e) f ( 4 ) = 16 and g ( 4 ) = 4 4 = 0 . Again the denominator is zero, so

( f g ) ( 4 ) = 16 0

does not exist.

The lesson from (d) and (e). For a quotient, always evaluate the denominator function first and check that it is not zero. Both f and g here have domain , yet f / g is undefined at 4 and g / f is undefined at 0 — the exclusions come from the operation, not from the ingredients.

Exercise 3.

Let f ( x ) = x + 1 and g ( x ) = 4 x . Find the domain of f + g , of f g , of f / g and of g / f .

Answer

f + g and f g : [ 1 , 4 ] ;   f / g : [ 1 , 4 ) ;   g / f : ( 1 , 4 ] .

Solution

Domain of f . A square root needs a nonnegative quantity underneath:

x + 1 0 x 1 , Dom ( f ) = [ 1 , ) .

Domain of g .

4 x 0 4 x x 4 , Dom ( g ) = ( , 4 ] .

Take care when solving 4 x 0 : adding x to both sides gives 4 x , which is the same as x 4 .

The common domain. A number must satisfy both conditions:

Dom ( f ) Dom ( g ) = { x : x 1  and  x 4 } = [ 1 , 4 ] . TikZ figure

f + g and f g . For sums, differences and products the domain is exactly the common part:

Dom ( f + g ) = Dom ( f g ) = [ 1 , 4 ] .

f / g . Start from [ 1 , 4 ] and remove the points where the denominator g is zero:

4 x = 0 4 x = 0 x = 4.

So 4 must go, and

Dom ( f / g ) = [ 1 , 4 ) .

g / f . Now the denominator is f , and

x + 1 = 0 x + 1 = 0 x = 1.

So 1 must go, and

Dom ( g / f ) = ( 1 , 4 ] .

Check. At x = 4 : g ( 4 ) = 0 = 0 , so f ( 4 ) / g ( 4 ) = 5 / 0 is undefined ✓, while g ( 4 ) / f ( 4 ) = 0 / 5 = 0 is a perfectly good value ✓. A zero in the numerator is harmless; only a zero in the denominator removes a point.

Exercise 4.

Let f ( x ) = 1 x and g ( x ) = 1 x 2 . Write ( f + g ) ( x ) as a single fraction and state its domain.

Answer

( f + g ) ( x ) = 2 x 2 x ( x 2 ) , with domain { 0 , 2 } .

Solution

Domains of the ingredients.

Dom ( f ) = { 0 } , Dom ( g ) = { 2 } .

A number is allowed for the sum only if it is allowed for both, so

Dom ( f + g ) = { 0 , 2 } .

Combining the fractions. The two denominators are x and x 2 ; they share no common factor, so the least common denominator is their product x ( x 2 ) . Rewrite each fraction with that denominator:

1 x = 1 ( x 2 ) x ( x 2 ) = x 2 x ( x 2 ) , 1 x 2 = 1 x x ( x 2 ) = x x ( x 2 ) .

Now add the numerators over the common denominator:

( f + g ) ( x ) = ( x 2 ) + x x ( x 2 ) = 2 x 2 x ( x 2 ) .

If you prefer the denominator expanded, x ( x 2 ) = x 2 2 x .

A warning about the domain. The single fraction 2 x 2 x ( x 2 ) happens to have exactly the same forbidden inputs, 0 and 2 . But that is a lucky feature of this example, not a rule: the domain of f + g is decided by the domains of f and g before any algebra, and it must be stated from there.

Check. Take x = 1 . Directly: f ( 1 ) + g ( 1 ) = 1 1 + 1 1 = 1 1 = 0 . From the single fraction: 2 2 1 ( 1 2 ) = 0 1 = 0 ✓.

Take x = 4 . Directly: 1 4 + 1 2 = 1 4 + 2 4 = 3 4 . From the fraction: 8 2 4 2 = 6 8 = 3 4 ✓.

Exercise 5.

Let f ( x ) = x 2 1 and g ( x ) = x + 1 . Find ( f / g ) ( x ) and its domain. Is the function f / g equal to the function h ( x ) = x 1 , whose domain is ?

Answer

( f / g ) ( x ) = x 1 for x 1 , with domain { 1 } . It is not equal to h , because the domains differ.

Solution

The domain first. Both f and g are polynomials, so both have domain and the common domain is . For the quotient we must remove the zeros of the denominator:

x + 1 = 0 x = 1.

Hence

Dom ( f / g ) = { 1 } .

The formula. Factor the numerator by the difference-of-squares formula:

( f g ) ( x ) = x 2 1 x + 1 = ( x 1 ) ( x + 1 ) x + 1 .

For x 1 the factor x + 1 is not zero, so it may be cancelled:

( f g ) ( x ) = x 1 ( x 1 ) .

Is f / g equal to h ? Two functions are equal only if they have the same domain and the same values. The values do agree wherever both are defined. But

Dom ( f / g ) = { 1 } , Dom ( h ) = ,

and 1 belongs to the second but not the first. So the two functions are not equal.

The picture. The graph of h is the whole line y = x 1 ; the graph of f / g is that line with a hole at ( 1 , 2 ) .

Why the hole is real. At x = 1 the original quotient reads ( 1 ) 2 1 1 + 1 = 0 0 , which is not a number. Cancelling a factor can never legalise an input that was forbidden before the cancellation.

Exercise 6.

Suppose ( f + g ) ( x ) = 3 x 2 + 2 x 1 and f ( x ) = x 2 x + 4 . Find g ( x ) .

Answer

g ( x ) = 2 x 2 + 3 x 5

Solution

By definition ( f + g ) ( x ) = f ( x ) + g ( x ) , so

f ( x ) + g ( x ) = 3 x 2 + 2 x 1.

Subtract f ( x ) from both sides:

g ( x ) = ( 3 x 2 + 2 x 1 ) ( x 2 x + 4 ) .

Distribute the minus sign over every term of the second bracket:

( x 2 x + 4 ) = x 2 + x 4.

Now combine like terms:

g ( x ) = 3 x 2 + 2 x 1 x 2 + x 4.

x 2 -terms: 3 x 2 x 2 = 2 x 2 .
x -terms: 2 x + x = 3 x .
constants: 1 4 = 5 .

g ( x ) = 2 x 2 + 3 x 5.

Check. Add f and the answer:

( x 2 x + 4 ) + ( 2 x 2 + 3 x 5 ) = 3 x 2 + 2 x 1.

The x -terms give x + 3 x = 2 x and the constants give 4 5 = 1 , matching the given sum exactly.

Exercise 7.

The graphs of two functions f and g , both with domain , are shown.

TikZ figure

Here f ( x ) = x and g ( x ) = 3 x . Find ( f + g ) ( 1 ) , ( f g ) ( 2 ) and ( f g ) ( 0 ) , then describe the graph of f + g .

Answer

( f + g ) ( 1 ) = 3 , ( f g ) ( 2 ) = 1 , ( f g ) ( 0 ) = 0 . The graph of f + g is the horizontal line y = 3 .

Solution

Read the two values off the formulas (or off the picture) and then combine.

( f + g ) ( 1 ) . f ( 1 ) = 1 and g ( 1 ) = 3 1 = 2 , so

( f + g ) ( 1 ) = 1 + 2 = 3.

Geometrically: stack the height of f above x = 1 on top of the height of g above x = 1 .

( f g ) ( 2 ) . f ( 2 ) = 2 and g ( 2 ) = 3 2 = 1 , so

( f g ) ( 2 ) = 2 1 = 1.

( f g ) ( 0 ) . f ( 0 ) = 0 and g ( 0 ) = 3 0 = 3 , so

( f g ) ( 0 ) = 0 3 = 0.

Notice that a product is zero whenever either factor is zero, so the graph of f g meets the x -axis at x = 0 (a zero of f ) and at x = 3 (a zero of g ).

The graph of f + g . Add the formulas:

( f + g ) ( x ) = x + ( 3 x ) = 3.

The x -terms cancel, so f + g is the constant function 3 , whose graph is the horizontal line y = 3 . Its domain is , since both f and g are defined everywhere.

This is visible in the picture: as x increases, f rises exactly as fast as g falls, so their heights always total 3 . Check a few: at x = 0 , 0 + 3 = 3 ; at x = 1 , 1 + 2 = 3 ; at x = 3 , 3 + 0 = 3 ✓.

Exercise 8.

Let f ( x ) = x and g ( x ) = | x | . Find a piecewise formula for ( f + g ) ( x ) and sketch its graph.

Answer

(f+g)(x) = \begin{cases} 2x & \text{if } x \geq 0 \\ 0 & \text{if } x < 0 \end{cases}

Solution

Domain. Both formulas are defined for every real number, so Dom ( f + g ) = .

The formula. By definition,

( f + g ) ( x ) = f ( x ) + g ( x ) = x + | x | .

Now replace | x | by its two-case definition.

If x 0 : then | x | = x , so

( f + g ) ( x ) = x + x = 2 x .

If x < 0 : then | x | = x , so

( f + g ) ( x ) = x + ( x ) = 0.

Hence

(f+g)(x) = \begin{cases} 2x & \text{if } x \geq 0 \\ 0 & \text{if } x < 0. \end{cases}TikZ figure

Reading the picture. For x 0 the two graphs coincide, so adding them doubles the height. For x < 0 the graph of f is exactly as far below the axis as the graph of g is above it, so the heights cancel and the sum sits on the axis.

Check. x = 3 : 3 + | 3 | = 3 + 3 = 6 , and the formula gives 2 ( 3 ) = 6 ✓. x = 3 : 3 + | 3 | = 3 + 3 = 0 , and the formula gives 0 ✓. x = 0 : 0 + 0 = 0 , and the first line gives 2 ( 0 ) = 0 ✓, so the two pieces meet without a break.

Exercise 9.

Decide in each case whether the two functions are equal.

(a) h 1 ( x ) = 2 x x + 2 and h 2 ( x ) = ( 2 x ) ( x + 2 )
(b) u 1 ( x ) = x 3 x + 1 and u 2 ( x ) = ( x 3 ) ( x + 1 )

Answer

(a) Equal; both have domain [ 2 , 2 ] .   (b) Not equal: Dom ( u 1 ) = [ 3 , ) but Dom ( u 2 ) = ( , 1 ] [ 3 , ) .

Solution

(a) Domain of h 1 . This is a product of two square roots, so both quantities under the roots must be nonnegative:

2 x 0 x 2 , x + 2 0 x 2.

Both conditions together give 2 x 2 , so Dom ( h 1 ) = [ 2 , 2 ] .

Domain of h 2 . Here only the product has to be nonnegative:

( 2 x ) ( x + 2 ) 0.

The factors are zero at x = 2 and x = 2 . Test one value in each of the three resulting stretches:

x = 3 : ( 2 ( 3 ) ) ( 3 + 2 ) = ( 5 ) ( 1 ) = 5 < 0 .
x = 0 : ( 2 ) ( 2 ) = 4 > 0 .
x = 3 : ( 1 ) ( 5 ) = 5 < 0 .

TikZ figure

So the product is nonnegative exactly on [ 2 , 2 ] , and Dom ( h 2 ) = [ 2 , 2 ] too.

Values. On [ 2 , 2 ] both 2 x and x + 2 are nonnegative, and for nonnegative a and b we have a b = a b . So the two formulas agree at every point of the common domain.

Same domain and same values, so h 1 and h 2 are equal.

(b) Domain of u 1 . Both radicands must be nonnegative:

x 3 0 x 3 , x + 1 0 x 1.

Both hold exactly when x 3 , so Dom ( u 1 ) = [ 3 , ) .

Domain of u 2 . Only the product must be nonnegative:

( x 3 ) ( x + 1 ) 0.

The factors vanish at x = 3 and x = 1 . Testing:

x = 2 : ( 5 ) ( 1 ) = 5 > 0 .
x = 0 : ( 3 ) ( 1 ) = 3 < 0 .
x = 4 : ( 1 ) ( 5 ) = 5 > 0 .

So Dom ( u 2 ) = ( , 1 ] [ 3 , ) .

Conclusion. The number 2 belongs to Dom ( u 2 ) but not to Dom ( u 1 ) : indeed u 2 ( 2 ) = 5 , whereas u 1 ( 2 ) would require 5 , which is not a real number. The domains differ, so u 1 and u 2 are not equal.

The moral. Two negative factors have a positive product. So a b can be a real number in situations where a and b separately are not. The rule a b = a b needs a 0 and b 0 .

Exercise 10.

Let f ( x ) = x + 5 and g ( x ) = x 2 4 x + 3 . Find ( f / g ) ( x ) and its domain, and find ( g / f ) ( x ) and its domain.

Answer

( f / g ) ( x ) = x + 5 x 2 4 x + 3 with domain { 1 , 3 } ;   ( g / f ) ( x ) = x 2 4 x + 3 x + 5 with domain { 5 } .

Solution

Both f and g are polynomials, so each has domain and the common domain is . Only the zeros of whichever function sits in the denominator need to be removed.

f / g . The formula is

( f g ) ( x ) = x + 5 x 2 4 x + 3 .

Find the zeros of g . Factor the quadratic: we need two numbers with product 3 and sum 4 , namely 1 and 3 :

x 2 4 x + 3 = ( x 1 ) ( x 3 ) .

A product is zero exactly when a factor is zero, so g ( x ) = 0 at x = 1 and x = 3 . Hence

Dom ( f / g ) = { 1 , 3 } .

g / f . The formula is

( g f ) ( x ) = x 2 4 x + 3 x + 5 .

Now the denominator is f , and

x + 5 = 0 x = 5.

Hence

Dom ( g / f ) = { 5 } .

Check. At x = 1 : g ( 1 ) = 1 4 + 3 = 0 , so f ( 1 ) / g ( 1 ) = 6 / 0 is undefined ✓, whereas g ( 1 ) / f ( 1 ) = 0 / 6 = 0 is fine ✓. At x = 5 : f ( 5 ) = 0 , so g ( 5 ) / f ( 5 ) is undefined ✓, while f ( 5 ) / g ( 5 ) = 0 / 48 = 0 is fine ✓.

The general point. Dom ( f / g ) and Dom ( g / f ) are usually different sets. Swapping numerator and denominator swaps which zeros must be excluded.

Exercise 11.

A workshop's cost of making x chairs, in dollars, is C ( x ) = 45 x + 2000 , and its revenue from selling them is R ( x ) = 85 x .

(a) Write the profit function P = R C .
(b) Find P ( 30 ) and P ( 80 ) , and say what each means.
(c) How many chairs must be sold for the profit to be zero?

Answer

(a) P ( x ) = 40 x 2000   (b) P ( 30 ) = 800 (a loss of $800), P ( 80 ) = 1200 (a profit of $1200)   (c) 50 chairs

Solution

(a) By the definition of a difference of functions,

P ( x ) = ( R C ) ( x ) = R ( x ) C ( x ) = 85 x ( 45 x + 2000 ) .

Distribute the minus sign over both terms of the bracket:

P ( x ) = 85 x 45 x 2000 = 40 x 2000.

The number 40 is the profit per chair (each chair sells for $85 and costs $45 to make), and 2000 is the fixed cost that has to be covered whatever happens.

(b)

P ( 30 ) = 40 ( 30 ) 2000 = 1200 2000 = 800.

A negative profit is a loss: selling only 30 chairs leaves the workshop $800 short, because the $1200 earned above cost does not cover the $2000 of fixed costs.

P ( 80 ) = 40 ( 80 ) 2000 = 3200 2000 = 1200.

Selling 80 chairs yields a profit of $1200.

(c) Set P ( x ) = 0 :

40 x 2000 = 0.

Add 2000 to both sides:

40 x = 2000.

Divide both sides by 40 :

x = 50.

So 50 chairs must be sold to break even.

Check. At x = 50 : R ( 50 ) = 85 ( 50 ) = 4250 and C ( 50 ) = 45 ( 50 ) + 2000 = 2250 + 2000 = 4250 . Revenue equals cost, so the profit is indeed 0 ✓.

A remark on the domain. Only whole, nonnegative numbers of chairs make sense, so in practice we would use the formula for x = 0 , 1 , 2 , even though the algebraic expression 40 x 2000 is defined for every real x .

Exercise 12.

Let f ( x ) = x and g ( x ) = x 1 . A student says that the domain of f / g is { 1 } , "because the only problem is division by zero". Find the error and give the correct domain.

Answer

The correct domain is [ 0 , 1 ) ( 1 , ) .

Solution

What the definition requires. The domain of f / g is

Dom ( f ) Dom ( g ) { x : g ( x ) 0 } .

There are three conditions, and the student checked only the third.

Condition 1: x must be in Dom ( f ) . Since f ( x ) = x requires a nonnegative radicand,

Dom ( f ) = [ 0 , ) .

This is what the student missed: numbers like 4 are excluded because 4 is not a real number, quite apart from any division.

Condition 2: x must be in Dom ( g ) . Since g is a polynomial, Dom ( g ) = , so this condition excludes nothing.

Condition 3: g ( x ) 0 .

x 1 = 0 x = 1 ,

so 1 must be removed.

Putting the three together.

Dom ( f / g ) = [ 0 , ) { x : x 1 } = [ 0 , 1 ) ( 1 , ) .

Check. At x = 4 the student's answer would allow the input, but

f ( 4 ) g ( 4 ) = 4 5

has no meaning, since 4 is not a real number. At x = 0 : 0 1 = 0 1 = 0 , a perfectly good value, so 0 correctly belongs to the domain — a zero in the numerator causes no trouble.

The habit to build. Before worrying about the operation, list the domains of the ingredients. The operation can only take points away, never add them back.

Exercise 13.

Is the statement " Dom ( f g ) = Dom ( f / g ) " always, sometimes, or never true? Justify your answer.

Answer

Sometimes true: the two domains agree exactly when g has no zeros in Dom ( f ) Dom ( g ) .

Solution

Write D = Dom ( f ) Dom ( g ) . By the definitions,

Dom ( f g ) = D , Dom ( f / g ) = D { x : g ( x ) 0 } .

So the second set is the first with the zeros of g removed. The two are equal exactly when there are no such zeros to remove.

A case where they are equal. Let f ( x ) = x and g ( x ) = x 2 + 1 . Here D = , and g ( x ) = x 2 + 1 1 > 0 for every real x , so g is never zero. Then

Dom ( f g ) = = Dom ( f / g ) .

A case where they are not equal. Let f ( x ) = 1 and g ( x ) = x 4 . Again D = , and g ( 4 ) = 0 . Then

Dom ( f g ) = , Dom ( f / g ) = { 4 } ,

and these are different sets.

Conclusion. Both situations occur, so the statement is sometimes true.

One direction is always true. Whatever f and g are, Dom ( f / g ) is contained in Dom ( f g ) , since dividing can only impose an extra requirement. The quotient's domain is never larger.

Exercise 14.

Find functions f and g , each with domain , such that the domain of f / g is { 2 } and the domain of g / f is .

Answer

For example f ( x ) = 1 and g ( x ) = x 2 . Many other answers work.

Solution

Work out what each requirement forces.

Requirement 1: Dom ( f ) = Dom ( g ) = . Choosing both to be polynomials guarantees this, since a polynomial can be evaluated at every real number. So D = Dom ( f ) Dom ( g ) = .

Requirement 2: Dom ( f / g ) = { 2 } . Since Dom ( f / g ) = D with the zeros of g removed, we need g to be zero at x = 2 and nowhere else. The simplest such polynomial is

g ( x ) = x 2 ,

which is zero exactly when x = 2 .

Requirement 3: Dom ( g / f ) = . Here the denominator is f , and nothing is to be removed, so f must have no zeros at all. The simplest such choice is the constant

f ( x ) = 1 ,

which is never zero.

Verification.

( f g ) ( x ) = 1 x 2 , Dom = { 2 } . ( g f ) ( x ) = x 2 1 = x 2 , Dom = .

Other correct answers. Any f with no real zeros and any g vanishing only at 2 will do — for instance f ( x ) = x 2 + 5 together with g ( x ) = 3 x 6 , or f ( x ) = 7 together with g ( x ) = ( x 2 ) 3 . What is not allowed is a choice like g ( x ) = x 2 4 , which is zero at 2 as well and would give the domain { 2 , 2 } .

Frequently Asked Questions

Why does the domain of f/g exclude points where g(x) = 0?

Division by zero is undefined. Even if x is in both Dom ( f ) and Dom ( g ) , if g ( x ) = 0 at that point, the quotient f ( x ) / g ( x ) does not exist. We must exclude those points from the domain of f / g .


Can the domain of f + g be larger than the domain of either f or g?

No. The domain of f + g is a subset of each individual domain. It is the intersection, which is at most as large as either factor and often smaller.


What does graphical addition mean?

Graphical addition of f and g means: at each x -value in the common domain, stack the y -value of f on top of the y -value of g to get the y -value of f + g . This can be done visually with a ruler.


Is a b always equal to a b ?

Only when both a 0 and b 0 . If one is negative, a or b is not real, but a b might be (when both are negative, their product is positive). This is why the domains of f g and f g can differ.