Tutorials › Calculus I › From Formula to Sketch: A Rational Worked Workshop

Curve Analysis and Sketching · Tutorial 853 of 1495

From Formula to Sketch: A Rational Worked Workshop

Learn a reliable process for analyzing rational functions with distinct real zeros and vertical asymptotes, including how to use derivative signs and concavity to assemble a coherent sketch.

Intermediate 10 min read

What You'll Learn

  • Identify a rational function’s domain, intercepts, and vertical asymptotes.
  • Determine one-sided behavior at vertical asymptotes and end behavior.
  • Use the first derivative to find increasing and decreasing intervals.
  • Use the second derivative to determine concavity and check for inflection points.
  • Combine exact features into a consistent sketch of each branch.
  • Check derivative calculations and avoid sign-chart errors at excluded inputs.

From a Formula to a Reliable Sketch

A rational function can behave very differently on opposite sides of a vertical asymptote. A useful sketch therefore needs more than a few plotted points: it must account for the domain, intercepts, asymptotes, monotonicity, and concavity on every part of the domain.

This workshop develops those features in a fixed order. The examples use exact values so that the sign information and the final sketches can be checked directly against the formulas.

Definition: A rational function is a function that can be written as \(f(x)=P(x)/Q(x)\), where \(P\) and \(Q\) are polynomials and \(Q(x)\ne 0\). Its domain excludes every real input at which the denominator is zero. A zero of the numerator is an \(x\)-intercept only if that input is in the domain.

A Consistent Analysis Checklist

For each function, first find its domain and intercepts. Then determine its behavior at excluded inputs and as \(x\) tends to either infinity. Next calculate the first and second derivatives, make sign charts on the resulting domain intervals, and use all of the information together. A vertical asymptote divides the graph into distinct branches: no branch can be continued through an excluded input.

1
Find the domain and intercepts.
Factor numerator and denominator, record excluded inputs, and solve for any valid \(x\)-intercepts. Set \(x=0\) for a \(y\)-intercept if zero is in the domain.
2
Find asymptotic behavior.
Check one-sided limits at excluded inputs and compare the function with its end behavior as \(x\to\pm\infty\).
3
Analyze derivatives on the domain.
Use \(f'(x)\) for increasing and decreasing behavior, and \(f''(x)\) for concavity. Split sign intervals at every excluded input as well as at derivative zeros.
4
Assemble the branches.
On each domain interval, match the endpoint behavior, intercepts, turning points, and concavity. Check that none of these features contradict another.

Worked Example: Two Zeros and Two Vertical Asymptotes

Worked Example: An Even Rational Function

Analyze and sketch \(f(x)=\dfrac{x^2-1}{x^2-4}\).

Domain and intercepts. Factor the numerator and denominator:

$$ f(x)=\frac{(x-1)(x+1)}{(x-2)(x+2)}. $$

The denominator is zero at \(x=-2\) and \(x=2\), so the domain is \(\mathbb R\setminus\{-2,2\}\). Neither factor cancels. The numerator is zero at \(x=-1\) and \(x=1\), giving \(x\)-intercepts \((-1,0)\) and \((1,0)\). At \(x=0\),

$$ f(0)=\frac{-1}{-4}=\frac14, $$

so the \(y\)-intercept is \((0,\frac14)\).

End behavior and vertical asymptotes. Rewrite the function to display its behavior at infinity:

$$ f(x)=1+\frac{3}{x^2-4}. $$

As \(x\to\pm\infty\), the fraction tends to zero, so \(y=1\) is a horizontal asymptote. The fraction is positive for \(|x|>2\), meaning that the graph approaches \(1\) from above at both ends.

At \(x=-2\), the numerator \(x^2-1\) tends to \(3>0\). The denominator \(x^2-4=(x-2)(x+2)\) is positive immediately to the left of \(-2\) and negative immediately to its right. Therefore,

$$ \lim_{x\to-2^-}f(x)=+\infty, \qquad \lim_{x\to-2^+}f(x)=-\infty. $$

At \(x=2\), the numerator again tends to \(3>0\); the denominator is negative just to the left and positive just to the right. Thus,

$$ \lim_{x\to2^-}f(x)=-\infty, \qquad \lim_{x\to2^+}f(x)=+\infty. $$

Both \(x=-2\) and \(x=2\) are vertical asymptotes.

First derivative. The quotient rule gives

$$ f'(x) = \frac{2x(x^2-4)-2x(x^2-1)}{(x^2-4)^2} = \frac{-6x}{(x^2-4)^2}. $$

The denominator is positive wherever the function is defined, so the sign of \(f'(x)\) is the sign of \(-x\). The derivative is positive for \(x<0\) and negative for \(x>0\). Remember to split these intervals at the excluded inputs: \(f\) increases on \((-\infty,-2)\) and \((-2,0)\), then decreases on \((0,2)\) and \((2,\infty)\). The derivative changes from positive to negative at \(x=0\), so \((0,\frac14)\) is a local maximum.

Second derivative. Differentiating the first derivative gives

$$ f''(x) = -6\left((x^2-4)^{-2}-4x^2(x^2-4)^{-3}\right) = \frac{6(3x^2+4)}{(x^2-4)^3}. $$

The numerator is always positive. The denominator is positive when \(|x|>2\) and negative when \(|x|<2\). Thus \(f\) is concave up on \((-\infty,-2)\) and \((2,\infty)\), and concave down on \((-2,2)\). The latter interval contains the local maximum and is split at the excluded inputs when describing the graph’s branches. Concavity does not change at any point in the domain, so there is no inflection point.

Sketch check. The left branch increases from \(1\) (approached from above) to \(+\infty\) as \(x\) moves toward \(-2\). The middle branch starts at \(-\infty\) just right of \(-2\), crosses at \((-1,0)\), reaches its maximum at \((0,\frac14)\), crosses again at \((1,0)\), then tends to \(-\infty\) as \(x\) approaches \(2\) from the left. The right branch decreases from \(+\infty\) to \(1\) (approached from above). These features agree with the intercepts, derivative signs, concavity, and limits.

Derivative check. Differentiating the equivalent form \(1+3(x^2-4)^{-1}\) gives \(-6x(x^2-4)^{-2}\), exactly the same \(f'(x)\) as the quotient rule.

Why Derivative Signs Determine the Shape

The sign of the derivative has a precise geometric meaning. If \(f'(x)>0\) throughout an interval, the Mean Value Theorem implies that for any \(a<b\) in that interval, \(f(b)-f(a)=f'(c)(b-a)>0\) for some \(c\) between \(a\) and \(b\). Hence \(f\) is increasing there. If \(f'(x)<0\), the same reasoning gives \(f(b)<f(a)\), so \(f\) is decreasing. Apply this separately on each domain interval; the argument cannot cross a point where the function is undefined.

Likewise, the sign of \(f''\) describes whether the slopes are increasing or decreasing. Concavity can change only at a point in the domain where the concavity on the two sides differs. A zero of \(f''\) is a candidate, not by itself proof of an inflection point; an excluded input cannot be an inflection point because the graph has no point there.

Worked Example: The Same Features with Reversed Branch Behavior

Worked Example: A Central Local Minimum

Analyze \(g(x)=\dfrac{x^2-4}{x^2-1}\). Its numerator has distinct real zeros at \(-2\) and \(2\); its denominator vanishes at \(-1\) and \(1\). Thus the domain is \(\mathbb R\setminus\{-1,1\}\), the \(x\)-intercepts are \((-2,0)\) and \((2,0)\), and \(g(0)=4\), giving the \(y\)-intercept \((0,4)\).

Since

$$ g(x)=1-\frac{3}{x^2-1}, $$

the horizontal asymptote is \(y=1\), approached from below at both ends. The numerator approaches \(-3\) at each vertical asymptote. The denominator is positive outside \([-1,1]\) and negative inside it, so

$$ \lim_{x\to-1^-}g(x)=-\infty,\quad \lim_{x\to-1^+}g(x)=+\infty,\quad \lim_{x\to1^-}g(x)=+\infty,\quad \lim_{x\to1^+}g(x)=-\infty. $$

Differentiation gives

$$ g'(x) = \frac{2x(x^2-1)-2x(x^2-4)}{(x^2-1)^2} = \frac{6x}{(x^2-1)^2}. $$

The denominator is positive on the domain, so \(g\) decreases where \(x<0\) and increases where \(x>0\). In particular, it decreases on \((-\infty,-1)\) and \((-1,0)\), then increases on \((0,1)\) and \((1,\infty)\). The derivative changes from negative to positive at \(0\), producing a local minimum at \((0,4)\). Differentiating again,

$$ g''(x) = \frac{6(x^2-1)-24x^2}{(x^2-1)^3} = \frac{-6(3x^2+1)}{(x^2-1)^3}. $$

The numerator is strictly negative. The denominator is positive outside the two asymptotes and negative between them, so the graph is concave down on \((-\infty,-1)\) and \((1,\infty)\), and concave up on \((-1,1)\). There is no inflection point: the only change in concavity occurs across excluded inputs.

The left branch decreases from \(1\) approached from below to \(-\infty\). The middle branch decreases from \(+\infty\) to its minimum \((0,4)\), then increases to \(+\infty\). The right branch increases from \(-\infty\) toward \(1\) from below. This confirms the direction of all four vertical limits and keeps the sketch consistent with the intercepts and derivative signs.

Derivative check. From \(g(x)=1-3(x^2-1)^{-1}\), differentiation gives \(g'(x)=6x(x^2-1)^{-2}\), agreeing with the quotient-rule calculation.

Worked Example: A Slant Asymptote and Two Turning Points

Worked Example: A Rational Function with Linear End Behavior

Analyze \(h(x)=\dfrac{x^2-1}{x-2}\). The domain is \(\mathbb R\setminus\{2\}\), and the numerator factors as \((x-1)(x+1)\). Therefore the \(x\)-intercepts are \((-1,0)\) and \((1,0)\), and \(h(0)=\frac12\), so the \(y\)-intercept is \((0,\frac12)\).

Polynomial division gives

$$ h(x)=x+2+\frac{3}{x-2}. $$

Consequently, \(y=x+2\) is a slant asymptote: the difference \(h(x)-(x+2)=3/(x-2)\) tends to zero as \(x\to\pm\infty\). The graph lies below this line for \(x<2\) and above it for \(x>2\). At the vertical asymptote, the numerator tends to \(3>0\) and the denominator changes from negative to positive, giving

$$ \lim_{x\to2^-}h(x)=-\infty, \qquad \lim_{x\to2^+}h(x)=+\infty. $$

Using the quotient rule,

$$ h'(x) = \frac{2x(x-2)-(x^2-1)}{(x-2)^2} = \frac{x^2-4x+1}{(x-2)^2}. $$

The numerator factors using its roots \(2-\sqrt3\) and \(2+\sqrt3\). The denominator is positive on the domain, so \(h'\) is positive for \(x<2-\sqrt3\), negative for \(2-\sqrt3<x<2\) and \(2<x<2+\sqrt3\), and positive for \(x>2+\sqrt3\). Thus \(h\) has a local maximum at \(x=2-\sqrt3\) and a local minimum at \(x=2+\sqrt3\). Substituting into \(h(x)=t+4+3/t\), where \(t=x-2\), gives the corresponding points \((2-\sqrt3,4-2\sqrt3)\) and \((2+\sqrt3,4+2\sqrt3)\).

Differentiate the quotient-rule result once more:

$$ h''(x) = \frac{2(x-2)(x-2)^2-2(x^2-4x+1)(x-2)}{(x-2)^4} = \frac{6}{(x-2)^3}. $$

Hence the graph is concave down on \((-\infty,2)\) and concave up on \((2,\infty)\). There is no inflection point because \(x=2\) is not in the domain. The left branch follows the slant asymptote at the far left, rises to its local maximum, then falls to \(-\infty\). The right branch descends from \(+\infty\) to its local minimum, then rises while approaching the slant asymptote.

Checks. At \(x=0\), the derivative formula gives \(h'(0)=1/4\). Directly differentiating \(x+2+3/(x-2)\) gives \(1-3/(x-2)^2\), which also gives \(1-3/4=1/4\). At either critical point, writing \(t=x-2=\pm\sqrt3\) gives \(h'=1-3/t^2=0\), confirming the turning-point locations.

A Common Sign-Chart Mistake

A frequent error is to treat an entire interval separated by a vertical asymptote as if it were one continuous interval, or to assume that the denominator’s squared form changes sign. In the first example,

$$ f'(x)=\frac{-6x}{(x^2-4)^2}. $$

The squared denominator is positive at every input in the domain; it does not change sign across either asymptote. For example,

$$ f'(-3)=\frac{18}{25}>0, \qquad f'(3)=\frac{-18}{25}<0. $$

So the function increases on the left outer branch and decreases on the right outer branch. The correct procedure is to mark the excluded inputs first, then test or analyze the derivative sign separately on each remaining interval. A derivative sign cannot establish monotonicity across a point where the function is undefined.

Putting the Information Together

A rational sketch is a collection of connected branches, one on each domain interval. For every branch, record where it begins and ends, including whether an endpoint is a finite intercept, an infinite limit, or an asymptotic approach. Then add any turning points, and shape the branch according to its concavity. The sketch should pass through every valid intercept and should never connect across a vertical asymptote.

Several checks are especially useful: the numerator determines valid zeros, the denominator determines excluded inputs, derivative signs must be considered only where the function exists, and limits must agree with the direction of each branch. If the graph’s apparent direction conflicts with a derivative sign or a one-sided limit, revisit the calculation before drawing.

Check Your Understanding

Use the methods in this workshop to answer the following questions.

  1. For \(r(x)=\dfrac{x^2-9}{x^2-4}\), find the domain, intercepts, and vertical asymptotes.
  2. Why must derivative sign intervals be split at every vertical asymptote?
  3. For \(f(x)=\dfrac{x^2-1}{x^2-4}\), what are the one-sided limits at \(x=-2\), and what determines their signs?
  4. What additional evidence is needed before a zero of \(f''\) can be identified as an inflection point?
  5. For \(h(x)=\dfrac{x^2-1}{x-2}\), state the slant asymptote and the direction of the graph relative to it on either side of \(x=2\).

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon