Drawing Level Curves: Solving K=0 Problem

  • Context: MHB 
  • Thread starter Thread starter Yankel
  • Start date Start date
  • Tags Tags
    Curves Drawing
Click For Summary
SUMMARY

The discussion centers on the challenges of drawing level curves for the function \(f(x,y)=(y-2x)^{2}\) when \(k=0\). The resulting equation \(y=2x\) indicates a single line, leading to confusion as both MAPLE and Wolfram Alpha fail to depict a line through the origin. The issue arises from the degeneracy of the solution branches at \(k=0\), where both partial derivatives vanish, causing the implicit function theorem to fail. This results in a singular point, complicating the plotting process.

PREREQUISITES
  • Understanding of level curves and contour plots
  • Familiarity with implicit functions and the implicit function theorem
  • Basic knowledge of partial derivatives
  • Experience with plotting tools such as MAPLE and Wolfram Alpha
NEXT STEPS
  • Explore the implications of singular points in implicit functions
  • Learn advanced contour plotting techniques in MAPLE
  • Investigate the behavior of functions with degenerate solutions
  • Study the application of the implicit function theorem in more complex scenarios
USEFUL FOR

Mathematicians, educators, and students involved in calculus, particularly those focused on multivariable functions and contour plotting techniques.

Yankel
Messages
390
Reaction score
0
Hello all,

I have a question relating the drawing of levels curves.

The function is:

\[f(x,y)=(y-2x)^{2}\]

Fairly simple if I may add.

In order to draw the levels curves, I did:

\[(y-2x)^{2}=k\]

which resulted in:

\[y=2x\pm \sqrt{k}\]

So far so good. So for k=1, I get two straight lines, one intersecting the y-axis at -1 and one at 1. Same for every other value of k. However, when I put k=0, I get y=2x.

Drawing the levels curves in both MAPLE and Wolfram Alpha, resulted in plots in which there is no line going through the origin. My question is why ? What am I missing about k=0 ?

Thank you !

View attachment 7945
 

Attachments

  • lc.PNG
    lc.PNG
    14 KB · Views: 161
Physics news on Phys.org
I think the issue is that for $k = 0$ the two solution branches of $f(x,y) := (y - 2x)^2 = k$ degenerate into one branch (line). In Maple, you can try something like
Code:
f := (x,y) -> (y - 2*x)^2:
eps := 0.05:
plots:-contourplot(f, -3..3, -3..3, contours = [eps, 1, 3]);
As you decrease the value of "eps", you will see the corresponding branches not only approach each other, but also their plots become worse and worse. (This can be partially compensated for by increasing the number of grid points using the "grid" option of the plotting command.) In the left figure we have eps = 0.05 and in the right figure we have eps = 0.025.

Note that if $(x_0,y_0)$ is a point on the contour corresponding to $k = 0$, then indeed $y_0 = 2x_0$ and both partial derivatives $D_xf(x_0,y_0)$ and $D_yf(x_0,y_0)$ vanish, so the implicit function theorem fails badly.
 

Attachments

  • contours.png
    contours.png
    9.5 KB · Views: 134
  • contours.png
    contours.png
    9.6 KB · Views: 142
Last edited:
Here's some comments on drawing graphs of "implicit" functions. I don't know how WolframAlpha draws such, but probably it's similar to what I have done. To draw such a graph f(x,y) = 0, partition the rectangle of interest in the x-y plane into a bunch of "small" rectangles. In each small rectangle, look for a point $(x_0,y_0)$ satisfying the equation. Here, the equation of the tangent plane to z = f(x,y) at $(x_0,y_0)$ is very useful. Of course this tangent plane "normally" is found with the aid of the 2 first partial derivatives of f. However, if these two partials are 0, something else must be done to look for a solution in the rectangle. Such a "bad" point on the graph is called a singular point. This makes the drawing algorithm work much "harder" (slower). In any event, after a bunch of points are found in the small rectangles, conceptually one has a bunch of dots. Just connect the dots.

Here's a sequence of drawings that might be instructive. Each drawing is the graph of
$$\sin(\pi\sqrt{x^2+y^2})=c$$
First c=1/2, then c=0.99. These graphs are pairs of concentric circles with the distance between a pair of circles smaller as c gets larger. The last graph is when c=1. Here, every point on the graph is a singular point! Aside, I couldn't get WolframAlpha to draw this graph.

View attachment 7986

Here the "connect the dots" results in a poor drawing.View attachment 7987

Here's the same graph with only the dots plotted.

View attachment 7988

Make the mesh of the partition finer (more rectangles):

View attachment 7989

Finally, the graph of all singular points:

View attachment 7990
 

Attachments

  • MHBcalc7.png
    MHBcalc7.png
    14.9 KB · Views: 122
  • MHBcalc7a.png
    MHBcalc7a.png
    13.4 KB · Views: 127
  • MHBcalc7b.png
    MHBcalc7b.png
    13.4 KB · Views: 128
  • MHBcalc7c.png
    MHBcalc7c.png
    12.6 KB · Views: 132
  • MHBcalc7d.png
    MHBcalc7d.png
    8.1 KB · Views: 113

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
6
Views
3K