Worksheet 2-3 (with Solutions)

Worksheet 2-3 (with Solutions)#

Download: CMSE382-WS2_3.pdf · Solution PDF

Warning

This is an AI-generated transcript of the worksheet and may contain errors or inaccuracies. Please refer to the original course materials for authoritative content.


Worksheet 2-3: Q1#

We are going to investigate the function \(f(x,y)=2x^2-8xy+y^2\).

  1. Write the function in the quadratic form \(f(x,y) = \mathbf{x}^\top A \mathbf{x} + 2\mathbf{b}^\top\mathbf{x} + c\).

    Solution
    \[\begin{split}A = \begin{bmatrix} 2 & -4 \\ -4 & 1 \end{bmatrix}, \qquad \mathbf{b} = \begin{bmatrix} 0 \\ 0 \end{bmatrix}, \qquad c = 0\end{split}\]
  2. What is the gradient \(\nabla f(x,y)\) and Hessian \(\nabla^2 f(x,y)\)?

    Solution
    \[\begin{split}\nabla f = 2A\mathbf{x} = \begin{bmatrix} 4x - 8y \\ -8x + 2y \end{bmatrix}, \qquad \nabla^2 f = 2A = \begin{bmatrix} 4 & -8 \\ -8 & 2 \end{bmatrix}\end{split}\]
  3. Is \(f\) coercive? Why or why not?

    Solution

    Since \(A\) is not positive definite (its eigenvalues are approximately \(5.53\) and \(-2.53\)), the function is not coercive.

  4. Is \(f\) convex? Why or why not?

    Solution

    Since the Hessian is not positive semidefinite (eigenvalues approximately \(11.06\) and \(-5.06\)), the function is not convex.

  5. Find and classify the stationary points of \(f(x,y)=2x^2-8xy+y^2\).

    Solution

    Setting \(\nabla f = 0\): \(4x - 8y = 0\) and \(-8x + 2y = 0\). The only solution is \((0, 0)\).

    The Hessian at \((0,0)\) is \(\begin{bmatrix} 4 & -8 \\ -8 & 2 \end{bmatrix}\), which is indefinite (eigenvalues \(\approx 11.06\) and \(\approx -5.06\)) → saddle point.

    Since \(f\) is not coercive and has no local minima, there are no global minima.


Worksheet 2-3: Q2#

Now consider the function \(g(x,y)=2x^2 - 2xy + y^2 + 6x + 2y\).

  1. Write the function in the quadratic form \(g(x,y) = \mathbf{x}^\top A \mathbf{x} + 2\mathbf{b}^\top\mathbf{x} + c\).

    Solution
    \[\begin{split}A = \begin{bmatrix} 2 & -1 \\ -1 & 1 \end{bmatrix}, \qquad \mathbf{b} = \begin{bmatrix} 3 \\ 1 \end{bmatrix}, \qquad c = 0\end{split}\]
  2. What is the gradient \(\nabla g(x,y)\) and Hessian \(\nabla^2 g(x,y)\)?

    Solution
    \[\begin{split}\nabla g = 2A\mathbf{x} + 2\mathbf{b} = \begin{bmatrix} 4x - 2y + 6 \\ -2x + 2y + 2 \end{bmatrix}, \qquad \nabla^2 g = 2A = \begin{bmatrix} 4 & -2 \\ -2 & 2 \end{bmatrix}\end{split}\]
  3. Is \(g\) coercive? Why or why not?

    Solution

    Since \(A\) is positive definite (eigenvalues \(\approx 2.62\) and \(\approx 0.38\)), the function is coercive.

  4. Is \(g\) convex? Why or why not?

    Solution

    Since the Hessian is positive semidefinite (eigenvalues \(\approx 5.23\) and \(\approx 0.76\)), the function is convex.

  5. Find and classify the stationary points of \(g(x,y)=2x^2 - 2xy + y^2 + 6x + 2y\).

    Solution

    Setting \(\nabla g = 0\):

    \[4x - 2y + 6 = 0, \qquad -2x + 2y + 2 = 0\]

    Solving gives \((-4, -5)\).

    The Hessian at \((-4,-5)\) is \(\begin{bmatrix} 4 & -2 \\ -2 & 2 \end{bmatrix}\), which is positive definite (eigenvalues \(3 \pm \sqrt{5} > 0\)) → local minimum.

    Since \(g\) is coercive and convex with a local minimum, this is also the global minimum.