# Worksheet 2-3

Download: [CMSE382-WS2_3.pdf](CMSE382-WS2_3.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$ for some symmetric matrix $A$, vector $\mathbf{b}$, and scalar $c$.

2. What is the gradient $\nabla f(x,y)$ and Hessian $\nabla^2 f(x,y)$ of the function? *(Hint: use your matrix $A$ from above.)*

3. Using this, is $f$ coercive? Why or why not?

4. Is $f$ convex? Why or why not?

5. Find and classify the stationary points of $f(x,y)=2x^2-8xy+y^2$. If there are local optima, are they also global?

---

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

2. What is the gradient $\nabla g(x,y)$ and Hessian $\nabla^2 g(x,y)$? *(Hint: use your matrix $A$.)*

3. Is $g$ coercive? Why or why not?

4. Is $g$ convex? Why or why not?

5. Find and classify the stationary points of $g(x,y)=2x^2 - 2xy + y^2 + 6x + 2y$. Use the properties of quadratic functions to determine if any local optima are also global optima.
