Artificial Intelligence 🤖
Curve sketching

Curve sketching

There is no universal way of going about sketching the graph of a function. For complicated functions, sketching the graph may be impractical; in such cases, computer plots are more helpful. In this section we outline some points that are useful when considering the shape of graphs.

  1. Is the function ff even, odd, periodic?
  2. Does the graph cross the xx or yy axes?
  3. Does ff have stationary points? If so, what is their nature?
  4. Does the graph have asymptotes (lines or curves the function approaches as x±x \rightarrow \pm \infty or y±)y \rightarrow \pm \infty) ?

Local and global extrema

The figure shows the function y=f(x)y=f(x). It has 3 stationary points at x=4,1,1x=-4,-1,1. The point (4,y1)\left(-4, y_{1}\right) is a local and global minimum, (1,y2)\left(1, y_{2}\right) is a local minimum and (1,y3)\left(-1, y_{3}\right) is a local and global maximum.

  1. If f(x)>0f^{\prime}(x)>0 for every xx on some interval, I\mathcal{I} then f(x)f(x) is increasing on the interval. Similarly, if f(x)<0f^{\prime}(x)<0 for every xx on I\mathcal{I} then f(x)f(x) is decreasing on the interval. If f(x)=0f^{\prime}(x)=0 for every xx on I\mathcal{I} then f(x)f(x) is constant on the interval.
  2. Is the function concave up or down? If f(x)>0(f(x)<0)f^{\prime \prime}(x)>0\left(f^{\prime \prime}(x)<0\right) for all xx on some interval I\mathcal{I} then f(x)f(x) is concave up (concave down) on I\mathcal{I}.

Let us consider a function f(x)=x33xf(x)=x^{3}-3 x where we want to extract information on its graph. We first note that f(x)=f(x)f(-x)=-f(x) and hence the function is odd. The function has 3 roots which occur at f(x)=0f(x)=0 given at x=0x=0 and x=±3x= \pm \sqrt{3}. Further, there are two stationary points at x=±1x= \pm 1 where f(x)=0f^{\prime}(x)=0 and, by application of the second derivative test, f(1)<0f^{\prime \prime}(-1)<0 so x=1x=-1 is a maximum while f(1)>0f^{\prime \prime}(1)>0 and so x=1x=1 is a minimum. Finally f(x)f(x) tends to ±\pm \infty as x±x \rightarrow \pm \infty. This gives us enough information to sketch the graph of f(x)f(x):

Graph Sketching

Rational functions

Consider now a function f(x)f(x) given as

f(x)=P(x)Q(x)f(x)=\frac{P(x)}{Q(x)}

where PP and QQ are polynomial functions. The graph of ff has vertical asymptotes if QQ has real zeros, assuming that PP does not have zeros at the same points. For instance, consider the odd function

f(x)=x3x21f(x)=\frac{x^{3}}{x^{2}-1}

The graph of ff has vertical asymptotes at x=±1x= \pm 1. For the case where the degree of P(x)P(x) is greater than the degree of Q(x)Q(x) (like in our example), long division gives us a quotient, q(x)q(x) and a remainder, r(x)r(x) such that

f(x)=P(x)Q(x)=q(x)+r(x)Q(x),f(x)=\frac{P(x)}{Q(x)}=q(x)+\frac{r(x)}{Q(x)},

provided that the degree of r(x)r(x) is strictly less than that of Q(x)Q(x). It follows that r(x)/Q(x)0r(x) / Q(x) \rightarrow 0 as x±x \rightarrow \pm \infty and so f(x)f(x) and q(x)q(x) are close to each other. In our example, the degree of PP is one more than the degree of QQ and the quotient is a linear function known as the slant asymptote. To determine q(x)q(x) for our example, we rewrite f(x)f(x) as

f(x)=x11x2f(x)=\frac{x}{1-\frac{1}{x^{2}}}

Using the binomial expansion for the term in the denominator we have

(11x2)1=1+1x2+1x4+\left(1-\frac{1}{x^{2}}\right)^{-1}=1+\frac{1}{x^{2}}+\frac{1}{x^{4}}+\cdots

Recall that in the binomial expansion given by (1+x)n(1+x)^{n} with nn not a positive integer, the resulting series does not terminate and it converges for 1<x<1-1<x<1. In our case, we have (11/x2)1\left(1-1 / x^{2}\right)^{-1} so we would expect convergence in 1<x2<1-1<x^{-2}<1. Note that f(x)q(x)f(x) \approx q(x) when xx is large (and x2x^{-2} is small). Substituting the series expansion in:

f(x)x(1+1x2+1x4+)f(x) \approx x\left(1+\frac{1}{x^{2}}+\frac{1}{x^{4}}+\cdots\right)

as x±,f(x)q(x)=xx \rightarrow \pm \infty, f(x) \approx q(x)=x. Further, a Maclaurin expansion around x=0x=0 gives f(x)=x3+O(x5)f(x)=-x^{3}+\mathcal{O}\left(x^{5}\right); it follows that near x=0x=0 the graph of ff looks like x3-x^{3}.

Graph Sketching Rational functions

The graph of the function y=f(x)y=f(x) where f(x)f(x) is given by f(x)=x3x21f(x)=\frac{x^{3}}{x^{2}-1}. There are two vertical asymptotes at x=±1x= \pm 1 shown with grey, dashed lines and a slant asymptote given by y=xy=x shown with a red, dashed line. Near x=0x=0, the function behaves like x3-x^{3}.