z=x²+xy²-2x+1.
∂z/∂x=2x+y²-2=0 at a turning-point in the x direction.
∂z/∂y=2xy=0 at a turning-point in the y direction.
We need to have zero gradients at the same point.
2xy=0⇒x=0 or y=0, or x=y=0.
When x=0, y=±2 and z=1; when y=0, x=1 and z=0; and when x=y=0, z=1.
Second derivatives:
∂²z/∂x²=2, ∂²z/∂²y²=2x, ∂²z/∂x∂y=∂²z/∂y∂x=2y,
D=(∂²z/∂x²)(∂²z/∂²y²)-(∂²z/∂x∂y)².
The table below shows the possibilities.
x
|
y
|
z
|
D
|
Type
|
0
|
√2
|
1
|
4x-4y²<0
|
Saddle
|
0
|
-√2
|
1
|
4x-4y²<0
|
Saddle
|
1
|
0
|
0
|
4>0
|
Minimum
|
0
|
0
|
1
|
0
|
Inconclusive
|
From this we can identify a minimum at (1,0,0) and saddle-points at (0,√2,1) and (0,-√2,1).