### Welcome to our community

#### mathmari

##### Well-known member
MHB Site Helper
Hey!!

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}$ ?

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))$ ?

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?

Last edited:

#### Klaas van Aarsen

##### MHB Seeker
Staff member
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.

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}

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.

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?

#### mathmari

##### Well-known member
MHB Site Helper
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$ ?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
So is a parametrization $\gamma_c=\left (\sqrt{c+1}\cos(t), \sqrt{\frac{c+1}{-c}}\sin (t)\right )$ ?
Yep.

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.

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.

#### mathmari

##### Well-known member
MHB Site Helper
This only covers the parts of the hyperbolas with positive x.
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 )$ ?

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)$ ?

For $c=-1$ we have the point $(0,0)$. Is a parametrization $\gamma_{-1}(t)=(0,0)$ ?

Last edited by a moderator:

#### Klaas van Aarsen

##### MHB Seeker
Staff member
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.

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?

For $c=-1$ we have the point $(0,0)$. Is a parametrization $\gamma_{-1}(t)=(0,0)$ ?
Yep.

Last edited:

#### mathmari

##### Well-known member
MHB Site Helper
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?

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?
Ah yes! So is the parametrization $\gamma_0(t)=(1,t)$ ?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
In that way we write both the hyperbola and the ellipse, or not?
My mistake. I meant to write $\cosh$ and $\sinh$.
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.

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$.

#### mathmari

##### Well-known member
MHB Site Helper
My mistake. I meant to write $\cosh$ and $\sinh$.
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?

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?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
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.

Oh yes! It must be $\gamma_0(t)=(\pm 1, t)$, right?
Yep.

#### mathmari

##### Well-known member
MHB Site Helper
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.
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?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
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?

#### mathmari

##### Well-known member
MHB Site Helper
Yes!

At the second part of the question we have to use the partial derivative and the dot product, or not ?

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?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
At the second part of the question we have to use the partial derivative and the dot product, or not ?
Which partial derivative?

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?

#### mathmari

##### Well-known member
MHB Site Helper
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)$?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
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:

#### mathmari

##### Well-known member
MHB Site Helper
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.

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Isn't $\dot\gamma_c(t)$ a tangent vector (if it is not 0)?

#### mathmari

##### Well-known member
MHB Site Helper
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?

Last edited:

#### Klaas van Aarsen

##### MHB Seeker
Staff member
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.

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.

#### mathmari

##### Well-known member
MHB Site Helper
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*} ?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
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*} ?
Yep.

#### mathmari

##### Well-known member
MHB Site Helper
Great!! Thank you!!