Rational and Radical Functions

Learn domains, simplification, equations, graphs, asymptotes, and radicals.

Learning objectives

After this lesson you should be able to:

  • identify rational and radical expressions and functions;
  • find domain restrictions from denominators and even roots;
  • simplify rational expressions while preserving excluded values;
  • solve rational and radical equations and check candidate solutions;
  • identify holes, vertical asymptotes, horizontal asymptotes, and intercepts;
  • use SymPy and browser symbolic tools to verify work without ignoring domain restrictions.

Motivation: restrictions are part of the mathematics

A rational function such as f(x) = 1/(x - 2) looks harmless, but x = 2 is not allowed because the denominator would be zero. A radical function such as g(x) = sqrt(x - 3) also carries a warning: in real-valued algebra, x must be at least 3.

Restrictions tell us which answers are allowed, where graphs break, and when a simplified formula is missing information from the original problem.

Key idea

Whenever a formula contains a variable in a denominator or an even root, ask: which inputs are allowed?

Rational expressions and functions

A rational expression is a quotient of polynomials:

(x + 1)/(x - 4)
(x^2 - 9)/(x^2 - x - 6)

A rational function is a function defined by a rational expression. The denominator cannot be zero, so the first step is usually to solve:

denominator = 0

and exclude those values from the domain.

Simplifying without losing restrictions

Consider:

(x^2 - 4)/(x - 2)

Factor the numerator:

((x - 2)(x + 2))/(x - 2)

For allowed values, the common factor cancels and the visible formula becomes:

x + 2

But the original denominator still forbids x = 2.

Common mistake

The simplified formula x + 2 is defined at x = 2, but the original expression is not. Always state restrictions from the original expression.

Worked example: simplify and state restrictions

Simplify:

(x^2 - 9)/(x^2 - x - 6)

Factor:

x^2 - 9 = (x - 3)(x + 3)
x^2 - x - 6 = (x - 3)(x + 2)

List denominator zeros before canceling:

x = 3 or x = -2

Cancel the common factor:

((x - 3)(x + 3))/((x - 3)(x + 2)) = (x + 3)/(x + 2)

Final answer:

(x + 3)/(x + 2), with x != 3 and x != -2

The canceled factor produces a hole at x = 3. The remaining denominator factor produces a vertical asymptote at x = -2.

Operations with rational expressions

Rational expressions follow fraction rules.

Multiplication

(x^2 - 1)/(x + 3) * (x + 3)/(x - 1)
= ((x - 1)(x + 1))/(x + 3) * (x + 3)/(x - 1)
= x + 1

Restrictions from the original denominators: x != -3 and x != 1.

Division

Dividing by a rational expression means multiplying by its reciprocal:

(x + 2)/(x - 5) ÷ (x + 2)/(x + 1)
= (x + 2)/(x - 5) * (x + 1)/(x + 2)
= (x + 1)/(x - 5)

Also exclude values that make the divisor zero.

Addition

Use a common denominator:

1/(x - 1) + 2/(x + 1)
= (x + 1)/((x - 1)(x + 1)) + 2(x - 1)/((x - 1)(x + 1))
= (3x - 1)/((x - 1)(x + 1))

Restrictions: x != 1 and x != -1.

Solving rational equations

A safe routine is:

  1. list forbidden values from all denominators;
  2. multiply both sides by the least common denominator;
  3. solve the resulting equation;
  4. check candidates in the original equation.

Worked example

Solve:

1/(x - 1) + 2/(x + 1) = 1

Forbidden values: x != 1 and x != -1.

Multiply by (x - 1)(x + 1):

x + 1 + 2(x - 1) = (x - 1)(x + 1)
3x - 1 = x^2 - 1
3x = x^2
x(x - 3) = 0

Candidates are x = 0 and x = 3. Both work in the original equation, so the solution set is {0, 3}.

Graph features of rational functions

  • A vertical asymptote usually comes from a denominator factor that does not cancel.
  • A hole comes from a denominator factor that cancels.
  • An x-intercept comes from a remaining numerator zero.
  • A horizontal asymptote describes long-run behavior.

For horizontal asymptotes, compare degrees:

Degrees Horizontal behavior
numerator degree smaller y = 0
equal degrees ratio of leading coefficients
numerator degree larger by one slant asymptote preview
<lambdifygenerated-2>:2: RuntimeWarning: divide by zero encountered in power
  return (x - 2)**(-1.0)

Radical expressions and functions

A radical expression contains a root, and the expression inside the root is the radicand.

sqrt(x - 5)
root_3(x + 2)

In real-valued algebra:

  • even roots require the radicand to be nonnegative;
  • odd roots can accept negative inputs.

Examples:

sqrt(x - 5) requires x >= 5
root_3(x - 5) allows all real x

Radicals can also be written with rational exponents:

sqrt(x) = x^(1/2)
root_3(x^2) = x^(2/3)

Square-root warning

In real-valued algebra, sqrt(x^2) = |x|, not always x.

Solving radical equations

Squaring both sides can introduce extraneous solutions, so always check.

Solve:

sqrt(x + 5) = x - 1

Since a square root is nonnegative, x - 1 >= 0, so x >= 1. Square both sides:

x + 5 = (x - 1)^2
x + 5 = x^2 - 2x + 1
0 = x^2 - 3x - 4
0 = (x - 4)(x + 1)

Candidates: x = 4 and x = -1.

Check:

  • x = 4: sqrt(9) = 3 and 4 - 1 = 3, works.
  • x = -1: sqrt(4) = 2 but -1 - 1 = -2, fails.

Final answer: x = 4.

Browser symbolic practice

Browser-friendly symbolic tools can help you experiment:

  • math.js can parse, evaluate, simplify, and rationalize expressions in JavaScript.
  • Nerdamer provides browser-oriented algebra and solving modules.
  • Algebrite is a JavaScript/TypeScript computer algebra system.
  • PyScript can run Python and SymPy in the browser, though it is heavier than plain JavaScript.

Try these exercises online:

  1. Simplify (x^2 - 9)/(x^2 - x - 6), then manually state restrictions.
  2. Factor a denominator and list every forbidden value.
  3. Test radical-equation candidates in the original equation.
  4. Compare a browser CAS answer with a hand-written domain explanation.

Practice exercises

  1. Find the domain of (x + 5)/(x^2 - 4).
  2. Simplify (x^2 - 16)/(x^2 - 2x - 8) and state restrictions.
  3. Multiply (x^2 - 1)/(x + 2) by (x + 2)/(x - 1) and state restrictions.
  4. Solve 2/(x - 3) = 5/(x + 1).
  5. Identify the vertical asymptote of (x + 1)/(x - 4).
  6. Identify the hole in (x^2 - 25)/(x - 5).
  7. Find the domain of sqrt(2x - 6).
  8. Rewrite root_3(x^5) using rational exponents.
  9. Solve sqrt(x + 6) = x and check for extraneous solutions.
  10. A square has area A. Write a radical model for side length and state a domain.
  1. Exclude x = -2 and x = 2.
  2. (x + 4)/(x + 2), with x != 4 and x != -2.
  3. Simplifies to x + 1, with x != -2 and x != 1.
  4. 2(x + 1)=5(x - 3), so x = 17/3.
  5. x = 4.
  6. Simplifies to x + 5, but x = 5 is missing, so the hole is (5, 10).
  7. 2x - 6 >= 0, so x >= 3.
  8. x^(5/3).
  9. Squaring gives x^2 - x - 6 = 0; candidates 3 and -2; only 3 works.
  10. s(A) = sqrt(A), with A >= 0.

Subtopic guided practice and checkpoints

Rational and radical problems are solved safely only when restrictions stay visible. Guess the restrictions before simplifying or solving.

Lab 1: find restrictions first

Guess first. What value is forbidden in (x + 5)/(x - 4)?

Guided exercise.

Set the denominator equal to zero:

x - 4 = 0
x = 4

So the domain is all real numbers except 4.

Checkpoint. Find the forbidden values for (x^2 + 1)/(x^2 - 9).

Lab 2: simplify and keep the hole

Guess first. In (x^2 - 1)/(x - 1), does canceling remove every memory of x = 1?

Guided exercise.

(x^2 - 1)/(x - 1)
= ((x - 1)(x + 1))/(x - 1)
= x + 1, but x != 1

The visible graph follows the line y = x + 1, but the original function has a hole at x = 1.

Checkpoint. Simplify (x^2 - 4)/(x + 2) and state the excluded value.

Lab 3: solve a rational equation

Guess first. For 1/(x - 2) = 3, should the solution be greater than 2 or less than 2?

Guided exercise.

1/(x - 2) = 3
x != 2                         restriction
1 = 3(x - 2)                   multiply by x - 2
1 = 3x - 6
7 = 3x
x = 7/3

Check: 7/3 is not forbidden, and 1/(7/3 - 2) = 1/(1/3) = 3.

Checkpoint. Solve 2/(x + 1) = 5. State the restriction and check the candidate.

Lab 4: solve a radical equation

Guess first. For sqrt(x + 5) = x - 1, must x - 1 be nonnegative?

Guided exercise.

sqrt(x + 5) = x - 1
x - 1 >= 0, so x >= 1        because square roots are nonnegative
x + 5 = (x - 1)^2            square both sides
x + 5 = x^2 - 2x + 1
0 = x^2 - 3x - 4
0 = (x - 4)(x + 1)
x = 4 or x = -1

Only x = 4 satisfies the restriction and the original equation.

Checkpoint. Solve sqrt(x + 1) = x - 1. Check every candidate in the original radical equation.

Guessing game checkpoint

Use this checkpoint to practice domains, holes, asymptotes, and radical checks.

Using this lesson with edumath and SymPy

Use the parser/solver workflow to check candidate solutions. For rational and radical equations, still inspect restrictions and original-equation checks.

from edumath.core import parse_equation
from edumath.solvers import solve_equation_steps

rational_solution = solve_equation_steps(parse_equation("1/(x - 2) = 3"))
print(rational_solution.render_text())
Answer: x = 7/3

Method: SymPy solveset

Steps:

1. Original equation:
Eq(1/(x - 1*2), 3)

2. Solve symbolically:
x ∈ {7/3}
SymPy found the solution set directly.

Check:

x = 7/3: valid

Use SymPy to check algebraic forms, while you remain responsible for restrictions.

import sympy as sp

x = sp.symbols("x")
expr = (x**2 - 9)/(x**2 - x - 6)
sp.factor(expr), sp.cancel(expr)
((x + 3)/(x + 2), (x + 3)/(x + 2))
denominator = sp.denom(expr)
sp.factor(denominator), sp.solve(sp.Eq(denominator, 0), x)
((x - 3)*(x + 2), [-2, 3])
equation = sp.Eq(1/(x - 1) + 2/(x + 1), 1)
candidates = sp.solve(equation, x)
[(candidate, sp.checksol(equation, x, candidate)) for candidate in candidates]
[(0, True), (3, True)]
radical_equation = sp.Eq(sp.sqrt(x + 5), x - 1)
candidates = sp.solve(radical_equation, x)
[(candidate, sp.checksol(radical_equation, x, candidate)) for candidate in candidates]
[(4, True)]

Further reading