Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Prerequisites:
Intro to Sage
Graphing and Solving Equations
Differentiation
Function Analysis, Part 1
Function Analysis, Part 2
We continue to try to understand the key features of a function using calculus, rather than depending on a graph alone. In part 1, we only had functions with domain . In this lab, we'll consider functions where the function (or its derivative) has domain restrictions.
Example 1
Analyze and graph .
Step 1 Find the domain. Discuss vertical asymptotes and holes.
For a rational function, the domain is all real numbers such that the denominator is not . So let's find out when the denominator is .
The denominator is when , , or . So the domain is all real numbers except , , and , in other words, .
We need to determine what happens near these holes in the domain, so we will take limits.
Based on these limits, we know that has vertical asymptotes at and , and has a hole at the point .
Step 2 Find the derivative.
Step 3 Find the critical points of .
We need to know where the derivative is or undefined. Notice that the derivative has the same denominator as , so it has the same gaps in the domain (, , and ).
Now let's find where the derivative is .
So is at and .
Step 4 See if the sign of actually changes at the critical points of , and determine whether has a local maximum or local minimum at these points.
First, we'll check x-values near .
Since changes sign from negative to positive, has a local min at .
Now check x-values near .
Since changes sign from positive to negative, has a local max at .
Step 5 Find .
Step 6 Find the critical points of .
Once again, is undefined at the same x-values as and (, , and ).
Now we'll find where is .
We have one real solution, so is at .
Step 7 See if the sign of actually changes at the critical points of , and determine whether has an inflection point at these points.
Check the sign of near .
Since changes sign from negative to postive, changes from concave down to concave up at , so has an inflection point here.
Step 8 Find the x- and y-intercepts.
Step 9 Determine the end behavior.
So the x-axis is a horizontal asymptote for this function.
Step 10 Make an informed graph. Mark any - and -intercepts, relative maxima and minima, and inflection points.
First, we'll calculate the function values at the critical points.
So, we'll need a graph that covers these three points. We also need to remember the hole, vertical asymptotes, and intercepts.
Here is a first attempt:
So this picture is not very clear. We need to make xmin smaller so we can see more of the branch on the left. It would also be nice to extend the range on the y-axis. The vertical asymptotes at and are marked with solid lines, but it would be nice to make them dashed instead. We also should mark the hole at .
We can see the local minimum at , but the local maximum at is not clear from the graph. We also can't see the inflection point at . The x-intercept at is also not obvious.
If we want to see all these features, we'll need a really big picture (which won't fit on our screen).
So we will have to produce a second graph that reveals the local max, inflection point, and x-intercept.
Here's another graph of the overall picture, and then we'll do a second plot that zooms in on the positive x-axis.
This is a good picture of the overall shape. Note: I do not expect you to add dashed lines for the asymptotes or open circles for the holes.
Here is a close up so we can see the local max and inflection point:
This is another good example of why we bother analyzing the function with calculus. A single graph may not show all the important features of a function.
Step 11 Discuss absolute max/min, increasing/decreasing, concave up/down.
There is no absolute max or min.
The function is increasing on , , and .
The function is decreasing on , , and .
The function is concave up on and .
The function is concave down on , , and .
Comment: Notice where all the endpoints come from: critical points and domain restrictions (don't forget the hole at ).
Example 2
Analyze and graph .
Step 1 Find the domain. Discuss vertical asymptotes and holes.
The domain of is .
There is a vertical asymptote or hole at . We'll use a limit to determine which it is.
Since the limit is infinite, there is a vertical asymptote at .
Step 2 Find the derivative.
Step 3 Find the critical points of .
The derivative has the same domain as the original , so we just need to find where the derivative is 0.
Our one critical point is .
Step 4 See if the sign of actually changes at the critical points of , and determine whether has a local maximum or local minimum at these points.
Since changes sign from positive to negative, has a local max at .
Step 5 Find .
Step 6 Find the critical points of .
has the same domain as and , so we need to find where is 0.
We have at .
Step 7 See if the sign of actually changes at the critical points of , and determine whether has an inflection point at these points.
Since changes sign, there is an inflection point at .
Step 8 Find the x- and y-intercepts.
There is no y-intercept, since 0 is not in the domain.
Step 9 Determine the end behavior.
We have a vertical asymptote at (y-axis) and a horizontal asymptote at (x-axis).
Step 10 Make an informed graph. Mark any - and -intercepts, relative maxima and minima, and inflection points.
Our graph needs to include and their corresponding y-values.
Here is a first attempt. Notice that the inflection point and the horizontal asymptote are not clear.
Here is a second attempt, with the important points marked.
Step 11 Discuss absolute max/min, increasing/decreasing, concave up/down.
There is no absolute min. The absolute max is at .
The function is increasing on and decreasing on .
The function is concave up on and concave down on .
Example 3
Analyze and graph
Step 1 Find the domain. Discuss vertical asymptotes and holes.
The only potential domain issue is dividing by 0, but since is never 0, the domain is .
Step 2 Find the derivative.
Step 3 Find the critical points of .
First, we'll think about where the derivative is undefined.
Looking back at the formula for , we see we get division by 0 when .
So the derivative is undefined at , so this is a critical point.
Now we'll find where the derivative is 0.
Notice that Sage gives as a solution, even though we know does not exist. This is actually a mistake in Sage's solve command.
But the other two numbers are places where the derivative is 0, so they are critical points. Let's convert them to decimals.
We have three critical points: , and .
Step 4 See if the sign of actually changes at the critical points, and determine whether has a local maximum or local mininum at these points.
Since changes sign from negative to positive, has a local min at .
Since changes sign from negative to positive, has a local min at .
Since changes sign from postive to negative, has a local max at .
Step 5 Find .
Step 6 Find the critical points of .
Looking at the formula for , we see the same problem with division by 0 that we saw for , so does not exist.
Now we need to find where .
Notice that Sage incorrectly gives us again.
Let's convert the four remaining solutions to decimals.
Notice that all four of these solutions have "" in the answer. This is Sage's notation for , and it usually indicates a complex number (which we will ignore). However, as we can see from the decimal approximation, the imaginary part of these solutions actually cancels out in the end, and all four solutions are real numbers (Notice the scientific notation in each of the decimals above).
We conclude that has five critical points: , , , , and .
Step 7 See if the sign of actually changes at the critical points of , and determine whether has an inflection point at these points.
Since does not change sign at , does not have an inflection point here.
Since the sign changes, has an inflection point at .
Since the sign changes, has an inflection point at .
Since the sign changes, has an inflection point at .
Since the sign changes, has an inflection point at .
Step 8 Find the x- and y-intercepts.
The x-intercept is , and the y-intercept is .
Step 9 Determine the end behavior.
This function has no horizontal asymptote.
Step 10 Make an informed graph. Mark any - and -intercepts, relative maxima and minima, and inflection points.
Our graph needs to include the following x-values with their corresponding y-values:
We don't want the inflection point at to be right on the edge of the graph, so let's try and .
It's hard to see that the function is concave down on the left side, but if we went far enough in the negative direction to see that, we would obscure the rest of the graph.
Step 11 Discuss absolute max/min, increasing/decreasing, concave up/down.
There is no absolute maximum.
The absolute minimum is 0 at .
The function is increasing on and .
The function is decreasing on and .
The function is concave up on and
The function is concave down on , , , and .