Section 13.3 Implicit Differentiation
We need to use the
implicitdiff() command to find the derivative of an implicit function. It is easiest to first assign a name to the equation.
> E := y^2 = x^3 - 2*x + 1;
\begin{equation*}
\displaystyle E\, := \,{y}^{2}={x}^{3}-2\,x+1
\end{equation*}
> dydx := implicitdiff(E, y, x);
\begin{equation*}
\displaystyle dydx\, := \,\frac{3x^2 - 2}{2y}
\end{equation*}
The order in which you list the variables matters; the first variable is treated as the dependent variable and the second variable is treated as the independent variable. To find \(dy/dx\text{,}\) you must use
implicitdiff(E,y,x) and to find \(dx/dy\text{,}\) you must use implicitdiff(E,x,y).
> dxdy := implicitdiff(E, y, x);
\begin{equation*}
\displaystyle dydx\, := \,\frac{2y}{3x^2 - 2}
\end{equation*}
When trying to find the slope of a tangent line at a point on an implicit curve, it helps to plot the curve first. There may be several different \(y\)-values for a single \(x\)-value on the curve.
> L := x^2 + (y - root[3](x^2))^2 = 1;
\begin{equation*}
\displaystyle L\, := \,{x}^{2}+ \left( y-\sqrt [3]{{x}^{2}} \right) ^{2}=1
\end{equation*}
> with(plots): > implicitplot(L, x=-1.2..1.2, y=-1.2..1.8);
To find the points on the curve at a specific \(x\) value, you must first substitute the value into the equation and then solve for the \(y\)-coordinates. Here, we can find the \(y\)-coordinates on the curve when \(x=0.5\text{.}\)
> subs(x=0.5, L); yCoords := fsolve(%);
\begin{equation*}
\displaystyle 0.25+ \left( y- 0.6299605249 \right) ^{2}=1
\end{equation*}
\begin{equation*}
\displaystyle yCoords\, := \, 1.495985929,\,- 0.2360648789
\end{equation*}
Notice that two \(y\)-coordinates are assigned to \(yCoords\) here. This means that \(yCoords\) is now a list. Lists can contain many objects and have a definite order. To use the first value in this list, you would need to type
yCoords[1] and to use the second value in this list, you would need to type yCoords[2]. If you prefer, you may assign the individual values to unique names.
To find the slopes of the two tangent lines to the curve at \(x=0.5\text{,}\) we start by computing the derivative with
implicitdiff().
> dydx := implicitdiff(L, y, x);
\begin{equation*}
\displaystyle dydx\, := \,{\frac {x \left( -3\, \left( {x}^{2} \right) ^{2/3}-2\,\sqrt [3]{{x}^{2}}+2\,y \right) }{ 3\left(y\left( {x}^{2} \right) ^{2/3}-{x}^{2}\right)}}
\end{equation*}
Now we can substitute \(x=0.5\) and the \(y\) value for each of the two points to determine the slopes.
> subs(x=0.5, y=yCoords[1], dydx);
\begin{equation*}
\displaystyle 0.2625970976
\end{equation*}
> subs(x=0.5, y=yCoords[2], dydx);
\begin{equation*}
\displaystyle 1.417297636
\end{equation*}
