Aniko

Restrictions, piecewise functions, and rational expressions

Lesson progressPractice problems 0/5

Learn to graph only the allowed domain, enter piecewise functions, track denominator exclusions through cancellation, and verify rational or radical solutions in the original problem.

Difficulty
Intermediate
Estimated time
55 minutes

What you’ll learn

  1. Keep a graph to the inputs you want with curly braces.
  2. Enter a piecewise function in Desmos and find its values.
  3. Write down the inputs a denominator rules out before you simplify a rational expression.
  4. Tell an xx-intercept, a hole, and a vertical asymptote apart.
  5. Check possible solutions to a rational or radical equation in the original equation.
  6. Decide when the graph helps and when a quick bit of algebra is faster.
  7. Solving a one-variable equation by graphing both sides and reading where they meet.
  8. Comparing equivalent expressions by graph overlap, while keeping the inputs both expressions allow.

Why this matters on the SAT

The equation isn’t the whole story

A number can pass your simplified algebra and still fail the original problem. It might make a denominator 00. It might sit outside the interval where a piecewise rule applies. Or it might come out of squaring both sides without ever being a solution.

On the SAT, these conditions are often what separates the tempting answer from the right one. Here's a typical question.

SAT example

Which choice is the xx-coordinate of the xx-intercept of the graph of

y=x2−1x2−4x+3y=\frac{x^2-1}{x^2-4x+3}

in the xyxy-plane?

Answer choices

Fast Desmos solution

Graph the function and click the xx-intercept Desmos marks. It's (−1,0)(-1,0), so the answer is A.

The wrong choices are worth a second look, because they're the traps. Factor the denominator:

x2−4x+3=(x−1)(x−3).x^2-4x+3=(x-1)(x-3).

So x=1x=1 and x=3x=3 both make the denominator 00. The function isn't defined at either one, so the graph has no point there, and neither can be an xx-intercept.

Still, the graph behaves differently at those two inputs. It has a hole at x=1x=1 and a vertical asymptote at x=3x=3. We'll come back to this function to see why.

Calculator loads as you approach
Click the marked x-intercept. Then look closely at the graph near x=1 and x=3.

Choose the right approach

The core principle

A function or equation comes with conditions: an input it can't use, like x≠3x\ne3, or an interval where a rule applies, like x<0x<0. Carry those conditions all the way to the answer.

The domain is the set of inputs a function or expression allows, the xx-values where it's defined.

Desmos can show many of these conditions on the graph, but you have to spot them in the problem before you type anything.

Some conditions are easiest to see in Desmos. Others are safest written down before you touch the algebra.

Start with a Desmos restriction when…

  • The question limits the inputs, like 0≤x≤50\le x\le 5 or a time that can’t be negative.

  • You need a maximum, a minimum, an endpoint, or an intersection on just those inputs.

  • The function switches rules, like one rule for x<0x<0 and another for x≥0x\ge0.

  • You’re solving an equation like x+5=x−1\sqrt{x+5}=x-1, and graphing each original side shows only the answers that really work.

Write the restrictions down first when…

  • A variable sits in a denominator, like x−4x-4, so write x≠4x\ne4 before you cancel anything.

  • You’re about to square both sides or clear denominators, because that can create answers that don’t work.

  • A square root or a log limits the inputs, like x+5\sqrt{x+5}, which needs x≥−5x\ge-5.

  • The value to rule out is hard to spot on a graph, like a hole, which is a single missing point.

Take the shorter path. If plugging in one value throws out a wrong answer right away, do that. If a restricted graph shows you the allowed interval or intersection at a glance, use the graph.

Check your understanding:

One problem asks for the maximum of a quadratic on 0≤x≤50\le x\le5. Another asks you to simplify a rational expression with denominator x−4x-4. What’s your first move on each?

Restrict a graph with curly braces

Say

h(x)=−(x−3)2+9h(x)=-(x-3)^2+9

is defined only for

0≤x≤5.0\le x\le 5.

Put the condition at the end

Type:

y=-(x-3)^2+9{0<=x<=5}

Without the curly braces, Desmos would draw the whole parabola, and you'd have to remember which part counts. With them, Desmos graphs only the part you allowed, so everything you see is fair game.

Now the maximum is easy to read: it's 99, at x=3x=3. The ends of the graph, (0,0)(0,0) and (5,5)(5,5), are both included because the inequalities use ≤\le.

Keep or leave out an endpoint

Whether an endpoint counts comes down to one symbol, so it's worth a careful look:

  • < or > leaves the endpoint out.
  • <= or >= keeps it on the graph.
  • Two inequalities chained together, like 0<=x<=5, restrict both ends at once.

An endpoint that's left out isn't an allowed input, so you can't plug it in for a maximum or a minimum.

Try it yourself:

Change the right side of the restriction from x<=5 to x<5. The endpoint at x=5x=5 disappears, because 55 isn’t allowed anymore.

Check your understanding:

For the graph y=2x+1{−2<x≤3}y=2x+1\{-2<x\le3\}, which endpoint is included?

Common mistake:

Using parentheses to restrict a graph. It’s a natural slip, since intervals are often written with parentheses. But in Desmos, parentheses only group algebra, so they won’t act as a condition. Curly braces tell Desmos which points to keep, and they go after the whole equation.

Calculator loads as you approach
The curly braces keep only the points with 0≤x≤5.

Enter a piecewise function

Each input chooses one rule

A piecewise function uses different rules for different inputs. Here's one:

p(x)={2x+3,x<0x2+1,x≥0.p(x)= \begin{cases} 2x+3, & x<0\\ x^2+1, & x\ge 0. \end{cases}

Read it as two instructions: if x<0x<0, use 2x+32x+3, and if x≥0x\ge0, use x2+1x^2+1.

You can graph each piece on its own line, with its condition in the same curly braces you just used:

y=2x+3{x<0}
y=x^2+1{x>=0}

Separate lines are handy when you want to edit or color each piece. But when a question asks for values like p(−2)p(-2), define the whole function in one line, so Desmos can find them for you:

p(x)={x<0:2x+3,x>=0:x^2+1}

Look closely at the order, because it's flipped from the way pp is written above. In Desmos, the condition comes first, before the colon, and the rule for that condition comes after it. That's the same order you'd say it out loud: "if x<0x<0, then 2x+32x+3."

Read the condition before the formula

To find an output, first check which condition the input meets. Then use that rule. Desmos does this for you, but on paper it's easy to grab the wrong rule, so here's how it goes by hand:

p(−2)=2(−2)+3=−1p(-2)=2(-2)+3=-1

because −2<0-2<0,

p(0)=02+1=1p(0)=0^2+1=1

because 0≥00\ge0, and

p(3)=32+1=10p(3)=3^2+1=10

because 3≥03\ge0.

Check your understanding:

Define r(x)=3−xr(x)=3-x for x<1x<1 and r(x)=x2r(x)=x^2 for x≥1x\ge1 in one Desmos line. Then find r(−1)+r(2)r(-1)+r(2).

Common mistake:

Using 2x+32x+3 at x=0x=0 because 00 sits right on the boundary. That rule needs x<0x<0, and 00 isn’t less than 00, so you’d get 33 instead of p(0)=1p(0)=1. At a boundary, check whether each condition uses < or <= before you plug in.

Calculator loads as you approach
Each input gets exactly one rule, even x=0 at the boundary.

Keep the excluded inputs when you simplify

Find the denominator's zeros before you cancel

A rational expression is a fraction with a polynomial on top and a polynomial on the bottom.

Let's go back to the SAT example:

g(x)=x2−1x2−4x+3.g(x)=\frac{x^2-1}{x^2-4x+3}.

Factor the denominator first:

x2−4x+3=(x−1)(x−3).x^2-4x+3=(x-1)(x-3).

Either factor can be 00, so the original function can't use

x=1orx=3.x=1\quad\text{or}\quad x=3.

Now factor the numerator and simplify:

g(x)=(x−1)(x+1)(x−1)(x−3)=x+1x−3,x≠1,  x≠3.\begin{aligned} g(x) &=\frac{(x-1)(x+1)}{(x-1)(x-3)}\\[1.4em] &=\frac{x+1}{x-3}, \qquad x\ne1,\;x\ne3. \end{aligned}

Here's the part to remember: canceling a factor doesn't cancel its restriction. The simplified formula matches the original only where the original is defined, so x=1x=1 is still off limits.

Try it yourself:

Turn the simplified function ss off and on, then compare g(1) with s(1). The curves overlap everywhere the original function is defined, but only the simplified formula gives a value at x=1x=1.

Calculator loads as you approach
The curves overlap, but g(1) is undefined while s(1) equals -1.

Hole, asymptote, or intercept?

Now we can explain what the graph of gg does at x=1x=1 and x=3x=3. Holes and asymptotes are easy to mix up, because both happen where a factor makes the denominator 00. What tells them apart is whether that factor survives canceling.

FeatureWhat causes itIn this example
HoleThe factor cancels, none of it is left in the denominator, and the simplified formula gives a number therex=1x=1, where the point (1,−1)(1,-1) is missing
Vertical asymptoteThe factor is still in the denominator after you cancelx=3x=3
xx-interceptThe numerator is 00, but the denominator isn't 00x=−1x=-1

In gg, the factor (x−1)(x-1) canceled, and the simplified formula gives an ordinary number there, s(1)=−1s(1)=-1. So the graph runs right through where (1,−1)(1,-1) would be, with only that one point missing. That's a hole.

The factor (x−3)(x-3) never canceled. Near x=3x=3, the denominator gets close to 00, so the graph dives down just left of x=3x=3 and shoots up just right of it, without ever touching that vertical line. That's a vertical asymptote.

Watch for a factor that appears twice. In x−1(x−1)2\frac{x-1}{(x-1)^2}, one copy of (x−1)(x-1) cancels, but one is still in the denominator, so x=1x=1 gives an asymptote, not a hole.

The last row is why x=1x=1 isn't an xx-intercept of gg, even though (x−1)(x-1) is in the numerator. A numerator zero gives an xx-intercept only where the original function is defined, and at x=1x=1 the denominator is 00 too.

Check your understanding:

For f(x)=x2−9x−3f(x)=\frac{x^2-9}{x-3}, where is the xx-intercept, and where is the hole?

Common mistake:

Plugging x=1x=1 into the simplified formula and saying g(1)=−1g(1)=-1. The simplified formula does give −1-1, but the original has a 00 in its denominator there, so g(1)g(1) is undefined. Write the exclusions, like x≠1,  x≠3x\ne1,\;x\ne3, next to every simplified form so they can’t get lost.

Check answers in the original equation

Algebra can create answers that don't work

Take

x+5=x−1.\sqrt{x+5}=x-1.

The square root needs x≥−5x\ge-5. It also can't be negative, so the right side can't be negative either:

x−1≥0,x-1\ge0,

which gives the stronger condition x≥1x\ge1.

Now square both sides and solve:

x+5=(x−1)2x+5=x2−2x+10=x2−3x−40=(x−4)(x+1).\begin{aligned} x+5&=(x-1)^2\\[1.4em] x+5&=x^2-2x+1\\[1.4em] 0&=x^2-3x-4\\[1.4em] 0&=(x-4)(x+1). \end{aligned}

That gives two candidates, possible solutions that still need checking: x=−1x=-1 and x=4x=4. But −1-1 already breaks x≥1x\ge1. Plug it into the original and you can see the problem: the left side is 4=2\sqrt4=2, while the right side is −1−1=−2-1-1=-2. Squaring hid the difference, because 22 and −2-2 both square to 44.

Check x=4x=4 in the original equation:

9=3=4−1.\sqrt9=3=4-1.

Only x=4x=4 works.

A value like −1-1, which comes out of the algebra but fails the original equation, is called an extraneous solution.

Extraneous solutions can feel unfair, because nothing went wrong in your algebra. Squaring is a fair step, but the squared equation can have answers the original doesn't. That's why the check below is part of the solution, not an extra.

Let the original equation have the final say

  1. Write down the original restrictions.
  2. Solve or graph to find the possible solutions.
  3. Plug each one into the original equation.
  4. Keep only the values that make every part of the original defined and both sides equal.

This check matters whenever you square both sides, clear denominators, raise both sides to another even power, or cancel factors.

Check your understanding:

Solving x2−4x−2=16x+2\frac{x^2-4}{x-2}=\frac{16}{x+2} gives two possible solutions, x=2x=2 and x=−6x=-6. Which one solves the original equation?

Common mistake:

Checking a possible solution in the squared or simplified equation. It will always pass there, because that’s the equation that produced it. Only the original still has the sign or the restriction the algebra lost, so check there.

Calculator loads as you approach
The two original sides meet only once, at x=4.

Example: Pick the branch, then check the condition

Worked example

The function ff is defined by

f(x)={(x−2)2,x≥24−x,x<2.f(x)= \begin{cases} (x-2)^2, & x\ge2\\ 4-x, & x<2. \end{cases}

If a>0a>0, which choice gives a value of aa such that

f(a)=f(0)+5?f(a)=f(0)+5?
  1. A

    −5-5

  2. B

    11

  3. C

    55

  4. D

    1111

Step 1

Start with the input you know

Since 0<20<2, use the rule 4−x4-x:

f(0)=4−0=4.f(0)=4-0=4.

Step 2

Find the output you need

So the equation asks for

f(a)=4+5=9.f(a)=4+5=9.

Step 3

Graph the function and the target

Type the one-line definition of ff and graph y=9y=9. The horizontal line meets the graph at x=−5x=-5 and x=5x=5.

Each branch carries its own condition, so Desmos draws each rule only where it applies. If you solved (x−2)2=9(x-2)^2=9 by hand, you'd also get x=−1x=-1. But −1-1 belongs to the 4−x4-x branch, where f(−1)=5f(-1)=5, so the graph never shows it.

Calculator loads as you approach
The graph handles each branch’s condition. The condition a>0 is still up to you.

Step 4

Use the last condition

The question says a>0a>0, so −5-5 is out, and

a=5.a=5.

The answer is C.

Common mistake:

Choosing −5-5 because it also gives the output 99. It fits f(a)=9f(a)=9, but it breaks the condition a>0a>0, which you never typed into Desmos.

Finish the solution

Practice problems

Keep only the answers that work

Finish the solution

Which value of xx satisfies

x2−1x−1=4x+1?\frac{x^2-1}{x-1}=\frac{4}{x+1}?

First steps

  1. Write down the original exclusions: x≠1x\ne1 and x≠−1x\ne-1.
  2. The two sides of the original equation are already graphed separately.
  3. Click the intersection you can see and note its xx-coordinate.
  4. Compare that value with the exclusions and the answer choices.

Finish it

Answer choices
Calculator loads as you approach
Read the intersection you can see on the original graphs. Graphs of the simplified sides would also meet at x=1.

Practice problems

Now it's your turn. In each problem, the conditions decide the answer, so find them first. Give each problem a real try before you open its hint.

Use an included endpoint

Practice problem

The function

q(x)=2x+5q(x)=2x+5

has domain

−2<x≤3.-2<x\le3.

What is the maximum value of qq on this domain?

Calculator loads as you approach
Graph q with its restriction, then look at the right end.

Evaluate two branches

Practice problem

The function ff is defined by

f(x)={2x+5,x<1(x−1)2,x≥1.f(x)= \begin{cases} 2x+5, & x<1\\ (x-1)^2, & x\ge1. \end{cases}

What is the value of

f(−2)+f(4)?f(-2)+f(4)?
Calculator loads as you approach
Define f in one line, then find f(-2)+f(4) on a new line.

Classify the features of a rational function

Practice problem

The function hh is defined by

h(x)=(x+4)(x−2)(x−2)(x+1).h(x)=\frac{(x+4)(x-2)}{(x-2)(x+1)}.

Which statement about the graph of y=h(x)y=h(x) is true?

Answer choices
Calculator loads as you approach
Find the denominator’s zeros first, then confirm each feature on the graph.

Throw out an extraneous solution

Practice problem

What is a solution to

m+9=m−3?\sqrt{m+9}=m-3?
Calculator loads as you approach
Graph both original sides, or solve by hand and check each answer in the original.

Finish the lesson

5 practice examples left

Finish the remaining questions correctly to complete this lesson.

Quick recap

  • Graph only the allowed inputs by putting the condition in curly braces after the equation.
  • For a piecewise function, check which condition the input meets before you pick a rule.
  • Before you cancel, write down every input that makes the original denominator 00. Canceling a factor doesn't cancel its restriction.
  • A factor that cancels with none left in the denominator leaves a hole. A factor still in the denominator leaves a vertical asymptote.
  • A numerator zero is an xx-intercept only where the original function is defined.
  • After squaring, clearing denominators, or canceling, check each possible solution in the original equation.
  • Use Desmos to show the allowed graph or its intersections, and use quick algebra when it finds an exact restriction faster.

Next lesson

Circle equations in the graph

Turn circle equations into visible centers, radii, intercepts, and geometric relationships.

Start next lesson

Practice

Practice this lesson

750 SAT questions use what this lesson teaches. Practice a few in a study session at the difficulty you choose.

Start practice