Determine using paper and pencil the 4 partial derivatives of the partial derivatives (i.e. the 2. order partial derivatives) of $\,f\,$ and $\,g\,.$
hint
$\displaystyle{\frac{\partial^2 f}{\partial x\partial y}}$ is found by differentiating $\displaystyle{\frac{\partial f}{\partial x}(x,y)}$ with respect to $y$, while $x$ is considered to be a constant.
Given the function $\,f:\reel^2\rightarrow\reel\,$ where
$$f(x,y)=x^2-4x+y^2\,.$$
D
Explain that $f$ is differentiable and determine the gradient of $f$.
Hardcore version: Solve the exercise directly using the definition about differentiability, see Definition $19.27.$Softcore version: Use the results in Theorem $19.36.$
hint
Like working with differentiability in highschool we shall consider the relation between $\Delta f$ and $\Delta \mathbf{h}$ in connection with the limit process $\mathbf{h}\longrightarrow\mnul$, but note that $\mathbf{h}$ is now a vector.
hint
Put $\mathbf{h}=(\Delta x,\Delta y)$. Compute $\Delta f$.
here $\varepsilon (\mathbf{h})=\Vert\mathbf{h}\Vert$ is an epsilon function, since $\Vert\mathbf{h}\Vert\longrightarrow 0$ for $\mathbf{h}\longrightarrow \mnul$, and thus
Therefore $f$ is differentiable according to Definition 19.27 in eNote 19.
$\nabla f(x,y)=(f_x’(x,y),f_y’(x,y))=(2x-4,2y)$.
E
Why do one require in Theorem 19.36 that the partial derivatives must be continuous? Why is it not sufficient that the partial derivatives exist?
hint
See Example 19.37.
answer
NB: As for functions of one variable, it applies for functions of two or more variables that if the function is differentiable in a point, then it is also continuous in the point. Conversely, it generally applies that if the function is not continuous in the point, it cannot be differentiable in the point. In example 19.37 we have the funny situation that the partial derivatives exist in a point where the function is not continuous. This situationen does not occur if the partial derivatives are continuous.
Exercise 3: Level Curves and Gradients
We consider the function $\,f:\reel^2\rightarrow\reel\,$ given by the expression
$$\,f(x,y)=x^2-2y\,$$
and its level curves
$$\,f(x,y)=c\,,\,\,c\in\reel\,.$$
F
Show that the level curve for an arbitrary $\,c\,$ can be described by an equation of the form $\,y=g_c(x)\,$ where $\,g_c\,$ is a real function of $\,x\,,$ and draw the level curves that corresponds to $\,c\in\lbrace-2,-1,0,1,2\rbrace\,.$
answer
The level curves are 5 parabolas that are displaced parallel to each other in the direction of the $\,y$-axis. What is the distance between them?
G
Show that the point $\,P=(2,1)\,$ lies on the level curve corresponding to $\,c=2\,,$ and find a parametric representation for this level curve. Determine the tangent vector in $\,P\,$ corresponding to this parametric representation, and show that the tangent vector is orthogonal to the gradient for $\,f\,$ in $\,P\,.$
hint
You get the tangent vector by first differentiating each of the two coordinate vectors in the parametric representation and then insert the value of the parameter in the given point.
H
In Maple make an inclusive plot of the level curves and the gradient vector field for $\,f\,.$
hint
Use contourplot and gradplot.
Exercise 4: Visualizations 1
On a mountain with an altitude map as shown below a trekking along an elliptic path (shown in red) is conducted. The arrows state the gradient vector field of the altitude function. The circles are level curves for the altitude function.
A
Where on the path is the ascent of the path equal to 0?
hint
The are four positions. Find these!
answer
On a level curve the altitude does of course not change. Therefore one must find the positions on the track where the track has a tangent with a level curve.
B
Why are the gradient vectors apparantly always perpendicular to the level curves?
hint
Follow one of the level curves on the drawing for a total revolution and consider the direction of gradient vectors nearby.
answer
If we consider the level curve to be a path along which we walk, the trek is nice and quiet, because all the time we walk horizontally. Naturally the ascent is largest if we suddenly change direction by 90 degrees towards the top.
C
Consider a walk along path in a self chosen direction. Where is it ascending, and where is it descending?
Exercise 5: Gradient Vector Fields and Directional Derivatives
Two real functions $\,f\,$ and $\,g\,$ of two real variables are given by the expressions
Determine the domains for $\,f\,$ and $\,g\,,$ respectively and sketch these in the $\,(x,y)$-plane.
hint
By the domain we understand the largest possible set of points in $\,\reel^2\,$ in which the expression for $\,f\,$ makes sense. The $\,(x,y)$-plane is the geometric representation of $\,\reel^2\,.$
Use Maple to draw a suitable section of the graphs of the functions. And use Maple to show the gradient fields and the level curves of the graphs. Why do one draw the graphs in an $(x,y,z)$-coordinate system, while the gradient vector fields and the level curves are drawn in an $(x,y)$-coordinate system?
D
Can you from the two gradient plots decide whether the functions increase or decrease in the point
$P = (0,2)$ in the direction determined by the vector $\mv = (-1,-1)$?
hint
In what direction do the arrows point?
answer
Yes, and in both cases the function decrease in the direction that $\mv$ indicates.
E
Determine for each of the two functions the directional derivative in the point $P$ in the direction given by the vector $\mv$.
hint
The directional derivative is found by the scalar product of the gradient vector in the point and the normed directional vector. See the definition of the directional derivative in eNote 19.
Now discuss the statement “Thus one can characterize the gradient as the vector that points in the direction in which the function $f$ increases the most”.
Exercise 6: Visualization 2
We imagine that in an otherwise flat landscape lies a mountain that has the form of the graph of the function
$$f(x,y)=x^2-y^2+4$$
in the rectangular field in the $(x,y)$-plane, that are bounded by
Outside this field the landscape is at sea level, i.e given by $f(x,y)=0$ (On the boundary of the field we imagine that the mountain has completely vertical sides).
G
Draw a plot of the “mountain-graph” using Maple with the domain given above.
H
What are the coordinates of the highest point, $\,B\,$, on the mountain? (First read the point from the graph and then argue precisely you answer.)
hint
The highest point is the maximum of the function, but where is this to be found?
hint
The maximum can found along the boundary of the field or in a stationary point.
hint
By considering the four curves that constitute the boundary of the field as functions $\reel\rightarrow\reel$, possible extremal points can be found by differentiation. In addition the four corner points must be investigated. The point that has the highest functional value is the maximum.
answer
By considering the four curves that constitute the boundary of the field as functions $\reel\rightarrow\reel$, possible extremal points can be found by differentiation. In addition the four corner points must be investigated. The point that has the highest functional value is the maximum.
$\,B=(2,0,8)\,$.
I
Show that straight line segment given by the parametric representation
lies entirely in the mountain surface and connects the point $\,A=(0,-2,0)\,$ (at the sea level) with the highest point found above, $\,B\,.$
hint
If the line is embedded in the surface, every point $(x,y,z)$ on the line must satisfy $f(x,y)=z$.
hint
Try to insert the first two coordinate functions from $\mathbf{r}(t)$ in $f$.
hint
$f(\mathbf{r}(t))=4t$, but what does this mean?
answer
By insertion fo the two first coordinate functions from $\mathbf{r}(t)$ in $\,f\,$ we find that $\,f(\mathbf{r}(t))=4t\,$, which is exactly the $\,z$-coordinate of $\,\mathbf{r}(t)=4t\,$. Therefore the line and the surface are coincident in all fo the points on the line.
J
The shortest path from the mountain point $\,A =(0,-2,0)\,$ (at the sea level) to the summit of the mountain $\,B\,$ is therefore the straight line. Why is that?
hint
Which path is always the shortest?
answer
The shortest path between tow points is always the straight line between them. In this case it is even possible to follow a straight line on the surface between the two points.
K
Use contourplot to draw a system of level curves for the function $\,f\,$ in the rectangular mountain field in the $\,(x,y)\,$-coordinate system where the mountain surface is defined. This is then an altitude map of the mountain. Draw this altitude map using e.g. 7 level curves. Then draw on your altitude map the two points that corresponds to the mountain points $\,A\,$ and $\,B\,$ together with the line in the map that corresponds to the shortest path on the mountain from $\,A\,$ to $\,B\,$ that we found above.
L
Compute the gradient of the function $\,f\,$ in say 3 points along the found and drawn line on the map, and draw the 3 gradient-vectors on your figure, too.
M
Show that there is one and only one point on the curve where the gradient of $\,f\,$ points in the same direction as the line (possibly use the command gradplot).
hint
Where do we find the gradient in the illustration? And how do we show the direction of the line in the same illustration?
hint
We find the gradient together with the level curves in the $xy$-plane. The direction of the line in the $xy$-plane is actually the projection of the line onto the $xy$-plane, but here it is only the $x$- and $y$-coordinates $(1,1)$ of the direction vector.
answer
We find the gradient together with the level curve in the $xy$-plane. The direction of the line in the $xy$-plane is actually the projection of the line onto the $xy$-plane, but here it is only the $x$- and $y$-coordinates $(1,1)$ of the direction vector. There is only one point on the line, where $,\nabla f(x,y),$ is parallel to the vector $\,(1,1),$ this is in the point $\,(1,-1)\,$.
N
Is this not in direct contradiction to: “Thus one can characterize the gradient as the a vector that points in the direction in which the function $f$ increases the most”?
hint
In which context did we choose the formulation “Thus one can characterize the gradient as the a vector that points in the direction in which the function $f$ increases the most”?
%####### begin:answer
%Gradienten indeholder kun lokal information, men det netop løste problem kræver en global betragtning.