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.
Path: blob/main/141-Labs/Lab 06 - Implicit Differentiation.ipynb
Views: 491
Lab 06 - Implicit Differentiation
Overview
In this lab, we will learn how to use SageMath to find derivatives of functions defined implicity.
Important SageMath Commands Introduced in this Lab
ParseError: KaTeX parse error: Undefined control sequence: \hfill at position 32: …|l|l|} \hline \̲h̲f̲i̲l̲l̲ ̲\textbf{Command…Related Course Material
Example 1
Consider the Folium of Descartes . In this example, we will do the following:
Use implicit differentiation to find
Find the equation of the tangent line to the Folium of Descartes at the point
Graph the curve, the point, and the tangent line
Find all points on the Folium of Descartes which have a horizontal tangent line or a vertical tangent line
First, will use SageMath to find using implicit differentiation. In order for SageMath to calculate , we need to use the command to let SageMath know that is a function which depends on .
Next, we will take the derivate with respect to of both sides of our equation. Since we made a funciton of , SageMath will automatically use the chain rule when it takes the derivative of .
Recall that we can make SageMath display the output in a nicer and more readable way by using the command.
The next thing we need to do is solve this equation for which we can have SageMath do for us using the command from Lab 4.
Therefore, we see that .
Now, we will find the equation of the tangent line of the Folium of Descartes at the point . (Note: This is a point on the graph of the Folium of Descartes since if we replace both and with in the equation, we get a true statement.) We already know the -value and -value of the point, so the only thing we have left to find is We can do this in SageMath by first creating the function which, in this example, depends on both and . Note that when creating this function, we will need to use as a variable, however, earlier we made a function of , so we have to overwrite that by using the command.
Thus, we see that It follows that the equation of the tangent line of the Folium of Descartes at the point is
Now, let us plot the Folium of Descartes, the point , and the tangent line at all on the same graph. In order to plot them all on the same graph, we will assign each of these three objects to a variable and then use the command. To plot the Folium of Descartes, we have to make use of the ParseError: KaTeX parse error: Expected 'EOF', got '_' at position 17: …textbf{implicit_̲plot}(\textit{e… command since it is defined implicitly. To graph the point, we need to make use of the command. Both of these commands can use some of the options we use in plot, such as color.
Lastly, we will find all of the points on the Folium of Descartes which have either a horizontal or vertical tangent line. Recall that horizontal tangent lines occur at points where . We will use the command to determine what points both lie on the Folium of Descartes and satisfy
Note that some of the solutions SageMath gave are imaginary; that is, they involve the imaginary constant , so we will disregard these. Therefore, the only two points which are on the Folium of Descartes and have a horizontal tangent line are and rougly .
Vertical tangent lines occur at points where . Note that is simply the reciprocal of . Again, we use the command to determine which points lie on the Folium of Descartes and make .
Again, SageMath gives some imaginary solutions which we will disregard. It follows that the only two points which are on the Folium of Descartes and have a vertical tangent line are and rougly .
Example 2
Repeat Example 1 with the function and the point .
Example 3
Repeat Example 1 with the function and the point .
Example 4
Repeat Example 1 with the function and the point (1,1).