Natural Domain and Range of a Function

The natural domain of a function is the largest set of real numbers for which the function is defined. Finding the domain requires identifying restrictions such as division by zero or square roots of negative numbers. The range is the set of all values the function actually outputs.

Quick Reference

Restriction Rule Example
Division by zero Exclude values where denominator = 0 f ( x ) = 1 x : exclude x = 0
Even root of negative Exclude values where radicand < 0 f ( x ) = x : require x 0
Odd root No restriction f ( x ) = x 3 : domain is
Polynomial No restriction f ( x ) = x 2 4 x : domain is
Exponential a x , a > 0 No restriction f ( x ) = 2 x : domain is

What Is the Natural Domain?

We say a function y = f ( x ) is defined for x = a when f ( a ) is a real number. When the domain is not specified, it is assumed to be the natural domain: the largest set of real numbers for which f ( x ) is real.

Definition 1.

The set of all real numbers for which f ( x ) is real is called the natural domain (or simply the domain) of the function, denoted Dom ( f ) .

Key rules that determine when a function is defined:

  1. f ( x ) = x m for positive integer m : defined for every real x .
  2. f ( x ) = 1 x : defined for every x 0 (division by zero is undefined).
  3. f ( x ) = x : defined for x 0 (square roots of negative numbers are not real).
  4. f ( x ) = x n for even integer n : defined for x 0 .
  5. f ( x ) = x m for odd integer m : defined for every real x .
  6. f ( x ) = a x for constant a > 0 : defined for every real x .

If you want to restrict the domain beyond the natural domain, you must say so explicitly. For example, writing " f ( x ) = x 2 ,   x > 0 " restricts f to positive inputs. Without that restriction, the domain is all of .

Finding Natural Domains

Example 1.


Determine the natural domains of the following functions:

  1. f ( x ) = x 2 4 x
  2. g ( x ) = x 1
  3. h ( x ) = 2 x
  4. F ( x ) = x 2 6 x
  5. G ( x ) = 4 x 2
  6. H ( x ) = x 1 + 2 x
  7. u ( x ) = 1 x 2 3 x
Solution

(a) f ( x ) = x 2 4 x is a polynomial, so it is real for all x :

Dom ( f ) = ( , ) = .

(b) x 1 is real when x 1 0 , i.e., x 1 :

Dom ( g ) = [ 1 , ) .

(c) 2 x is real when 2 x 0 , i.e., x 2 :

Dom ( h ) = ( , 2 ] .

(d) We need x 2 6 x 0 . Factoring: x ( x 6 ) 0 . From a sign diagram, this product is nonnegative when x 0 or x 6 :

A sign chart for the domain of F(x) = √(x² - 6x) showing the interval between 0 and 6 is negative.
Sign diagram for x ( x 6 ) .
Dom ( F ) = ( , 0 ] [ 6 , ) .

(e) We need 4 x 2 = ( 2 x ) ( 2 + x ) 0 . From a sign diagram, this holds when 2 x 2 :

A sign chart for the domain of G(x) = √(4 - x²) showing the interval [-2, 2] is nonnegative.
Sign diagram for ( 2 x ) ( 2 + x ) .
Dom ( G ) = [ 2 , 2 ] .

(f) x 1 requires x 1 and 2 x requires x 2 . Both must hold simultaneously:

Dom ( H ) = [ 1 , 2 ] .

(g) u ( x ) = 1 x ( x 3 ) is undefined where x = 0 or x = 3 :

Dom ( u ) = ( , 0 ) ( 0 , 3 ) ( 3 , ) = { 0 , 3 } .

The Range of a Function

The range of a function f : A B is the set of all values actually taken by the function:

Rng ( f ) = { f ( x ) x A } .

The range is always a subset of the codomain: Rng ( f ) B .

Example 2.

Let f : and f ( x ) = x 2 . Find the range of f .

Solution

The range consists of all possible outputs. Any y 0 is a possible output because we can set x = y to get f ( x ) = y . No y < 0 is in the range because x 2 0 for all real x . Therefore:

Rng ( f ) = [ 0 , ) .

Finding the range is generally harder than finding the domain. In elementary calculus, powerful methods (derivatives, monotonicity) make it easier to determine ranges precisely. For now, sketching the graph is the most reliable approach.

Exercises

Exercise 1.

Find the natural domain of each function.

(a) f ( x ) = 3 x 3 2 x + 7   (b) g ( x ) = 1 x 4   (c) h ( x ) = x + 5   (d) k ( x ) = 3 2 x

Answer

(a)   (b) { 4 }   (c) [ 5 , )   (d) ( , 3 2 ]

Solution

(a) This is a polynomial. Every term is a whole-number power of x multiplied by a number, and such expressions can be evaluated for any real x : there is no division and no root. Hence

Dom ( f ) = ( , ) = .

(b) The only danger is division by zero. Set the denominator equal to zero:

x 4 = 0 x = 4.

Every other real number is allowed, so

Dom ( g ) = { 4 } = ( , 4 ) ( 4 , ) .

(c) A square root is real only when what is under it is not negative. Require

x + 5 0.

Subtract 5 from both sides:

x 5.

Hence Dom ( h ) = [ 5 , ) . The endpoint 5 is included, because 0 = 0 is a perfectly good real number.

(d) Require the radicand to be nonnegative:

3 2 x 0.

Subtract 3 from both sides:

2 x 3.

Divide both sides by 2 . Dividing an inequality by a negative number reverses the direction of the inequality sign:

x 3 2 .

Hence Dom ( k ) = ( , 3 2 ] .

Forgetting to flip the inequality in (d) is the single most common error in this kind of problem.

Check. For (d), test x = 0 : 3 0 = 3 , real, and indeed 0 3 2 . Test x = 2 : 3 4 = 1 , not real, and indeed 2 > 3 2 .

Exercise 2.

Find the natural domain of each function.

(a) f ( x ) = 1 x 2 9   (b) g ( x ) = x x 2 + 1   (c) h ( x ) = x + 2 x 2 5 x + 6

Answer

(a) { 3 , 3 }   (b)   (c) { 2 , 3 }

Solution

For a quotient, the rule is always the same: find where the denominator is zero and exclude exactly those numbers. The numerator causes no trouble at all; a zero numerator simply produces the output 0 .

(a) Set the denominator to zero:

x 2 9 = 0.

Factor as a difference of two squares:

( x 3 ) ( x + 3 ) = 0.

By the Zero-Product Property, x 3 = 0 or x + 3 = 0 , giving x = 3 or x = 3 . Therefore

Dom ( f ) = { 3 , 3 } = ( , 3 ) ( 3 , 3 ) ( 3 , ) .

(b) Set the denominator to zero:

x 2 + 1 = 0 x 2 = 1.

No real number has a negative square, so the denominator is never zero. Hence

Dom ( g ) = .

(c) Set the denominator to zero:

x 2 5 x + 6 = 0.

We need two numbers whose product is 6 and whose sum is 5 ; these are 2 and 3 . So

( x 2 ) ( x 3 ) = 0 ,

giving x = 2 or x = 3 . Therefore

Dom ( h ) = { 2 , 3 } .

Do not be tempted to cancel anything in (c): the numerator x + 2 shares no factor with the denominator, and even if it did, the excluded values would stay excluded.

Check. In (a), f ( 3 ) = 1 9 9 = 1 0 , undefined — correctly excluded; and f ( 0 ) = 1 9 = 1 9 , perfectly fine.

Exercise 3.

Find the natural domain of F ( x ) = x 2 4 .

Answer

( , 2 ] [ 2 , )

Solution

Step 1: write down the requirement. The square root is real only when the radicand is not negative:

x 2 4 0.

Step 2: factor. This is a difference of two squares:

( x 2 ) ( x + 2 ) 0.

Step 3: find where each factor changes sign. The factor x 2 is zero at x = 2 ; the factor x + 2 is zero at x = 2 . These two numbers cut the number line into three pieces.

Step 4: test one number from each piece.

  • Take x = 3 (left piece): ( 3 2 ) ( 3 + 2 ) = ( 5 ) ( 1 ) = 5 > 0 . ✔
  • Take x = 0 (middle piece): ( 0 2 ) ( 0 + 2 ) = ( 2 ) ( 2 ) = 4 < 0 . ✘
  • Take x = 3 (right piece): ( 3 2 ) ( 3 + 2 ) = ( 1 ) ( 5 ) = 5 > 0 . ✔
TikZ figure

Step 5: collect the answer. The product is positive on the two outer pieces and equals 0 at x = 2 and x = 2 , both of which are allowed since 0 = 0 . Hence

Dom ( F ) = ( , 2 ]     [ 2 , ) .

Check. F ( 2 ) = 4 4 = 0 and F ( 3 ) = 9 4 = 5 , both real. But F ( 1 ) = 1 4 = 3 is not a real number, and 1 lies in the excluded middle piece, as it should.

A common error is to "take the square root of both sides" of x 2 4 and write x 2 , losing the whole left-hand piece. The sign diagram avoids that.

Exercise 4.

Find the natural domain of G ( x ) = 5 x x 2 .

Answer

[ 0 , 5 ]

Solution

Step 1: the requirement.

5 x x 2 0.

Step 2: factor. Both terms contain x , so by the distributive property

x ( 5 x ) 0.

Step 3: locate the sign changes. The factor x is zero at x = 0 ; the factor 5 x is zero at x = 5 .

Step 4: test a point in each piece.

  • x = 1 : ( 1 ) ( 5 ( 1 ) ) = ( 1 ) ( 6 ) = 6 < 0 . ✘
  • x = 1 : ( 1 ) ( 5 1 ) = 4 > 0 . ✔
  • x = 6 : ( 6 ) ( 5 6 ) = ( 6 ) ( 1 ) = 6 < 0 . ✘
TikZ figure

Step 5: the answer. The expression is positive between 0 and 5 and equals 0 at the two endpoints, which are allowed. Hence

Dom ( G ) = [ 0 , 5 ] .

Notice the contrast with the previous exercise: there the allowed set was the two outer pieces, here it is the middle piece. Which happens depends on the signs, so the test-point step must actually be carried out rather than guessed.

Check. G ( 0 ) = 0 = 0 , G ( 4 ) = 20 16 = 2 , both real; G ( 6 ) = 30 36 = 6 , not real.

Exercise 5.

Find the natural domain of each function, and explain why the two answers differ.

(a) f ( x ) = x 3   (b) g ( x ) = 1 x 3

Answer

(a) [ 3 , )   (b) ( 3 , )

Solution

(a) The only requirement is that the radicand be nonnegative:

x 3 0 x 3.

So Dom ( f ) = [ 3 , ) , with 3 included because f ( 3 ) = 0 = 0 is a real number.

(b) Now there are two requirements, and both must hold.

From the square root: x 3 0 , that is x 3 .

From the fraction: the denominator must not be zero, so x 3 0 . Since a square root is zero only when its radicand is zero, this says x 3 0 , that is x 3 .

Putting the two together, x 3 and x 3 , which leaves

x > 3 , Dom ( g ) = ( 3 , ) .

Why they differ. At x = 3 the number x 3 equals 0 . That is a fine output for f , but a fatal denominator for g , since g ( 3 ) would be 1 0 . So the single point 3 belongs to the domain of f but not to that of g .

Check. f ( 3 ) = 0 , defined; g ( 3 ) = 1 0 , undefined. And g ( 4 ) = 1 1 = 1 , defined, as expected since 4 > 3 .

Exercise 6.

Find the natural domain of h ( x ) = x + 4 x 1 .

Answer

[ 4 , 1 ) ( 1 , )

Solution

Two separate restrictions must be satisfied at the same time.

Restriction from the square root. The radicand must be nonnegative:

x + 4 0 x 4.

Restriction from the denominator. The denominator must not be zero:

x 1 0 x 1.

Combining them. We need x 4 and x 1 . Starting from the ray x 4 and removing the single point 1 leaves two pieces:

Dom ( h ) = [ 4 , 1 ) ( 1 , ) . TikZ figure

The filled dot at 4 marks a point that belongs to the domain; the hollow dot at 1 marks a point that has been removed.

Check. h ( 4 ) = 0 5 = 0 , defined. h ( 1 ) = 5 0 , undefined. h ( 5 ) = 1 6 , not real. All three agree with the answer.

A frequent mistake is to stop after handling one of the two restrictions. Deal with every square root and every denominator in the formula, then take the values that satisfy all conditions at once.

Exercise 7.

Find the natural domain of u ( x ) = x 1 + 5 x .

Answer

[ 1 , 5 ]

Solution

For the sum to be a real number, both square roots must be real. Each one contributes a condition.

From x 1 :

x 1 0 x 1.

From 5 x :

5 x 0.

Add x to both sides:

5 x , that is x 5.

Both at once. We need x 1 and x 5 , which is the set of x between 1 and 5 inclusive:

Dom ( u ) = [ 1 , 5 ] . TikZ figure

Check. u ( 1 ) = 0 + 4 = 0 + 2 = 2 , real. u ( 5 ) = 4 + 0 = 2 , real. u ( 0 ) = 1 + 5 is not real, and u ( 6 ) = 5 + 1 is not real either — so both endpoints of the interval are genuinely where the domain stops.

The key word is and. When several restrictions appear, the domain is the set of numbers meeting all of them, never the set meeting at least one of them.

Exercise 8.

Find the natural domain of each function and explain the difference.

(a) f ( x ) = x 1 4   (b) g ( x ) = x 1 3

Answer

(a) [ 1 , )   (b)

Solution

(a) The index 4 is even. An even root of a negative number is not real, for the same reason a square root is not: any real number raised to an even power is nonnegative, so nothing raised to the fourth power can give a negative result. Therefore we require

x 1 0 x 1 ,

giving Dom ( f ) = [ 1 , ) .

(b) The index 3 is odd. An odd power of a negative number is negative, so negative numbers do have real cube roots. For example 8 3 = 2 , because ( 2 ) 3 = 8 . There is no restriction at all:

Dom ( g ) = .

The difference in one sentence. Even roots need a nonnegative radicand; odd roots accept anything.

Check. f ( 0 ) = 1 4 : is there a real number t with t 4 = 1 ? No, since t 4 0 always. So 0 is correctly excluded from Dom ( f ) . Meanwhile g ( 0 ) = 1 3 = 1 , since ( 1 ) 3 = 1 , so 0 is correctly included in Dom ( g ) .

Exercise 9.

Find the natural domain of v ( x ) = 1 x 2 .

Answer

[ 0 , 4 ) ( 4 , )

Solution

Again there are two conditions.

Condition 1: the square root must be real. We need

x 0.

Condition 2: the denominator must not be zero. We need

x 2 0.

To see which x this excludes, solve the corresponding equation:

x 2 = 0 x = 2.

Square both sides:

x = 4.

Squaring can introduce false solutions, so verify: 4 2 = 2 2 = 0 . Yes, x = 4 really does make the denominator zero, so it must be excluded.

Combining. We need x 0 and x 4 :

Dom ( v ) = [ 0 , 4 ) ( 4 , ) .

Check. v ( 0 ) = 1 0 2 = 1 2 , defined. v ( 4 ) = 1 0 , undefined. v ( 9 ) = 1 3 2 = 1 , defined. v ( 1 ) involves 1 , not real. All as predicted.

A tempting shortcut is to say "exclude x = 2 " by looking at the 2 in the formula. That is wrong: the denominator vanishes when x = 2 , not when x = 2 . Always solve the equation rather than reading off a number.

Exercise 10.

Find the range of each function, taking the natural domain in each case.

(a) f ( x ) = x 2 5   (b) g ( x ) = x + 2   (c) h ( x ) = | x | 3

Answer

(a) [ 5 , )   (b) [ 2 , )   (c) [ 3 , )

Solution

In each part we argue twice: first that no output can be smaller than a certain number, then that every number from there upward really is an output.

(a) f ( x ) = x 2 5 .

Lower bound. For every real x we have x 2 0 . Subtracting 5 from both sides of that inequality,

x 2 5 5 ,

so no output is below 5 .

Every such value is attained. Let y 5 . Solve x 2 5 = y : adding 5 gives x 2 = y + 5 , and y + 5 0 , so we may take x = y + 5 . Then

f ( y + 5 ) = ( y + 5 ) 2 5 = ( y + 5 ) 5 = y .

Hence Rng ( f ) = [ 5 , ) .

(b) g ( x ) = x + 2 . The domain is x 0 .

Lower bound. For x 0 the value x is nonnegative, so x 0 and therefore

x + 2 2.

Every such value is attained. Let y 2 . Solve x + 2 = y : subtracting 2 gives x = y 2 , which is 0 , so squaring gives x = ( y 2 ) 2 , a legitimate input since it is 0 . Then g ( x ) = ( y 2 ) 2 + 2 = ( y 2 ) + 2 = y .

Hence Rng ( g ) = [ 2 , ) .

(c) h ( x ) = | x | 3 .

Lower bound. An absolute value is never negative: | x | 0 for every real x . Subtracting 3 ,

| x | 3 3.

Every such value is attained. Let y 3 . Take x = y + 3 , which is 0 , so | x | = y + 3 and

h ( y + 3 ) = ( y + 3 ) 3 = y .

Hence Rng ( h ) = [ 3 , ) .

Check. f ( 0 ) = 5 , the smallest value of (a); g ( 0 ) = 2 , the smallest value of (b); h ( 0 ) = 3 , the smallest value of (c). And, for instance, f ( 4 ) = 11 , g ( 9 ) = 5 , h ( 10 ) = 7 , all in the stated ranges.

Exercise 11.

Find the range of f ( x ) = 3 x 2 .

Answer

( , 3 ]

Solution

Upper bound. For every real x we have x 2 0 . Multiplying both sides of this inequality by 1 reverses the inequality sign:

x 2 0.

Adding 3 to both sides,

3 x 2 3.

So no output exceeds 3 .

Every value 3 is attained. Let y 3 . Solve

3 x 2 = y .

Subtract 3 : x 2 = y 3 . Multiply by 1 : x 2 = 3 y . Since y 3 , the number 3 y is nonnegative, so it has a square root. Take x = 3 y . Then

f ( 3 y ) = 3 ( 3 y ) 2 = 3 ( 3 y ) = y .

Conclusion.

Rng ( f ) = ( , 3 ] .

Check. f ( 0 ) = 3 , the largest value. f ( 2 ) = 3 4 = 1 , which is 3 . To get the output 6 , take x = 3 ( 6 ) = 9 = 3 , and indeed f ( 3 ) = 3 9 = 6 .

The dangerous step is multiplying the inequality by 1 . Writing x 2 0 would give the wrong range [ 3 , ) ; the sign must be flipped.

Exercise 12.

Find the natural domain and the range of G ( x ) = 4 x 2 .

Answer

Dom ( G ) = [ 2 , 2 ] and Rng ( G ) = [ 0 , 2 ] .

Solution

Domain. Require 4 x 2 0 , that is x 2 4 . Factoring,

( 2 x ) ( 2 + x ) 0.

Testing points: at x = 3 the product is ( 5 ) ( 1 ) = 5 < 0 ; at x = 0 it is ( 2 ) ( 2 ) = 4 > 0 ; at x = 3 it is ( 1 ) ( 5 ) = 5 < 0 . So the expression is nonnegative exactly between the zeros 2 and 2 , endpoints included:

Dom ( G ) = [ 2 , 2 ] .

Range — the possible sizes of the radicand. As x runs through [ 2 , 2 ] , the square x 2 runs through the values from 0 (at x = 0 ) up to 4 (at x = ± 2 ), so

0 x 2 4.

Multiplying by 1 reverses both inequalities: 4 x 2 0 . Adding 4 throughout:

0 4 x 2 4.

Range — taking the square root. The square root of a number between 0 and 4 lies between 0 = 0 and 4 = 2 . So every output satisfies

0 G ( x ) 2.

Every such value is attained. Let y satisfy 0 y 2 . Solve 4 x 2 = y . Squaring, 4 x 2 = y 2 , so x 2 = 4 y 2 . Since y 2 , we have y 2 4 , so 4 y 2 0 and we may take x = 4 y 2 . This x lies in [ 2 , 2 ] because 4 y 2 4 . Then

G ( x ) = 4 ( 4 y 2 ) = y 2 = y ,

the last step being valid because y 0 .

Conclusion. Rng ( G ) = [ 0 , 2 ] .

Check. G ( 2 ) = 0 = 0 , G ( 0 ) = 4 = 2 , G ( 1 ) = 3 1.73 . All lie between 0 and 2 , and the two extreme values are actually reached.

Note that the outputs are never negative:   always denotes the nonnegative square root.

Exercise 13.

Find the range of f ( x ) = 1 x , whose natural domain is { 0 } .

Answer

{ 0 }

Solution

The systematic way to find a range is to ask: for which numbers y can the equation f ( x ) = y be solved for an x in the domain?

Set up the equation.

1 x = y .

Solve for x . Multiply both sides by x (allowed, since x 0 in the domain):

1 = y x .

To divide by y we need y 0 . So consider the two cases separately.

Case y = 0 . The equation becomes 1 = 0 , which is false. So there is no x with 1 x = 0 : the output 0 never occurs. This makes sense — a fraction with numerator 1 can never equal zero, because for a fraction to be zero its numerator must be zero.

Case y 0 . Divide both sides by y :

x = 1 y ,

and this x is a legitimate input, since 1 y 0 . Then

f ( 1 y ) = 1 1 / y = y ,

so y really is an output.

Conclusion. Every nonzero y is attained and 0 is not, so

Rng ( f ) = { 0 } .

Check. To produce the output 5 , take x = 1 5 : indeed 1 1 / 5 = 5 . And no input gives 0 , however large x becomes, since 1 x is never exactly zero.

Exercise 14.

Find the natural domain and the range of f ( x ) = 2 x + 1 x 3 .

Answer

Dom ( f ) = { 3 } and Rng ( f ) = { 2 } .

Solution

Domain. The denominator vanishes when x 3 = 0 , that is x = 3 . So

Dom ( f ) = { 3 } .

Range. Ask which y can be written as f ( x ) for some allowed x . Set

2 x + 1 x 3 = y .

Multiply both sides by x 3 , which is nonzero for allowed x :

2 x + 1 = y ( x 3 ) .

Expand the right-hand side:

2 x + 1 = y x 3 y .

Gather the x -terms on one side and everything else on the other. Subtract 2 x and add 3 y to both sides:

3 y + 1 = y x 2 x .

Factor x out of the right-hand side by the distributive property:

3 y + 1 = x ( y 2 ) .

Case y = 2 . The equation becomes 3 ( 2 ) + 1 = x 0 , that is 7 = 0 , which is false. So the value 2 is never an output.

Case y 2 . Divide both sides by y 2 :

x = 3 y + 1 y 2 .

This is a real number, and it is an allowed input provided x 3 . Could it equal 3 ? That would need 3 y + 1 y 2 = 3 , hence 3 y + 1 = 3 y 6 , hence 1 = 6 , which is impossible. So x 3 automatically, and y is genuinely attained.

Conclusion.

Rng ( f ) = { 2 } .

Check. Try to obtain the output 5 : the formula gives x = 3 ( 5 ) + 1 5 2 = 16 3 , and

f ( 16 3 ) = 32 3 + 1 16 3 3 = 35 3 7 3 = 35 7 = 5.

And 2 is indeed unreachable: 2 x + 1 x 3 = 2 would give 2 x + 1 = 2 x 6 , that is 1 = 6 , impossible.

Exercise 15.

A rectangle has perimeter 24 cm and width w cm, so its area is

A ( w ) = w ( 12 w ) .

(a) What is the natural domain of the formula A ( w ) = w ( 12 w ) , considered purely as an algebraic expression?

(b) What set of values of w actually makes sense for the rectangle?

Answer

(a)   (b) 0 < w < 12

Solution

(a) Expanding, A ( w ) = 12 w w 2 , a polynomial. There is no denominator and no root, so the expression can be evaluated at every real number:

Dom ( A ) = .

For instance, the formula happily returns A ( 3 ) = ( 3 ) ( 15 ) = 45 and A ( 20 ) = 20 ( 8 ) = 160 .

(b) Those outputs are nonsense for a rectangle: an area cannot be negative, and a width cannot be negative either. The situation imposes its own restrictions.

The width must be positive: w > 0 .

The length must be positive: the length is 12 w , so we need

12 w > 0 w < 12.

Both conditions together give

0 < w < 12. TikZ figure

The endpoints are hollow because w = 0 and w = 12 both collapse the rectangle to a segment of zero area.

The moral. The natural domain is the largest set on which the formula makes sense; a problem drawn from the real world may require a smaller domain, and when it does, that restriction must be stated explicitly, exactly as the section says.

Check. A ( 5 ) = 5 × 7 = 35 cm², a sensible area for a 5 × 7 rectangle whose perimeter is 2 ( 5 ) + 2 ( 7 ) = 24 cm. ✔

Exercise 16.

A student writes: "Since x 2 4 x 2 = x + 2 , the natural domain of f ( x ) = x 2 4 x 2 is all of ."

Find the mistake and give the correct domain and range.

Answer

The cancellation is only valid for x 2 . The domain is { 2 } and the range is { 4 } .

Solution

What is correct. Factoring the numerator as a difference of two squares,

x 2 4 x 2 = ( x 2 ) ( x + 2 ) x 2 ,

and cancelling the common factor gives x + 2 . So for most values of x the function does behave like x + 2 .

What is wrong. Cancelling a factor means dividing the numerator and denominator by it, and division by zero is forbidden. The cancellation is therefore valid only when x 2 0 , that is, when x 2 . The correct statement is

x 2 4 x 2 = x + 2 for  x 2.

At x = 2 the original formula reads

f ( 2 ) = 4 4 2 2 = 0 0 ,

which is not a number at all. The natural domain is the set of inputs for which the given formula produces a real number, so

Dom ( f ) = { 2 } .

The range. For every allowed x the output equals x + 2 . As x runs over all reals except 2 , the value x + 2 runs over all reals except 2 + 2 = 4 . In detail: given any y 4 , put x = y 2 ; then x 2 (because y 4 ), so x is allowed, and f ( x ) = x + 2 = y . And y = 4 is impossible, since x + 2 = 4 would force x = 2 , which is not in the domain. Hence

Rng ( f ) = { 4 } .

Check. f ( 0 ) = 4 2 = 2 , and 0 + 2 = 2 . ✔   f ( 3 ) = 5 1 = 5 , and 3 + 2 = 5 . ✔   f ( 2 ) is undefined. ✔

The general warning. Simplify a formula as much as you like, but read the domain off the original expression. Cancelling can hide a forbidden input.

Exercise 17.

Decide whether each statement is always, sometimes, or never true, and justify your answer.

(a) The natural domain of a function defined by a square root is a bounded interval.

(b) If a belongs to the natural domain of f and also to the natural domain of g , then a belongs to the natural domain of the quotient f ( x ) g ( x ) .

Answer

(a) Sometimes true.   (b) Sometimes true.

Solution

(a) Sometimes true.

A case where it is true. For G ( x ) = 4 x 2 the requirement 4 x 2 0 gives the domain [ 2 , 2 ] , which is a bounded interval.

A case where it is false. For h ( x ) = x 1 the requirement x 1 0 gives the domain [ 1 , ) , which stretches out forever and is certainly not bounded.

A third case, false in a different way. For F ( x ) = x 2 4 the domain is ( , 2 ] [ 2 , ) , which is not even a single interval.

Since it holds in some cases and fails in others, the statement is sometimes true.

(b) Sometimes true.

A case where it is true. Let f ( x ) = x and g ( x ) = x 1 , and take a = 5 . Both functions are defined at 5 , and the quotient x x 1 is defined at 5 as well, since 5 1 = 4 0 .

A case where it is false. Keep the same f and g but take a = 1 . Both f ( 1 ) = 1 and g ( 1 ) = 0 are perfectly good real numbers, so 1 lies in both domains. But the quotient at x = 1 would be 1 0 , which is undefined. So 1 is not in the domain of the quotient.

Since both outcomes occur, the statement is sometimes true.

The exact rule. A number belongs to the natural domain of f ( x ) g ( x ) exactly when it belongs to the domains of both f and g and g does not vanish there. The last condition is precisely the one the statement forgot.

Frequently Asked Questions

What happens if I plug in a number outside the domain?

The function is undefined there. For example, f ( x ) = x is undefined at x = 1 because 1 is not a real number. Plugging in such values produces an imaginary result, which is outside the scope of real-valued functions.


How do I find the domain of a fraction?

Find all values of x for which the denominator equals zero, then exclude those values from . For f ( x ) = 1 x 2 3 x = 1 x ( x 3 ) , the denominator is zero at x = 0 and x = 3 , so Dom ( f ) = { 0 , 3 } .


Is the range always an interval?

No. The range can be a single point (for a constant function), a union of intervals, or a discrete set. For example, the signum function sgn ( x ) has range { 1 , 0 , 1 } , which is a finite set.


What is the difference between range and codomain?

The codomain is the set you declare outputs should come from (often ). The range is the set of outputs the function actually produces. For f ( x ) = x 2 with codomain , the range is only [ 0 , ) , a proper subset of .


Can the domain be empty?

Technically yes (a function with an empty domain is called the empty function), but in practice the functions you encounter in precalculus and calculus always have nonempty domains. If your calculation gives an empty domain, double-check your work.