Consider the function
$$z(x,y) = 2x^2(x+2)^2 - 5xy^2 - 2(2y+3)^3.$$
Determine the partial derivatives with respect to $x$ and $y$.
The function $z(x,y)$ is the sum of three functions $u(x,y)$, $v(x,y)$ and $w(x,y)$, where
$$
u(x,y) = 2x^2(x+2)^2, \qquad v(x,y) = - 5xy^2 \qquad \text{and} \qquad w(x,y) = - 2(2y+3)^3.
$$
The partial derivatives of $z(x,y)$ are then, according to the sum rule, the sum of the partial derivatives of $u(x,y)$, $v(x,y)$ and $w(x,y)$.
We start by determining the partial derivative of $z(x,y)$ with respect to $x$. Hence, we need $u'_x(x,y)$, $v'_x(x,y)$ and $w'_x(x,y)$. The function $u(x,y)$ can be written as the product of the two functions $f(x,y)$ and $g(x,y)$:
$$u(x,y) = f(x,y)g(x,y) \qquad \text{with} \qquad f(x,y) = 2x^2 \qquad \text{and} \qquad g(x,y)=(x+2)^2.$$
Now we can use the product rule to determine the partial derivative of $u(x,y)$ with respect to $x$:
$$
\begin{align}
f'_x(x,y) &= 2\cdot2x = 4x\\
g'_x(x,y) &= 2(x+2)^{2-1} \cdot 1 = 2(x+2)\\[1mm]
u'_x(x,y) &= f'_x(x,y)g(x,y) + f(x,y)g'_x(x,y) = 4x\cdot (x+2)^2 + 2x^2\cdot2(x+2) = 4x(x+2)^2 +4x^2(x+2) .
\end{align}
$$
For determining $g'_x(x,y)$ we have used the chain rule for composite power functions. Then we determine $v'_x(x,y)$. We can write $v(x,y)$ as
$$v(x,y) = c\cdot f(x,y) \qquad \text{with} \qquad c = -5y^2 \qquad \text{and} \qquad f(x,y)=x.$$
Note that we determine the partial derivative with respect to $x$. This means that we can treat $y$ as a constant, which is why $-5y^2$ is denoted as constant $c$ and now written down as a separate function. According to the scalar product rule it holds that
$$v'_x(x,y) = c \cdot f'_x(x,y) = -5y^2 \cdot 1 = -5y^2.$$
Finally, we determine $w'_x(x,y)$. Note that $w(x,y)$ does not depend on $x$, which means that we can consider it to be constant when differentiation with respect to $x$. The derivative of a constant is zero, and hence
$$w'_x(x,y) = 0.$$
Now we can determine the partial derivative of $z(x,y)$ with respect to $x$:
$$z'_x(x,y) = u'_x(x,y) + v'_x(x,y) + w'_x(x,y) = 4x(x+2)^2 +4x^2(x+2) -5y^2 + 0 = 4x(x+2)^2 +4x^2(x+2) -5y^2.$$
Similarly, we determine the partial derivative of $z(x,y)$ with respect to $y$. We start again with $u(x,y)$, where $u(x,y)$ does not depend on $y$. We consider this function therefore as a constant when differentiating with respect to $y$. The derivative of a constant is zero, hence,
$$u'_y(x,y) = 0.$$
Subsequently, we determine $v'_y(x,y)$. We can rewrite $v(x,y)$ as
$$v(x,y) = c\cdot f(x,y) \qquad \text{with}\qquad c = -5x \qquad \text{and} \qquad f(x,y)=y^2.$$
Note that we determine the partial derivative with respect to $y$. This means that we can treat $x$ as a constant, which is why $-5x$ is denoted as constant $c$ and now written down as a separate function. According to the scalar product rule it holds that
$$v'_y(x,y) = c \cdot f'_y(x,y) = -5x \cdot 2y = -10xy.$$
Finally, we determine $w'_y(x,y)$. We can rewrite $w(x,y)$ as
$$w(x,y) = -2 \big(f(x,y)\big)^k \qquad \text{with}\qquad k = 3 \qquad \text{and} \qquad f(x,y)=2y+3.$$
According to the scalar product rule and the chain rule for composite power functions it holds that
$$w'_y(x,y) = -2 \cdot k\big(f(x,y)\big)^{k-1} \cdot f'_y(x,y) = -2\cdot3(2y+3)^2\cdot2 = - 12(2y+3)^2.$$
Now we can determine the partial derivative of $z(x,y)$ with respect to $y$:
$$z'_y(x,y) = u'_y(x,y) + v'_y(x,y) + w'_y(x,y) =0-10xy - 12(2y+3)^2 = -10xy - 12(2y+3)^2.$$