Implicit Differentiation
Calculus I
Andy Long

Clear["Global`*"]

Let’s start with a simple example, of an hyperbola:

Clear[x,y,f]
f[x_]:=1/x
Plot[{x,f[x]},{x,-6,6},PlotRange->{{-6,6},{-6,6}},AspectRatio->1]
(* here is y differentiated exlicitly: *)
f'[x]
(* and here is y differentiated implicitly: *)
eqn=D[x y[x]==1,x]
Solve[eqn,y'[x]]

Example #2, p. 159: notice that the folium of Descartes is not a function, as we understand it: it doesn’t pass the vertical line test. However, we can still find the slope of a tangent line by differentiation:

Clear[x,y]
sol=Solve[x^3+y^3==6x y,y,Reals];
eqn=D[x^3+y[x]^3==6x y[x],x]
soln=Solve[eqn,y'[x]]
x=3
soln

(* Example #2, p. 159: the better way to do this is by graphing parametrically(but we haven't gotten to that):
 *)

r[theta_]:=(6 Cos[theta]Sin[theta])/(Sin[theta]^3+Cos[theta]^3);
Plot1=ParametricPlot[{r[theta]Cos[theta],r[theta]Sin[theta]},{theta,0,2*Pi}];
m=-1
Plot2=Plot[m*(x-3)+3,{x,2,4},PlotRange->{{-1,4},{-1,4}},AspectRatio->1];
Show[Plot2,Plot1]

#29, p. 162: notice that the cardioid is not a function, as we understand it: it doesn’t pass the vertical line test. However, we can still find the slope of a tangent line by differentiation:

Clear[x,y,f]
sol=Solve[x^2+y^2==(2x^2+2y^2-x)^2,y,Reals];
eqn=D[x^2+y[x]^2==(2x^2+2y[x]^2-x)^2,x]
soln=Solve[eqn,y'[x]]
x=0
y[x]=1/2
soln

(* #29, p. 162: the better way to do this is by graphing parametrically, but we haven't gotten to that yet: we convert from rectangular (x,y) coordinates to polar (r,theta) coordinates, and life gets better:

r^2=(2r^2-r*Cos[theta])^2
r=2r^2-r*Cos[theta]
1=2r-Cos[theta]
(1+Cos[theta])/2=r
 *)

r[theta_]:=(1+Cos[theta])/2;
Plot1=ParametricPlot[{r[theta]Cos[theta],r[theta]Sin[theta]},{theta,0,2*Pi}];
m=1
Plot2=Plot[m*x+1/2,{x,-1,1}];
Show[Plot1,Plot2]

(* #49, p. 163: 
for this one I graph a collection of circles of different radii (notice that we have to do two separate equations for each circle), and lines with both positive and negative slopes: *)
list={.001,.01,.1,1,2,3,4,10,100};
Plot[{
Sqrt[list^2-x^2],
-Sqrt[list^2-x^2],
x/list,
-x/list
},{x,-4,4},PlotRange->{-4,4}, AspectRatio->1]