Drawing contour lines in Geogebra for given functions

  • Topic:
  • Thread starter mathmari
  • Start date
  • Tags Tags
    Lines
10 replies · 4K views · last reply
mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! :o

I am looking at the following:

1. We have the function $f(x,y)=y-x^2-1$. Write the appropriate commands in Geogebra that draw a contour line with $f(x,y)=\frac{3709}{2000}$.

Could you give me a hint what command we have to use here? Do we just plot $y-x^2-1=\frac{1374}{2000}$ ? (Wondering)
2. Give the graph of the below functions in Geogebra and find the countour lines $f(x,y)=c$ where $c$ is in the interval $[0,10]$ and each contour line has to have distance from the next one $0.4$.
  • $f(x,y)=\cos (xy)$
  • $f(x,y)=\frac{2}{\sqrt{x^2+y^2}}+\frac{2}{\sqrt{(x-1)^2+y^2}}$

Do we use for that the command "Sequence(\cos (xy)=c, c, 0, 10)" ? (Wondering)
 
mathmari said:
Hey! :o

I am looking at the following:

1. We have the function $f(x,y)=y-x^2-1$. Write the appropriate commands in Geogebra that draw a contour line with $f(x,y)=\frac{3709}{2000}$.

Could you give me a hint what command we have to use here? Do we just plot $y-x^2-1=\frac{1374}{2000}$ ?

Hey mathmari!

A contour line is a curve on a surface $z=f(x,y)$ for a fixed $z$ isn't it? (Wondering)

But if we specify $y-x^2-1=\frac{1374}{2000}$, we do not get such a curve do we?
Instead we are getting a different surface.
Makes sense, because we have effectively specified an equation in x and y without specifying z.
So Geogebra shows a surface that satisfies the equation for x and y, and shows it for any z.
It's a parabolic cylinder. (Worried)

I think that instead we need the intersection of the surface $z=f(x,y)$ and the plane $z=\frac{3709}{2000}$, don't we?
Can we do that? (Wondering)

Btw, should the constant be $\frac{3709}{2000}$ or $\frac{1374}{2000}$? (Nerd)
mathmari said:
2. Give the graph of the below functions in Geogebra and find the countour lines $f(x,y)=c$ where $c$ is in the interval $[0,10]$ and each contour line has to have distance from the next one $0.4$.
  • $f(x,y)=\cos (xy)$
  • $f(x,y)=\frac{2}{\sqrt{x^2+y^2}}+\frac{2}{\sqrt{(x-1)^2+y^2}}$

Do we use for that the command "Sequence(\cos (xy)=c, c, 0, 10)" ?

We can use $\operatorname{Sequence}$ yes.
We'll have to specify an object that actually represents a curve though.
And shouldn't we specify a step size as well? (Wondering)
 
Klaas van Aarsen said:
A contour line is a curve on a surface $z=f(x,y)$ for a fixed $z$ isn't it? (Wondering)

But if we specify $y-x^2-1=\frac{1374}{2000}$, we do not get such a curve do we?
Instead we are getting a different surface.
Makes sense, because we have effectively specified an equation in x and y without specifying z.
So Geogebra shows a surface that satisfies the equation for x and y, and shows it for any z.
It's a parabolic cylinder. (Worried)

I think that instead we need the intersection of the surface $z=f(x,y)$ and the plane $z=\frac{3709}{2000}$, don't we?
Can we do that? (Wondering)

Btw, should the constant be $\frac{3709}{2000}$ or $\frac{1374}{2000}$? (Nerd)

Oh it should be $\frac{3709}{2000}$ and not $\frac{1374}{2000}$, the second one was a typo. (Tmi) So do you mean the following?

View attachment 9598

(Wondering)
 
Attachments
  • GeoGebra 3D view showing a blue curved surface z = y - x^2 - 1 cut by a horizontal pink plane z = 3709/2000, with the intersection curve c drawn in purple; the algebra panel lists f, g and c : IntersectPath(g, f).
    intersect.JPG
    57.8 KB · Views: 189
Klaas van Aarsen said:
Yep. (Nod)
Ok, great! So 1. is done.

Let's consider question 2.

Do we maybe use the command "Sequence(Intersect(f,g), c, 0, 10, 0.4)" where $f(x,y)=\cos (xy)$ and $g(x,y)=c$ ? (Wondering)
 
mathmari said:
Let's consider question 2.

Do we maybe use the command "Sequence(Intersect(f,g), c, 0, 10, 0.4)" where $f(x,y)=\cos (xy)$ and $g(x,y)=c$ ?

Well... does it work? (Wondering)

Your f is not actually the intended surface in 3D is it? (Worried)
 
Klaas van Aarsen said:
Well... does it work? (Wondering)

Your f is not actually the intended surface in 3D is it? (Worried)
I tried the following, but something is wrong:

View attachment 9599

What do I have to change? (Wondering)
 
Attachments
  • GeoGebra 3D view of a blue surface z = cos(x y) with a pink horizontal plane z = c, and an intersection curve; algebra panel shows f: z = cos(x y), g: z = c, 0 ≤ c ≤ 10 with a warning icon.
    intersection.JPG
    94.7 KB · Views: 184
mathmari said:
I tried the following, but something is wrong:

What do I have to change?

The $g: z=c,\,0\le c\le 10$ doesn't seem to be understood. (Worried)

The $c$ should really be tied to a $\operatorname{Sequence}$.

How about $\operatorname{Sequence}(\operatorname{IntersectPath}(f,z=c), c, 0, 10, 0.4)$? (Wondering)
 
Klaas van Aarsen said:
The $g: z=c,\,0\le c\le 10$ doesn't seem to be understood. (Worried)

The $c$ should really be tied to a $\operatorname{Sequence}$.

How about $\operatorname{Sequence}(\operatorname{IntersectPath}(f,z=c), c, 0, 10, 0.4)$? (Wondering)

Ahh ok! With this command we get:

View attachment 9600 For the other function $f(x,y)=\frac{2}{\sqrt{x^2+y^2}}+\frac{2}{\sqrt{(x-1)^2+y^2}}$ we get:

View attachment 9601

(Malthe)
 
Attachments
  • GeoGebra 3D view of the surface z = cos(x y), shown in translucent blue, with dark green level curves where the surface is cut by horizontal planes z = c, plus the algebra panel listing the sequence of intersection paths.
    cos_c.JPG
    123.1 KB · Views: 189
  • GeoGebra 3D view of the surface z = 2/sqrt(x^2+y^2) + 2/sqrt((x-1)^2+y^2), with green level curves drawn at evenly spaced heights, forming rings around two peaks.
    f2_c.JPG
    89.5 KB · Views: 184
mathmari said:
Ahh ok! With this command we get:

For the other function $f(x,y)=\frac{2}{\sqrt{x^2+y^2}}+\frac{2}{\sqrt{(x-1)^2+y^2}}$ we get:
(Malthe)

Nice! (Happy)
 
Klaas van Aarsen said:
Nice! (Happy)

Thank you for your help! (Yes)