###### Motivating Questions

How do we put together all the thing Calculus tells us about a function to make a sketch of its graph?

How do we put together all the thing Calculus tells us about a function to make a sketch of its graph?

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

- Find its \(y\)-intercept.
- Find \(f'(x)\) and use it to find the intervals where \(f\) is increasing and the intervals where \(f\) is decreasing.
- Find the local maximums and local minimums of \(f\), and their locations.
- Find \(f''(x)\) and use it to find the intervals where \(f\) is concave up and the intervals where \(f\) is concave down.
- Find the inflection points of \(f\).
- Sketch a graph of \(f\) consistent with the information you gathered above.

The three main steps in curve sketching are the following:

- Gather information about the function. We will always want to gather information using the first and second derivatives. Sometimes we will also want other information, such as asymptotes.
- Organize the information you gathered. Make a single number line and mark on it the sign chart for \(f'\), the sign chart for \(f''\), the shape of \(f\) on each interval, maximums and minimums, asymptotes, and whatever else you can.
- Make a graph consistent with the information you gathered and organized.

Let \(\displaystyle f(x)=\frac{1}{x^2-9}\).

- Find the domain of \(f\).
- Find the \(y\)-intercept and \(x\)-intercepts.
- Determine if \(f\) is even, odd, periodic, or none of those.
- Find all vertical and horizontal asymptotes.
- Find intervals when it is increasing or decreasing and its maximums and minimums.
- Find the intervals when it is concave up or concave down and its inflection points.
- Organize the information you gathered.
- Sketch the graph.

After doing all this work, you may be wonderiing why we did not just plug the function into a calculator or computer to graph. While technology can be very useful, there are a few reasons to do these by hand.

- Technology can miss things. Important features might be too small to see, or not in the plotting window.
- Technology has trouble with certain features, such as vertical asymptotes.
- Analysis by hand allows us to understand how the graph depends on parameters.
- Analysis by hand develops understanding and intuition about functions. Even if you then use technology to make a plot, you can use what you learned by doing analysis by hand to understand what you are seeing.

The computational cell below gives an in-between option. It computes some things that you would need for analysis by hand.

The order in which you gather information about the function is not so important, but it is useful to have a list so you do not forget anything.

- Domain
Determine the domain of \(f\). Look for places to exclude, such as division by 0, even roots of negative numbers, logarithms of 0 or negative numbers, etc.

- \(y\)-intercept
Compute \(f(0)\) to get the point \((0,f(0))\) on the graph.

- \(x\)-intercepts
Set \(f(x)=0\) and see if you can solve it. Sometime this is too hard (or impossible) and can be skipped.

- Is it even?
If \(f(x)=f(-x)\) (such as with \(f(x)=x^2\)) then the function is even. You can save half the work by sketching \(f\) for \(x \ge 0\) and then reflecting it over the \(y\)-axis to get the sketch of \(f\) for \(x \le 0\). It is okay to skip this step, but it can save you work.

- Is it odd?
If \(f(x)=-f(-x)\) (such as with \(f(x)=x^3\)) then the function is odd. You can save half the work by sketching \(f\) for \(x \ge 0\) and then reflecting it over the \(y\)-axis and then over the \(x\)-axis to get the sketch of \(f\) for \(x \le 0\). It is okay to skip this step, but it can save you work.

- Is it periodic?
If \(f(x+p)=f(x)\) for some \(p\not= 0\) (such as with \(f(x)=\sin(x)\) for \(p=2\pi\)) then the function is periodic. You can then do the work and sketch on the interval \([0,p]\) and then say it continues periodically.

- Vertical asymptotes
If \(\displaystyle \lim_{x\rightarrow a^+} f(x)= \infty\), \(\displaystyle \lim_{x\rightarrow a^-} f(x)=\infty\), \(\displaystyle \lim_{x\rightarrow a^+} f(x)=- \infty\), or \(\displaystyle \lim_{x\rightarrow a^-} f(x)=-\infty\), then \(f\) has a vertical asymptote at \(x=a\). This normally happens when you would divide by 0 at \(a\) or take the logarithm of 0 at \(a\).

- Horizontal asymptotes
If \(\displaystyle \lim_{x\rightarrow \infty} f(x)=L\) or \(\displaystyle \lim_{x\rightarrow -\infty} f(x)=L\) (with \(L\not=\pm\infty\)), then \(f\) has a horizontal asymptote at \(y=L\).

- Increasing, decreasing
Compute \(f'(x)\). Find when \(f'(x)\) equals zero or does not exist to locate the critical numbers. Make a sign chart to determine the intervals where \(f\) is increasing and the intervals where \(f\) is decreasing.

- Maximums, minimums
Use your sign chart to determine which critical numbers give maximums, which give minimums, and which give neither. Compute the values of the maximums and minimums by plugging the critical number \(c\) into \(f\). This gives a point \((c,f(c))\).

- Concavity
Compute \(f''(x)\). (You may want to simplify \(f'(x)\) first.) Find when \(f''(x)\) equals zero or does not exist to locate potential changes in concavity. Make a sign chart to determine the intervals where \(f\) is concave up and the intervals where \(f\) is concave down.

- Inflection points
Use your sign chart for \(f''\) to determine when the concavity changes. Compute the values of \(f\) at these locations to get inflection points \((c,f(c))\).

Analyze and graph the function \(f(x)=x\sqrt{5-x}\).

Analyze and graph the function \(f(x)=e^{-x^2}\).

Analyze and graph the function \(f(\theta)=2\cos(\theta)+\cos^2(\theta)\).

Analyze and graph the function \(f(x)=x\ln(x)\).