πŸ›Ÿ Midterm exam practice

πŸ›Ÿ Midterm exam practice#

First and foremost, practice by going through the solutions of all of the tutorial problems. They are the best resource in preparation for the exam.

Week

Topic

\(\alpha\)

alpha

2

πŸ”¬ Logic and proofs

\(\beta\)

beta

3

πŸ”¬ Univariate and bivariate optimization

\(\gamma\)

gamma

4

πŸ”¬ Sets and mappings

\(\delta\)

delta

5

πŸ”¬ Limits and continuity

\(\epsilon\)

epsilon

6

πŸ”¬ Multivariate calculus

Additional problems are provided below.

Let \(f \colon \mathbb{R} \to \mathbb{R}\) be defined by \(f(x) = \sin(x)\).

  • Write down the set of stationary points of this function.

  • Which of these, if any, are maximizers, and which are minimizers?

The set \(S\) of stationary points of \(f\) are the points \(x \in \mathbb{R}\) such that \(f'(x) = \cos(x) = 0\). By the definition of the cosine function this is the set

\[ S := \{ x \in \mathbb{R} : x = \pi/2 + k \pi \text{ for } k \in \mathbb{Z} \} \]

Every point in the domain \(\mathbb{R}\) is interior (i.e, not an end point) and the function \(f\) is differentiable, so the set of maximizers will be contained in the set of stationary points. The same is true of the set of minimizers. From the definition of the sine function, we have

\[\begin{split} f(\pi/2 + k \pi) = \begin{cases} 1 & \text{ if $k$ is even} \\ -1 & \text{ if $k$ is odd} \\ \end{cases} \end{split}\]

Hence the set of maximizers is

\[ M^* := \{ x \in \mathbb{R} : x = \pi/2 + k \pi \text{ for } k \text{ an even integer}\} \]

The set of minimizers is

\[ M_* := \{ x \in \mathbb{R} : x = \pi/2 + k \pi \text{ for } k \text{ an odd integer}\} \]
  1. Find all stationary points of the function \(f(x, y) = \frac{\cos(x^2 + y^2)}{1 + x^2 + y^2}\).

  2. Find all maximizers and minimizers of this function on \(\mathbb{R}^2\).

It is always helpful to try to plot the function first. The graph of \(f(x,y)\) is

_images/0099d52988d23d35076584d6b364a452a38fe46ced00f91789b0d9a0c391f677.png

Let \(t = x^2+y^2 \geq 0\). The function becomes

\[ f(x,y) = \frac{\cos(x^2+y^2)}{1 + x^2+y^2} = \frac{\cos(t)}{1 + t} =: g(t) \quad (t \geq 0). \]

First note that since \(t \geq 0\) and \(\cos(t) \leq 1\), we have \(g(t)\leq 1\) and \(g(0)=1\). Hence, \(t=0\) is a maximizer for \(g\), or \((x,y)=(0,0)\) is the maximizer for \(f\). It is a unique maximizer, since if \(g(t) < 1\) for \(t >0\).

Next, we find the stationary points of \(f\) by finding the stationary points of \(g\). The FOC is

\[ g'(t) = \frac{-\sin(t)(1+t) - \cos(t)}{(1+t)^2} = 0. \]

Since \((1+t)^2>0\), it must be

\[ -\sin(t)(1+t) - \cos(t) = 0 ⇔ t\sin(t) + \sin(t) + \cos(t)=0. \]

The numerical solutions for the smallest stationary point \(t_m\) such that \(\cos(t_m)<0\) are

_images/77df82b77b9862b30f73b518d3ac801bfd7b04d4979b227e4608bf7a994f5903.png

β€˜The smallest stationary point is tm=2.889969697678371’

β€˜The minimum is -0.24897613487740497’

The minimizers are \(\{(x,y)\in\mathbb{R}: x^2+y^2 = t_m\}\). To verify that \(t_m\) is the unique minimizer for \(g\), since \(\cos^2(t) + \sin^2(t)=1\), we rewrite FOC to get

\[\begin{split} t\sin(t) + \sin(t) = \pm \sqrt{1-\sin^2(t)} \\ ⇔ \sin^2(t) = \frac{1}{2 + 2t + t^2} \\ ⇔ \cos^2(t) = 1 - \frac{1}{2+2t + t^2}=\frac{(1+t)^2}{2+2t + t^2}\\ β‡’ g(t) = \frac{\cos(t)}{1+t} = \pm \frac{1}{\sqrt{2+2t +t^2}} \qquad (\text{$t$ is stationary point}). \end{split}\]

Therefore, the smallest stationary point such that \(\cos(t) < 0\) will be the unique minimizer for \(g\).

For a function \(f \colon \mathbb{R}^2 \ni (x,y) \mapsto 2x^2+y^4-2xy \in \mathbb{R}\) write down the gradient and the Hessian, find the stationary points (those points where gradient is equal to zero vector), and compute the Hessian at those points.

COMING SOON

For a function \(f \colon \mathbb{R}^2 \ni (x,y) \mapsto 2xy-x^2-y^4 \in \mathbb{R}\) write down the gradient and the Hessian, find the stationary points (those points where gradient is equal to zero vector), and compute the Hessian at those points.

COMING SOON