Just doing example questions to better understand. Find all first and second partial derivatives for the function

u= xy^2+x^2y

du/dx = y^2 + 2xy

d^2u/dx^2 = 2y

du/dy = 2xy + x^2
d^2u/dy^2 = 2x

Let's not forget

d^2u/dx/dy = d^2u/dydx = 2

This is just for study for exam coming up and says it could be worth up to 12 marks. Not understanding vry well the two

To find the first and second partial derivatives of the function u = xy^2 + x^2y, we need to differentiate with respect to each variable separately. Let's start with the first partial derivatives.

First Partial Derivatives:

To find the first partial derivative with respect to x, we treat y as a constant and differentiate each term with respect to x:
∂u/∂x = ∂(xy^2)/∂x + ∂(x^2y)/∂x

Differentiating each term:
∂(xy^2)/∂x = y^2 (∂x/∂x) = y^2
∂(x^2y)/∂x = 2xy (∂x/∂x) = 2xy

Combining the derivatives:
∂u/∂x = y^2 + 2xy

Now let's find the first partial derivative with respect to y, treating x as a constant:
∂u/∂y = ∂(xy^2)/∂y + ∂(x^2y)/∂y

Differentiating each term:
∂(xy^2)/∂y = 2xy (∂y/∂y) = 2xy
∂(x^2y)/∂y = x^2 (∂y/∂y) = x^2

Combining the derivatives:
∂u/∂y = 2xy + x^2

Second Partial Derivatives:

To find the second partial derivatives, we differentiate the first partial derivatives obtained above with respect to the corresponding variable.

The second partial derivative with respect to x is found by differentiating the first partial derivative ∂u/∂x with respect to x:
∂^2u/∂x^2 = ∂(∂u/∂x)/∂x

Differentiating ∂u/∂x = y^2 + 2xy with respect to x:
∂^2u/∂x^2 = ∂(y^2 + 2xy)/∂x
= 0 + 2y (∂x/∂x)
= 2y

The second partial derivative with respect to y is found by differentiating the first partial derivative ∂u/∂y with respect to y:
∂^2u/∂y^2 = ∂(∂u/∂y)/∂y

Differentiating ∂u/∂y = 2xy + x^2 with respect to y:
∂^2u/∂y^2 = ∂(2xy + x^2)/∂y
= 2x (∂y/∂y)
= 2x

Finally, the mixed second partial derivative involves differentiating the first partial derivative ∂u/∂x with respect to y:
∂^2u/∂y∂x = ∂(∂u/∂x)/∂y

Differentiating ∂u/∂x = y^2 + 2xy with respect to y:
∂^2u/∂y∂x = ∂(y^2 + 2xy)/∂y
= 0 + 2x (∂y/∂y)
= 2x

So, the first partial derivatives are ∂u/∂x = y^2 + 2xy and ∂u/∂y = 2xy + x^2, and the second partial derivatives are ∂^2u/∂x^2 = 2y, ∂^2u/∂y^2 = 2x, and ∂^2u/∂y∂x = 2x.