The graph of a function provides invaluable information about its behavior. To sketch the graph of a function, we can follow the steps below:

  1. Domain. Determine the domain of the functions (that is, the set of x values for which f(x) is defined) and points of discontinuity.
  2. Symmetry. Determine if the function is even, odd, or neither. Also, check if the function is periodic.
    1. Even functions. The function is even if f(x)=f(x) for all x in the domain. If f is even, you may plot y=f(x) for x>0 and then reflect it about the y-axis to obtain the entire curve.
      Figure 1
    2. Odd functions. The function is odd if f(x)=f(x) for all x in the domain. If f is odd, you may plot y=f(x) for x>0 and then rotate it 180 about the origin to obtain the entire curve.
      Figure 2
    3. Periodic functions. The function is periodic with a period T>0 if f(x+T)=f(x) for all x in the domain. If f is periodic, you may plot y=f(x) for one period (say, [0,T] or [T/2,T/2]), and then obtain the entire curve by infinitely many repetitions of this segment.
      Figure 3
  3. Asymptotes (if any). Determine the vertical, horizontal, and oblique asymptotes of the function. For more details, see Section 4.11.
  4. Intercepts.
    1. The y-intercept. The y-intercept of f is where its graph intersects the y-axis. To find it, simply substitute 0 for x in f(x).
    2. The x-intercepts. An x-intercept of f is any point where the graph meets the x-axis. To find it, solve f(x)=0. If it is difficult to solve this equation, you may skip this step.
  5. Intervals of increase or decrease. Calculate f(x) and determine its sign. Recall that where f>0, the function is increasing and where f<0 the function is decreasing.
  6. Local maxima and minima. Determine the critical points of f. Recall that x0 is a critical point if f(x0)=0 or if f(x0) does not exist. Then use the First Derivative Test or the Second Derivative Test to determine if a critical point gives a local maximum, a local minimum, or neither.
  7. Concavity and inflection points. Calculate f(x) and determine its sign. If f(x)>0 over an interval, the function is concave up on that interval and if f(x)<0, the function is concave down on that interval. Where the direction of concavity changes, we have an inflection point.
  8. Sketch the curve. Draw asymptotes, plot important points (intercepts, local maxima and minima, inflection points), and draw a smooth curve through these points using the information of previous steps.
Example 1
  Sketch the graph of f(x)=2x13x6.

Solution 1
  1. Domain: The domain is {x| 3x60}={x| x2}=(,2)(2,+)=R{2}.

2. Symmetry: None f(x)=2(x)13(x)6=2x13x6f(x) orf(x)

3. Asymptote: (a) Horizontal Asymptote. Because limx±2x13x6=limx±2x3x=23 the line y=2/3 is the horizontal asymptote, and consequently, there is no oblique asymptote.

(b) Vertical Asymptote. Because limx2+2x13x6=[30+]+ and limx22x13x6=[30] the line x=2 is a vertical asymptote.

4. Intercepts: (a) the y-intercept f(0)=2(0)13(0)6=16 so the graph of f meets the y-axis at (0,1/6).
(b) the x-intercept 2x13x6=0x=12. Therefore, the graph of f meets the x-axis at (1/2,0).
So far we know the graph of f looks like this:

Figure 4

 

5. Intervals of increase or decrease: f(x)=2(3x6)3(2x1)(3x6)2=9(3x6)2<0. Because f(x)<0 but f is discontinuous at x=2, we can say that f is decreasing on (,2) and on (2,+).

6. Local Maxima and Minima: There is no critical point because f(x)0. Although f(2) does not exist, x=2 is not a critical point because x=2 is not in the domain of f.

7. Concavity and Inflection Points: f(x)=0(9)(3)(2)(3x6)(3x6)4=54(3x6)3. f(x)>0(3x6)3>0x>2, and f(x)<0 when x<2. Therefore, f is concave up on (2,+) and is concave down on (,2).
Although the sign of f changes at x=2, the function does not have an inflection point at x=2 because x=2 is not in the domain of f.

8. Sketch: We can use the information in the previous steps to finish the sketch.

Figure 2
Figure 5: Graph of y=2x13x6
Example 2
Sketch the graph of f(x)=5x+3x21.

Solution 2
1. Domain: The domain of the function is Dom(f)={x| x210}={x| x21}={x| x1 or x1}=(,1][1,+).

2. Symmetry: None.

3. Asymptotes: The function does not have a vertical asymptote because it is continuous on its domain. Because limx±5x=±,limx±3x21=+ we have limx+f(x)=limx+(5x+3x21)=++=+. So the graph does not have a right-hand horizontal asymptote. To figure out if the graph has a left-hand horizontal asymptote, we need to find limxf(x), but limx(5x+3x21)=+ is indeterminate. To evaluate limxf(x), we multiply f(x) by its conjugate:
limxf(x)=limx(5x+3x21)=limx((5x+3x21)5x3x215x3x21)=limx25x29(x21)5x3x21=limx16x2(1916x2)x(53xx21)=(limx±16x)(limx±1916x5+3x2x21x2)(x2=x for x<0)=()(15+310)=. Therefore, f does not have horizontal asymptotes, but it may have oblique asymptotes. Recall that if y=mx+b is an oblique asymptote then f(x)/xm and f(x)mxb as x+ or x.
Oblique asymptote as x+: limx+f(x)x=limx+5x+3x21x=limx+(5+31xx21)=limx+(5+3x2x21x2)=5+310=8 and limx+(f(x)8x)=limx+(3x+3x21)=limx+((3x+3x21)3x+33x213x+3x21)=limx+9x2+3(3x21)3x+3x21=limx+33x+3x21=[3+]0. Therefore, y=8x is an oblique asymptote as x+.
Oblique asymptote as x limxf(x)x=limx5x+3x21x=limx(5+31xx21)=limx(53x2x21x2)=5310=2. and limx(f(x)2x)=0. Therefore, y=2x is an oblique asymptote as x.

4. Intercepts: The y-intercept: Because x=0 is not in the domain of f, the graph of f does not intersect the y-axis.

The x-intercepts: f(x)=0 5x+3x21=0 5x=3x21 Squaring each side: 25x2=9(x21) 16x2=9. So there is no solution and the graph of f does not intersect the x-axis.

5. Intervals of Increase or Decrease: f(x)=5+3(2x)2x21=5+3xx21. To determine the sign of f, first we find the zero(s) of f f(x)=0 5+3xx21=0 3xx21=5 (*)3x=5x21 Squaring both sides: 9x2=25(x21) x=±2516=±54. We note that only x=5/4 is acceptable, and x=5/4 is an extraneous solution (see Section 1.20), because in Equation (*), the right-hand side is negative  ($-5\sqrt{x^{2}-1}\leq0)andsomustbethelefthandsideandx$.

We need to determine the sign of f in three intervals (,5/4),(5/4,1), and (1,+). To do so, we choose a number in each interval and compute f for that number. For example, we may choose x=2 in (,5/4), x=1.2 in the interval (5/4,1), and x=2 in (1,+): f(2)=5+3(2)(2)21=5631.536>0 f(1.2)=5+3(1.2)(1.2)21=53.60.440.427>0 f(2)=5+3(2)221=5+63>0. Therefore,

 

\large x   54   1   1   +
sign of f(x)   +++ 0   undef   +++  
Increasing/Decreasing f(x)   ↗ max ↘       ↗  

6. Local Maxima and Minima: Because x=5/4 is a critical number f(5/4)=0 and the function changes from increasing to decreasing, f(5/4)=4 is a local minima.

7. Concavity and Inflection Points: f(x)=3x213x2x21x21=3(x21)3/2. Because (x21)3>0, f(x)<0 for every x in the domain and the graph is concave down in its domain. The direction of concavity does not change, so there is no point of inflection.

8. Sketch: Using this information, we sketch the graph in the following figure.

Figure 6
Figure 6: Graph of y=5x+3x21 and its oblique asymptotes.
Example 3
Sketch the graph of f(x)=xx213.

Solution 3
1. Domain: The function is defined for all values of x except x=±1, which would make the denominator zero.

2. Symmetry: The function is odd: f(x)=x(x)213=xx213=f(x) and therefore the graph is symmetric about the origin. This simplifies the sketch of the graph.

3. Asymptotes: (a) Vertical asymptote: The function is discontinuous at x=±1, so we need to find the limit of f(x) as x±1 to see if the function goes to infinity. Because of the symmetry of the graph, we investigate only the limit as x1: limx1+f(x)=limx1+xx213=[10+]+ limx1f(x)=limx1xx213=[10] (b) Horizontal asymptote: limx+xx213=limx+xx2/311x23=limx+x1/3limx+111x23=+(1)=+. So there is no horizontal asymptote.

(c) Oblique (or Slant) Asymptote: m=limx+f(x)x=limx+1x213=[1+]0. and limx+[f(x)mx]=limx+f(x)=+. So there are no oblique asymptotes either.

4. Intercepts: The x– and y-intercepts are both 0.

5. Intervals of Increase or Decrease: f(x)=1(x21)1/3x(13)(2x)(x21)2/3(x21)2/3=3(x21)2x2(x21)2/33(x21)2/3×(x21)2/3(x21)2/3=x233(x21)4/3. The denominator is always nonnegative, so the sign of f is solely determined by the sign of (x23). Therefore, f is negative between x=3 and x=3 and is positive everywhere else.

 

x   3   3   +
sign of f(x)   +++ 0 0 +++  
Increasing/Decreasing f(x)   ↗ max ↘ min ↗  

 

6. Local Maxima and Minima: It follows from the above table that f(3)=3(31)1/3=31/321/31.375 is a local minima, and x=3 gives a local maxima but we don’t need this information because we plot the graph for x0.

So far, we know the graph for x0 looks like this:

Figure 7

7. Concavity and Inflection Points: After some simplifications, we get f(x)=2x(9x2)9(x21)7/3

 

\large x \large -\infty   3   1   0   1   3   \large +\infty
sign of x   0 ++ + ++ + ++  
sign of 9x2   0 ++ + ++ + ++ + ++ 0  
sign of (x21)7/3   ++ + ++ 0 0 ++ + ++  
sign of f   ++ 0 undef ++ 0 undef ++ 0  
concavity of f(x)   up 0 down undef up   down undef up   down  

 

Because at x=±3 the direction of concavity changes, (3,f(3))=(3,1.5) and (3,f(3))=(3,1.5) are points of inflection.

8. Sketch: Using this information, we sketch the curve for x0 and then use the symmetry about the origin as in the following figure.

Figure 8
Figure 8: Graph of y=xx213.
Example 4
Sketch the graph of f(x)=sin3x1+cosx. [Hint: First simplify the expression and show that f(x)=sinx12sin2x provided 1+cosx0]
Solution 4
First, let’s simplify:

f(x)=sin3x1+cosx=sinx sin2x1+cosx=sinx (1cos2x)1+cosx=sinx (1cosx)(1+cosx)1+cosx=sinx (1cosx)=sinxsinx cosx=sinx12sin2x provided 1+cosx0. Therefore:

1. Domain: The function is defined for every x such that cosx1 or Dom(f)={x| cosx1}={x| x(2k+1)π,kZ} 2. Symmetry: The function is odd because f(x)=sin(x)12sin(2x)=sinx+12sin2x=f(x). so we can sketch the graph of f only for x>0 and then use the fact that its graph is symmetric about the origin.

The function is periodic with period 2π because f(x+2π)=sin(x+2π)+12sin(2x+4π)=sinx+12sin2x=f(x). So to sketch the graph of f, we can consider only the interval [0,2π] or [π,π]. However, the interval [π,π] is preferred because we can use the symmetry of the graph of f with respect to the origin and sketch the graph only over the interval [0,π].

Because f has a removable discontinuity at x=π: limxπf(x)=limxπ(sinx12sin2x)=0, we can sketch the graph of f for 0xπ and at the end remove the point (π,0) from the graph.

3. Asymptotes: f has no asymptotes by the virtue of continuity and periodicity.

4. Intercepts: The y-intercept is f(0)=0. To find the x-intecept, we set f(x)=0 f(x)=sinx12sin2x=0 or sinx (1cosx)=0. The solutions of sinx=0 in the interval 0xπ are x=0 and x=π, and the solution of cosx=1 in the interval 0x<π is also x=0. Because x=π is not in the domain of f, the curve intersects the x-axis only at x=0.

5. Intervals of Increase or Decrease f(x)=cosxcos2x. To find the roots of f cosx=cos2x or cosx=cos2xsin2x=2cos2x1 or 2cos2xcosx1=0. This is a quadratic equation in terms of cosx. So its solutions are cosx=b±b24ac2a=1±1+84=1, 12 The solutions of cosx=1 and cosx=1/2 in the interval [0,π) are cosx=1x=0 cosx=12x=ππ3=2π3. Therefore, the roots of f in the interval [0,π) are x=0,x=2π3. The sign of f in the intervals [0,2π/3] and [2π/3,π] can be obtained by testing a number in each interval: f(π2)=cosπ2cosπ=0(1)>0 and f(ππ6)=cos(ππ6)cos(2ππ3)=cosπ6cosπ3=3212<0

\large x \large 0   \large \frac{2\pi}{3}   \large \pi
sign of f(x) 0 +++ 0
Increasing/Decreasing f(x)   ↗ max ↘  

 

6. Local Maxima and Minima: In the interval [0,π], f(2π/3)=sin2π312sin4π3=sinπ312sin(π+π3)=sinπ312(sinπ3)(sin(θ+π)=sinθ)=32+34=334 is a local maximum.

7. Concavity and Inflection Points: f(x)=cosxcos2x f(x)=sinx+2sin2x To find the direction of concavity and inflection points, we set: f(x)=sinx+2sin2x=0 or sinx=2sin2x=4sinxcosx The zeros of f are sinx=0 and cosx=1/4 or sinx=0x=0,π cosx=12x=arccos141.31812. The signs of f in the intervals[0,arccos14] and [arccos14,π] are obtained by testing a number in each interval: f(π/6)=sinπ6+2sinπ3=12+2(32)>0 and f(π/2)=sinπ2+2sinπ=1+2(0)<0

 

\large x \large 0   \large \arccos\frac{1}{4}   \large \pi
sign of f(x) 0 +++ 0 0
Concavity of f(x)   Up   Down  

 

8. Sketch: Using this information, we sketch the graph of f for 0xπ and remove the point (π,0) from the graph (Figure 9(a)). Then we obtain the graph of f in the interval (π,π) using the symmetry about the origin (Figure 9(b)).

(a) Graph of f for 0x<π (b) Graph of f for π<x<π

Figure 9

Finally, using the periodicity of f, we extend the graph to obtain the complete graph of f (Figure 10).

Figure 5
Figure 10. Graph of f(x)=sin3x/(1+cosx).