Laplace Crank Hessian
1. **Problem 1: Solve for A1, A2, A3, A4 in the Laplace equation with given boundary values and uniform mesh spacing.**
Given the Laplace equation $$\frac{\partial^2 U}{\partial x^2} + \frac{\partial^2 U}{\partial y^2} = 0$$ and the boundary values:
- Top boundary: 3 and 6
- Left boundary: 0
- Bottom boundary: 0
- Right boundary: 3
Using the finite difference method with uniform mesh spacing $h=k$, the value at each interior node is the average of its four neighbors due to symmetry and the Laplace equation.
For node A1:
$$A1 = \frac{\text{Top} + \text{Left} + A2 + A3}{4} = \frac{3 + 0 + A2 + A3}{4}$$
Similarly for A2, A3, and A4:
$$A2 = \frac{6 + A1 + A4 + 0}{4}$$
$$A3 = \frac{A1 + 0 + 0 + A4}{4}$$
$$A4 = \frac{A2 + A3 + 3 + 0}{4}$$
Solving these equations simultaneously with the given boundary conditions leads to the values:
**Answer:** a) $A1=3.0$, $A2=3.5$, $A3=4.5$, $A4=3.0$
2. **Problem 2: Identify the correct finite difference form of the PDE using Crank Nicolson's formulation.**
Given PDE:
$$\frac{\partial^2 f}{\partial x^2} = \frac{\partial f}{\partial t}$$
With mesh sizes $h$ and $k$ such that $$\frac{k}{2h^2} = \frac{1}{2}$$
The Crank Nicolson scheme averages the explicit and implicit methods, leading to the finite difference equation:
$$f_{i-1,j+1} - 4f_{i,j+1} + f_{i+1,j+1} = -f_{i-1,j} + 2f_{i,j} + 2f_{i+1,j}$$
**Answer:** a)
3. **Problem 3: Find the Hessian matrix of $f(x,y) = x^3 - 2xy - y^6$ at point $(1,2)$.**
Calculate second derivatives:
$$f_x = 3x^2 - 2y$$
$$f_y = -2x - 6y^5$$
Second derivatives:
$$f_{xx} = \frac{\partial}{\partial x}(3x^2 - 2y) = 6x$$
$$f_{yy} = \frac{\partial}{\partial y}(-2x - 6y^5) = -30y^4$$
$$f_{xy} = f_{yx} = \frac{\partial}{\partial y}(3x^2 - 2y) = -2$$
Evaluate at $(1,2)$:
$$f_{xx}(1,2) = 6 \times 1 = 6$$
$$f_{yy}(1,2) = -30 \times (2)^4 = -30 \times 16 = -480$$
$$f_{xy}(1,2) = -2$$
Thus, the Hessian matrix is:
$$\begin{bmatrix} 6 & -2 \\ -2 & -480 \end{bmatrix}$$
**Answer:** c)