The Folium of Descartes

Important:  To view this notebook, first go to the "kernel" menu, choose "evaluation" and then "evaluate notebook".  I have removed all the output from this notebook to conserve space.

In this demonstration, we consider the curve (the Folium of Descartes)  (x^3) + (y^3) - 6 xy = 0.
As we saw in class,  it is quite easy to find the slope of the tangent line to the  curve at any given point on the curve, by implicit differentiation.   What is not so clear is how one finds any points on the curve!! The points (3,3) and (0,0) are easy to identify as points on the curve.  (Why?)
But what point(s) lie on the curve over x=2 or x=4?

First I'm going to run a small program for generating a lot of points on the curve, so I can plot the curve.   I am hiding the program here and only showing you the plot.

points = {}; n = 200; For[i = 1, i ≤ n, i++, x = -4 + ((i 8)/n); 
      newpoints = Point/@({x, y} /. NSolve[p[x, y] == 0]); 
      newpoints = 
        Select[newpoints, 
          Im[#1[[1, 2]]] == 0&]; 
      points = points ⋃ newpoints]

Show[Graphics[points], Axes -> True, AspectRatio -> 1]

Now let's return to the problem of finding at least a few points on the curve, for example, the point over x = 4.

p[x_, y_] := (x^3) + (y^3) - 6 x y

p[4, y]

To find the point over x = 4,  we need to solve p[4,y] = 0.  We find there is only one solution, by considering the following plot.

Plot[p[4, y], {y, -10, 10}]

The following is a built-in Newton's method function in Mathematica.   It finds a root of a function given an initial guess.  We are going to discuss Newton's method of root finding as the next topic in the course.  You will see that  calculus is very useful for solving equations.

FindRoot[p[4, y] == 0, {y, -6}]

Now I want to find the slope of the tangent line to the graph at (4,-5.90275).  We can easily derive a formula for  y/  in terms of x and y by the method of implicit differentiation.

yprime[x_, y_] := -(((x^2) - 2 y)/(-2 x + (y^2)))yprime[4, -5.90275]

So the slope at (4,-5.90275)  is  -1.03588.

Now look at the situation at x=2.  There are three point on the graph of the relation at x=2.

p[2, y]

Plot[p[2, y], {y, -10, 10}]

We find the y=coordinates of the three points.

FindRoot[p[2, y], {y, -5}]FindRoot[p[2, y], {y, 0}]FindRoot[p[2, y], {y, 5}]

Find the slope of the tangent line at the middle point (2,0.694593).

yprime[2, 0.694593]