---
title: Problem set 2
heading: "Problem set 2: gradients and extrema"
eyebrow: A9 · Problem set 2
type: problems
---

::: hook
These problems use lessons 9 and 10: the gradient, directional derivatives and the electric field as $-\nabla V$, and finding and classifying maxima, minima and saddles. The gradient points uphill and is perpendicular to level curves; at a critical point it vanishes.
:::

::: pool
pick: 12

::: check
kind: parts
given: a = 2 | 5; x = 1 | 2; y = 1 | 3

## A potential is $V = \given{a}x^2y$ volts.

::: part
answer: -2*a*x*y
unit: V/m
tolerance: 0.5%

### What is $E_x$ at $(\given{x}, \given{y})$?

::: misses
- [2*a*x*y] $\mathbf E = -\nabla V$.
- [any] $E_x = -\partial V/\partial x$.
:::
:::

::: part
answer: -a*x^2
unit: V/m
tolerance: 0.5%

### What is $E_y$?

::: misses
- [any] $-\partial V/\partial y$.
:::
:::
:::

::: check
kind: parts
given: x = 1 | 2; y = 1 | 3

## Take $f = x^2 + 3y^2$ at $(\given{x}, \given{y})$.

::: part
answer: (2*x*3 + 6*y*4)/5
tolerance: 0.5%

### What is its rate of change in the direction $(3, 4)$?

::: misses
- [2*x*3 + 6*y*4] Use the unit vector, $(0.6, 0.8)$.
- [any] $\nabla f\cdot\mathbf u$ with $\nabla f = (2x, 6y)$.
:::
:::

::: part
answer: sqrt(4*x^2 + 36*y^2)
tolerance: 0.5%

### What is the fastest rate of increase there?

::: misses
- [any] $|\nabla f|$.
:::
:::
:::

::: check
kind: parts
given: a = 1 | 2; b = 1 | 3

## Take $f = xy^2$ at $(\given{a}, \given{b})$.

::: part
answer: sqrt(b^4 + 4*a^2*b^2)
tolerance: 0.5%

### What is $|\nabla f|$?

::: misses
- [any] $\nabla f = (y^2, 2xy)$.
:::
:::
:::

::: check
kind: parts
given: a = 1 | 2; b = 1 | 3

## Find the tangent plane to $z = x^2 + y^2$ at $(\given{a}, \given{b})$.

::: part
answer: 2*a
tolerance: 0.5%

### What is its slope in $x$?

::: misses
- [any] $f_x = 2x$.
:::
:::

::: part
answer: -(a^2 + b^2)
tolerance: 0.5%

### What is its value at $(0, 0)$?

::: misses
- [a^2 + b^2] The plane $z = (a^2 + b^2) + 2a(x - a) + 2b(y - b)$ at the origin.
- [any] Evaluate the plane at $x = y = 0$.
:::
:::
:::

::: check
kind: parts
given: a = 1 | 2; b = 1 | 3

## The level curve of $f = x^2 + 4y^2$ through $(\given{a}, \given{b})$.

::: part
answer: -a/(4*b)
tolerance: 0.5%

### What is its slope $dy/dx$ there?

::: misses
- [4*b/a] That's the gradient's slope; the level curve is perpendicular to it.
- [any] $\frac{dy}{dx} = -\frac{f_x}{f_y}$.
:::
:::
:::

::: check
kind: parts
given: c = 1..12 int

## Find the critical point of $f = x^2 + xy + y^2 - \given{c}x$.

::: part
answer: 2*c/3
tolerance: 0.5%

### What is its $x$?

::: misses
- [any] $2x + y = c$ and $x + 2y = 0$.
:::
:::

::: part
answer: -c^2/3
tolerance: 0.5%

### What is the minimum value of $f$?

::: misses
- [any] Substitute $x = \frac{2c}{3}$, $y = -\frac c3$.
:::
:::
:::

::: check
kind: parts
given: k = 3 | 6 | 12 | 27 | 48 | 75

## Consider $f = x^3 - \given{k}x + y^2$.

::: part
answer: sqrt(k/3)
tolerance: 0.5%

### At which positive $x$ (with $y = 0$) is there a minimum?

::: misses
- [any] $f_x = 3x^2 - k = 0$; there $f_{xx} = 6x > 0$ and $D > 0$.
:::
:::

::: part
answer: 12*sqrt(k/3)
tolerance: 0.5%

### What is $D = f_{xx}f_{yy} - f_{xy}^2$ there?

::: misses
- [any] $f_{xx} = 6x$, $f_{yy} = 2$.
:::
:::
:::

::: check
kind: parts
given: V = 5 | 10; Rs = 50 | 75; Xs = 20 | 40

## A source of {V} V amplitude has impedance $\given{Rs} + j\given{Xs}$ Ω.

::: part
answer: V^2/(8*Rs)
unit: W
tolerance: 0.5%

### What is the most power it can deliver?

::: misses
- [V^2/(4*Rs)] With amplitudes, average power has an extra $\frac12$.
- [any] At the conjugate match, $P = \frac{|V|^2}{8R_s}$.
:::
:::
:::

::: check
kind: parts
given: y1 = 1 | 2; y2 = 3 | 4; y3 = 4 | 7

## Minimize $E = \sum(y_i - mx_i - c)^2$ for the points $(0, \given{y1})$, $(1, \given{y2})$, $(2, \given{y3})$.

::: part
answer: (y3 - y1)/2
tolerance: 0.5%

### What slope $m$ makes $\partial E/\partial m = \partial E/\partial c = 0$?

::: misses
- [any] For equally spaced points, $m = \frac{\sum(x - \bar x)(y - \bar y)}{\sum(x - \bar x)^2}$.
:::
:::
:::

::: check
kind: parts
given: e = 0.01 | 0.02 | 0.05 | 0.08 | 0.1 | 0.12

## One step of steepest descent on $f = x^2 + 4y^2$ from $(1, 1)$ with step size {e}.

::: part
answer: 1 - 2*e
tolerance: 0.5%

### What is the new $x$?

::: misses
- [any] $\mathbf x - \eta\nabla f$ with $\nabla f = (2x, 8y)$.
:::
:::

::: part
answer: 1 - 8*e
tolerance: 0.5%

### What is the new $y$?

::: misses
- [any] $1 - 8\eta$.
:::
:::
:::

::: check
kind: parts
given: a = 2 | 3; b = 1 | 5

## The Hessian of $f = \given{a}x^2 + \given{b}xy + \given{a}y^2$.

::: part
answer: 2*a + b
tolerance: 0.5%

### What is its larger eigenvalue?

::: misses
- [any] $H = \begin{bmatrix}2a & b\\b & 2a\end{bmatrix}$ has eigenvalues $2a \pm b$.
:::
:::

::: part
answer: 2*a - b
tolerance: 0.5%

### And its smaller? (If it's negative, the origin is a saddle.)

::: misses
- [any] $2a - b$.
:::
:::
:::

::: check
kind: parts
given: x = 2 | 3; y = 1 | 2

## A hill's height is $h = 100 - x^2 - 2y^2$ m ($x$, $y$ in km).

::: part
answer: sqrt(4*x^2 + 16*y^2)
unit: m/km
tolerance: 0.5%

### How steep is it at its steepest at $(\given{x}, \given{y})$?

::: misses
- [any] $|\nabla h|$ with $\nabla h = (-2x, -4y)$.
:::
:::
:::

::: check
kind: parts
given: q = 1 | 5; r = 5 | 10

## A {q} nC point charge has $V = \frac{kq}{r}$.

::: part
answer: 8.988e9*q*1e-9/(r/100)^2
unit: V/m
tolerance: 0.5%

### What is $|\nabla V|$, the field, at {r} cm?

::: misses
- [8.988e9*q*1e-9/(r/100)] That's the potential; differentiate it.
- [any] $\left|\frac{d}{dr}\frac{kq}{r}\right| = \frac{kq}{r^2}$.
:::
:::
:::

::: check
kind: parts
given: dV = 1 | 2; dR = 0.5 | 1

## $P = V^2/R$ with $V$ uncertain by {dV}% and $R$ by {dR}%.

::: part
answer: 2*dV + dR
unit: %
tolerance: 0.5%

### What is the worst-case percentage error in $P$?

::: misses
- [dV + dR] $V$ is squared, so its relative error counts twice.
- [any] $\frac{\Delta P}{P} = 2\frac{\Delta V}{V} + \frac{\Delta R}{R}$.
:::
:::
:::

::: check
kind: parts
given: x = 1 | 3; y = 2 | 4; z = 2 | 6

## Take $f = \frac{1}{r}$ with $r = \sqrt{x^2 + y^2 + z^2}$, at $(\given{x}, \given{y}, \given{z})$.

::: part
answer: 1/(x^2 + y^2 + z^2)
tolerance: 0.5%

### What is $|\nabla f|$?

::: misses
- [1/sqrt(x^2 + y^2 + z^2)] That's $f$ itself; its gradient has size $\frac{1}{r^2}$.
- [any] $\nabla\frac1r = -\frac{\mathbf r}{r^3}$.
:::
:::
:::
:::
