What Are Level Lines and Gradients in Multivariable Calculus?

  • Context: MHB 
  • Thread starter Thread starter mathmari
  • Start date Start date
  • Tags Tags
    Gradient Lines
Click For Summary

Discussion Overview

The discussion revolves around the function $f:\mathbb{R}^2\rightarrow \mathbb{R}$ defined as $$f(x,y)=\frac{x^2-1}{y^2+1}$$ and focuses on the concepts of level lines and gradients in multivariable calculus. Participants explore the parametrization of level lines for various values of $c$, the calculation of gradients, and the conditions for maximum directional derivatives.

Discussion Character

  • Exploratory, Technical explanation, Conceptual clarification, Debate/contested, Mathematical reasoning

Main Points Raised

  • Some participants describe the level lines $N_c$ for different values of $c$ and derive equations for hyperbolas and ellipses based on the value of $c$.
  • There is a proposal for parametrization of the level lines, with some suggesting forms like $(a\cos t, b\sin t)$ for ellipses and $(a\cosh t, b\sinh t)$ for hyperbolas, while questioning how to determine the specific values of $a$ and $b$ for given $c$.
  • Participants discuss the gradient $\nabla f(x,y)$ and express uncertainty about how to evaluate it at points on the parametrized curves.
  • There is a consideration of how to find the direction of maximum directional derivative and whether specific points are needed for this calculation.
  • Some participants suggest that both positive and negative values of $a$ and $b$ should be included in the parametrization to account for all connected components of the level curves.
  • For $c=0$, a participant questions the parametrization of the lines $x=\pm1$ and for $c=-1$, the parametrization of the point $(0,0)$ is discussed.

Areas of Agreement / Disagreement

Participants generally agree on the forms of the level lines for different values of $c$, but there is no consensus on the specific parametrizations and the treatment of cases $c=0$ and $c=-1$. The discussion remains unresolved regarding the best approach to parametrization and the evaluation of gradients.

Contextual Notes

There are limitations regarding the assumptions made about the connected components of level lines and the specific forms of parametrization. The discussion also reflects uncertainty about the conditions under which the gradient is evaluated and the implications of directional derivatives.

mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! :giggle:

We consider the function $f:\mathbb{R}^2\rightarrow \mathbb{R}$ with $$f(x,y)=\frac{x^2-1}{y^2+1}$$
(a) Describe and draw the level lines $N_c$ of $f$ for all $c\in \mathbb{R}$. Determine for each connected component of each non-empty level lines $N_c$ a parametrization $\gamma_c:I\rightarrow \mathbb{R}$.
(b) Calculate the gradient $\nabla f(\gamma_c(t))$ of $f$ in the point $\gamma_c(t)\in \mathbb{R}^2$. Show directly that $\nabla f(\gamma_c(t))$ is orthogonal to the level lines $N_c$ at the point $\gamma_c(t)$.
(c) Let $x\in \mathbb{R}^2$, such that $\nabla f(x)\neq 0$. Determine the direction with maximum directional derivative of $f$ in point $x$.For (a) :
We have that $$f(x,y)=c \Rightarrow \frac{x^2-1}{y^2+1}=c \Rightarrow x^2-1=(y^2+1)c \Rightarrow x^2-cy^2-(c+1)=0$$
If $c=0$ then we have $x^2=1 \Rightarrow x\pm 1$, so we get the lines $x=1$ and $x=-1$.
If $c>0$ we have then $c=m^2>0$. So $x^2-m^2y^2-(m^2+1)=0 \Rightarrow x^2-m^2y^2=(m^2+1)$. We have $B^2-4AC=0-4\cdot 1\cdot (-m^2)=m^2>0$. So it is the general equation of an hyperbola with axes parallel to the coordinate axes.
If $c<0$ we have then $c=-m^2<0$. So $x^2+m^2y^2-(-m^2+1)=0 \Rightarrow x^2+m^2y^2=(-m^2+1)$. The left side is always non-negative, so also the right side must be. So $1-m^2\geq0 \Rightarrow m^2\leq1 \Rightarrow -1\leq -m^2 \Rightarrow -1\leq c$. That means that is $c$ is negative then $c$ must be greater or equal to $-1$. If $-1<c<0$ then we have the general formula of an ellipse. If $c=-1$ then we get $x^2+y^2=0$ which is the point $(0,0)$.

Is that correct?

How do we determine for each connected component of each non-empty level lines $N_c$ a parametrization $\gamma_c:I\rightarrow \mathbb{R}$ ?

:unsure:For (b) :
We have that $$\nabla f(x,y)=\frac{2x}{y^2+1}\hat{i}+\frac{-2(x^2-1)y}{(y^2+1)^2}\hat{j}$$ But how do we get $\nabla f(\gamma_c(t))$ ? :unsure:For (c) :
The maximum value of the directional derivative occurs when $\nabla f$ and the unit vector point in the same direction.
But how can we find that? Dowenot need aspecific point here? :unsure:
 
Last edited by a moderator:
Physics news on Phys.org
mathmari said:
For (a) :
We have that $$f(x,y)=c \Rightarrow \frac{x^2-1}{y^2+1}=c \Rightarrow x^2-1=(y^2+1)c \Rightarrow x^2-cy^2-(c+1)=0$$
If $c=0$ then we have $x^2=1 \Rightarrow x\pm 1$, so we get the lines $x=1$ and $x=-1$.
If $c>0$ we have then $c=m^2>0$. So $x^2-m^2y^2-(m^2+1)=0 \Rightarrow x^2-m^2y^2=(m^2+1)$. We have $B^2-4AC=0-4\cdot 1\cdot (-m^2)=m^2>0$. So it is the general equation of an hyperbola with axes parallel to the coordinate axes.
If $c<0$ we have then $c=-m^2<0$. So $x^2+m^2y^2-(-m^2+1)=0 \Rightarrow x^2+m^2y^2=(-m^2+1)$. The left side is always non-negative, so also the right side must be. So $1-m^2\geq0 \Rightarrow m^2\leq1 \Rightarrow -1\leq -m^2 \Rightarrow -1\leq c$. That means that is $c$ is negative then $c$ must be greater or equal to $-1$. If $-1<c<0$ then we have the general formula of an ellipse. If $c=-1$ then we get $x^2+y^2=0$ which is the point $(0,0)$.

Hey mathmari!

Looks correct to me. (Nod)

mathmari said:
How do we determine for each connected component of each non-empty level lines $N_c$ a parametrization $\gamma_c:I\rightarrow \mathbb{R}$ ?

So we have ellipses and hyperbolas.
A possible parametrization is $(a\cos t, b\cos t)$ respectively $(a\cosh t, b\cosh t)$.
Can we find the corresponding $a$ and $b$ for a specific $c$? 🤔

If we do so, we can get:
\begin{tikzpicture}
\clip (-4,-4) rectangle (4,4);
\draw[help lines] (-4,-4) grid (4,4);
\draw[-latex] (-4,0) -- (4,0);
\draw[-latex] (0,-4) -- (0,4);
\draw foreach \i in {-3,...,3} { (\i,0.1) -- (\i,-0.1) node[below] {$\i$} };
\draw foreach \i in {-3,...,3} { (0.1,\i) -- (-0.1,\i) node[ left ] {$\i$} };
\foreach \c in {-.9,-.7,...,-.1} {
\draw[domain=0:360, variable=\t] plot ({sqrt(1+\c)*cos(\t)}, {sqrt(-1-1/\c)*sin(\t)});
}
\foreach \c in {0.1,0.2,...,3} {
\draw[domain=-5:5, variable=\t, smooth] plot ({-sqrt(1+\c)*cosh(\t)}, {sqrt(1+1/\c)*sinh(\t)});
\draw[domain=-5:5, variable=\t, smooth] plot ({sqrt(1+\c)*cosh(\t)}, {sqrt(1+1/\c)*sinh(\t)});
}
\draw (-1,-4) -- (-1,4);
\draw (1,-4) -- (1,4);
\end{tikzpicture}
🤔

mathmari said:
For (b) :
We have that $$\nabla f(x,y)=\frac{2x}{y^2+1}\hat{i}+\frac{-2(x^2-1)y}{(y^2+1)^2}\hat{j}$$ But how do we get $\nabla f(\gamma_c(t))$ ?

First we'll need to find $\gamma_c(t)$, which we can then substitute. :unsure:

mathmari said:
For (c) :
The maximum value of the directional derivative occurs when $\nabla f$ and the unit vector point in the same direction.
But how can we find that? Do we not need a specific point here?
We can also tell by looking at the graph of the level curves.
The gradient is highest where the curves are closest together.
Where is that? 🤔
 
Klaas van Aarsen said:
So we have ellipses and hyperbolas.
A possible parametrization is $(a\cos t, b\cos t)$ respectively $(a\cosh t, b\cosh t)$.
Can we find the corresponding $a$ and $b$ for a specific $c$? 🤔

For the ellipse we have $$x^2-cy^2-(c+1)=0 \Rightarrow x^2-cy^2=(c+1) \Rightarrow \frac{x^2}{\sqrt{c+1}^2}+\frac{y^2}{\left (\sqrt{\frac{c+1}{-c}}\right )^2}=1$$ So does that mean that $a=\sqrt{c+1}$ and $b=\sqrt{\frac{c+1}{-c}}$ with $-1<c<0$ ?

So is a parametrization $\gamma_c=\left (\sqrt{c+1}\cos(t), \sqrt{\frac{c+1}{-c}}\sin (t)\right )$ ? For the hyperbola we have $$x^2-cy^2-(c+1)=0 \Rightarrow x^2-cy^2=(c+1) \Rightarrow \frac{x^2}{\sqrt{c+1}^2}-\frac{y^2}{\left (\sqrt{\frac{c+1}{c}}\right )^2}=1$$ So does that mean that $a=\sqrt{c+1}$ and $b=\sqrt{\frac{c+1}{c}}$ with $c>0$ ?

So is a parametrization $\gamma_c=\left (\sqrt{c+1}\cosh(t), \sqrt{\frac{c+1}{c}}\sinh (t)\right )$ ? Do we have to consider also the cases $c=0$ and $c=-1$ ? :unsure:
 
mathmari said:
So is a parametrization $\gamma_c=\left (\sqrt{c+1}\cos(t), \sqrt{\frac{c+1}{-c}}\sin (t)\right )$ ?

Yep. (Nod)

mathmari said:
So is a parametrization $\gamma_c=\left (\sqrt{c+1}\cosh(t), \sqrt{\frac{c+1}{c}}\sinh (t)\right )$ ?

This only covers the parts of the hyperbolas with positive x. :rolleyes:

mathmari said:
Do we have to consider also the cases $c=0$ and $c=-1$ ?

I guess so. After all, the question asks for each connected component of non-empty level curves.
So we should add them for completeness. 🤔
 
Klaas van Aarsen said:
This only covers the parts of the hyperbolas with positive x. :rolleyes:

Do you mean to take at each $a$ and $b$ also the minus sign?
I mean: $\gamma_c=\left (\pm\sqrt{c+1}\cos(t), \pm\sqrt{\frac{c+1}{-c}}\sin (t)\right )$ and $\gamma_c=\left (\pm\sqrt{c+1}\cosh(t), \pm \sqrt{\frac{c+1}{c}}\sinh (t)\right )$ ? :unsure:
Klaas van Aarsen said:
I guess so. After all, the question asks for each connected component of non-empty level curves.
So we should add them for completeness. 🤔

For $c=0$ we have the lines $x=\pm1$. Is a parametrization $\gamma_0(t)=(t,0)$ ? :unsure:

For $c=-1$ we have the point $(0,0)$. Is a parametrization $\gamma_{-1}(t)=(0,0)$ ? :unsure:
 
Last edited by a moderator:
mathmari said:
Do you mean to take at each $a$ and $b$ also the minus sign? I mean:
$\gamma_c=\left (\pm\sqrt{c+1}\cosh(t), \pm \sqrt{\frac{c+1}{c}}\sinh (t)\right )$ ?

No need to invert the y-coordinate.
We have both:
$$\gamma_c^+(t)=\left (\sqrt{c+1}\cosh(t), \sqrt{\frac{c+1}{c}}\sinh (t)\right )$$
and:
$$\gamma_c^-(t)=\left (-\sqrt{c+1}\cosh(t), \sqrt{\frac{c+1}{c}}\sinh (t)\right )$$
which are the two unconnected components of the same hyperbola. 🧐

mathmari said:
For $c=0$ we have the lines $x=\pm1$. Is a parametrization $\gamma_0(t)=(t,0)$ ?

Suppose we substitute $t=2$, then we get $(2,0)$.
That doesn't have $x=\pm1$. Furthermore, $y$ is not restricted to be $0$ is it? :oops:

mathmari said:
For $c=-1$ we have the point $(0,0)$. Is a parametrization $\gamma_{-1}(t)=(0,0)$ ?
Yep. (Nod)
 
Last edited:
Klaas van Aarsen said:
No need to invert the y-coordinate.
We have both:
$$\gamma_c^+(t)=\left (\sqrt{c+1}\cos(t), \sqrt{\frac{c+1}{-c}}\sin (t)\right )$$
and:
$$\gamma_c^-(t)=\left (-\sqrt{c+1}\cos(t), \sqrt{\frac{c+1}{-c}}\sin (t)\right )$$
which are the two unconnected components of the same hyperbola. 🧐

In that way we write both the hyperbola and the ellipse, or not? :unsure:
Klaas van Aarsen said:
Suppose we substitute $t=2$, then we get $(2,0)$.
That doesn't have $x=\pm1$. Furthermore, $y$ is not restricted to be $0$ is it? :oops:

Ah yes! So is the parametrization $\gamma_0(t)=(1,t)$ ? :unsure:
 
mathmari said:
In that way we write both the hyperbola and the ellipse, or not?

My mistake. I meant to write $\cosh$ and $\sinh$. (Blush)
They were just for the hyperbola.
I've corrected that in my previous post now.

Oh, and we don't need $\pm$ for the ellipse at all. The parametrization already covers the whole ellipse, which is one connected component after all. :geek:

mathmari said:
Ah yes! So is the parametrization $\gamma_0(t)=(1,t)$ ?
Yes... but that is only for $x=+1$. We are still missing $x=-1$. 🧐
 
Klaas van Aarsen said:
My mistake. I meant to write $\cosh$ and $\sinh$. (Blush)
They were just for the hyperbola.
I've corrected that in my previous post now.

Why do we need to do that only for the hyperbola? :unsure:
Klaas van Aarsen said:
Yes... but that is only for $x=+1$. We are still missing $x=-1$. 🧐

Oh yes! It must be $\gamma_0(t)=(\pm 1, t)$, right? :unsure:
 
  • #10
mathmari said:
Why do we need to do that only for the hyperbola?

Because a hyperbola consists of 2 disconnected parts.
The parametrization $(a\cosh t, b\sinh t)$ is only for the part with positive x.
When we put a minus ($-$) before the x-coordinate, we effectively mirror it in the y-axis so that we get the part with negative x.
But when we mirror an ellipse in the y-axis, we just get the same ellipse. (Nerd)

mathmari said:
Oh yes! It must be $\gamma_0(t)=(\pm 1, t)$, right?
Yep. (Nod)
 
  • #11
Klaas van Aarsen said:
Because a hyperbola consists of 2 disconnected parts.
The parametrization $(a\cosh t, b\sinh t)$ is only for the part with positive x.
When we put a minus ($-$) before the x-coordinate, we effectively mirror it in the y-axis so that we get the part with negative x.
But when we mirror an ellipse in the y-axis, we just get the same ellipse. (Nerd)

Ahh ok! At question (b): Do we substitute at $\nabla f(x,y)=\frac{2x}{y^2+1}\hat{i}+\frac{-2(x^2-1)y}{(y^2+1)^2}\hat{j}$ the parametrizations? Or do we calculate first $f(\gamma_c(t))$ and then the derivative? :unsure:
 
  • #12
mathmari said:
At question (b): Do we substitute at $\nabla f(x,y)=\frac{2x}{y^2+1}\hat{i}+\frac{-2(x^2-1)y}{(y^2+1)^2}\hat{j}$ the parametrizations? Or do we calculate first $f(\gamma_c(t))$ and then the derivative?
The derivative $\frac d{dt}\left (f(\gamma_c(t))\right)$ is something different isn't it? 🤔
 
  • #13
Yes!

At the second part of the question we have to use the partial derivative and the dot product, or not ? :unsure:
Klaas van Aarsen said:
We can also tell by looking at the graph of the level curves.
The gradient is highest where the curves are closest together.
Where is that? 🤔

At x=2 ans x=-2? :unsure:
 
  • #14
mathmari said:
At the second part of the question we have to use the partial derivative and the dot product, or not ?

Which partial derivative? 🤔
mathmari said:
At x=2 ans x=-2?
Suppose we evaluate the gradient at (x,0).
What do we get? 🤔
Will it be largest at x=2? 🤔
 
  • #15
Klaas van Aarsen said:
Which partial derivative? 🤔

I meant the gradient. So do we have to calculate the dot product of $\nabla f(\gamma_c(t)) $ and $\gamma_c(t) $? :unsure:
 
  • #16
mathmari said:
I meant the gradient. So do we have to calculate the dot product of $\nabla f(\gamma_c(t)) $ and $\gamma_c(t) $?
Not $\gamma_c(t) $. We need a tangent vector of the level curve at $\gamma_c(t)$. 🤔
 
Last edited:
  • #17
Klaas van Aarsen said:
Not $\gamma_c(t) $. We need a tangent vector of the level curve at $\gamma_c(t)$. 🤔

How do we find the tangent vector? I got stuck right now. :unsure:
 
  • #18
Isn't $\dot\gamma_c(t)$ a tangent vector (if it is not 0)? 🤔
 
  • #19
Klaas van Aarsen said:
Suppose we evaluate the gradient at (x,0).
What do we get? 🤔
Will it be largest at x=2? 🤔

We get then $(2x,0)$, so the largest is not at $x=2$, but gets larger as $x$ gets larger. So how do we get the maximum? :unsure:
 
Last edited by a moderator:
  • #20
mathmari said:
We get then (2x,0), so the largest is not at x=2, but gets larger as x gets larger.
Indeed. So the largest gradient is infinitely large.
Then again... perhaps that's not what the question was asking for. (Blush)

I guess we need to find the largest directional derivative at a specific point.
Since the directional derivative is the dot product of the corresponding unit vector and the gradient, it is largest if that unit vector points in the same direction as the gradient.
In other words, the direction is the same as the direction of the gradient.
And the magnitude is the same as the magnitude of the gradient. 🤔
 
  • #21
Klaas van Aarsen said:
I guess we need to find the largest directional derivative at a specific point.
Since the directional derivative is the dot product of the corresponding unit vector and the gradient, it is largest if that unit vector points in the same direction as the gradient.
In other words, the direction is the same as the direction of the gradient.
And the magnitude is the same as the magnitude of the gradient. 🤔

So the direction is \begin{equation*}\nabla f(x,y)=\frac{2x}{y^2+1}\hat{i}+\frac{-2(x^2-1)y}{(y^2+1)^2}\hat{j}=\left (\frac{2x}{y^2+1}, \ \frac{-2(x^2-1)y}{(y^2+1)^2}\right )\end{equation*} and the magnitude is \begin{equation*}\|\nabla f(x,y)\|=\sqrt{\left (\frac{2x}{y^2+1}\right )^2+\left ( \frac{-2(x^2-1)y}{(y^2+1)^2}\right )^2}\end{equation*} ? :unsure:
 
  • #22
mathmari said:
So the direction is \begin{equation*}\nabla f(x,y)=\frac{2x}{y^2+1}\hat{i}+\frac{-2(x^2-1)y}{(y^2+1)^2}\hat{j}=\left (\frac{2x}{y^2+1}, \ \frac{-2(x^2-1)y}{(y^2+1)^2}\right )\end{equation*} and the magnitude is \begin{equation*}\|\nabla f(x,y)\|=\sqrt{\left (\frac{2x}{y^2+1}\right )^2+\left ( \frac{-2(x^2-1)y}{(y^2+1)^2}\right )^2}\end{equation*} ? :unsure:
Yep. (Nod)
 
  • #23
Klaas van Aarsen said:
Yep. (Nod)

Great! Thank you! (Sun)
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 24 ·
Replies
24
Views
5K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K