Sage Assignment 2
Complete the following two problems (in this file) by Wednesday, 3/16, 11:59pm. (I recommend finishing it before Spring Break.)
Problem 1: Plot together with the tangent line to the function at the point in one graph. Make the function and the tangent line different colors. So long as both graphs are clearly visible, you may choose whatever colors you like. Choose a suitable range of values for your graph.
Hint and Warning: Sage does not understand the notation like we do! Notice that entering cos^2(pi)
(for example) produces an error message. As the mathematician operating Sage, it is up to you to know what above means, and enter the appropriate expression into Sage. (See you professor or a tutor if you are stuck.)
For ease, we will let sage compute the neccessary derivative and evaluate at the point to get the slope:
Problem 2: For the function [ f(x) = x^5 - 3 x^4 + x - 2 ] on the interval , do the following:
Find all critical points of the function. State the (approximate) location of all critical points.
Find the value of the function at all critical points, and at the endpoints of the interval.
State clearly the (absolute) maximum value and the (absolute) minimum value of the function on the interval, and the x-values where these occur.
You should use the Sage command find_root
to numerically solve equations that would otherwise be too difficult to solve.
In addition to appropriate Sage commands, be sure to insert some markdown cells with your text explanations. Remember that you start a markdown cell with %md
, then on the next line, you can type your response, and then hit [shift]-[return]
.
Hint: You may find this problem easier if you refer to a graph, both for helping you see what is going on, and for finding an appropriate interval to use find_root
on. Don't neglect the graphs! (But the graph is not a substitute for performing the rest of the problem.)
Let's define the function and derivative, then plot the function and the derivative on . For ease of recognition, I'll plot the derivative in red:
There appears to be a critical point near , so use find_root
to locate it, and call that point x0
:
Now test f at the end points and critical points:
The maximum appears to be about (at ) and the minimum is (at ).