Partial Derivatives – Examples with Answers

Partial derivatives are a concept of multivariate calculus that allows us to measure how a function changes when one of its variables varies, while the others remain constant. They are often used in physics, engineering, and economics to model systems involving multiple variables.

In this article, we will give a more detailed introduction to partial derivatives, including how to calculate them. Then, we will look at several examples to practice the concepts.

CALCULUS
Examples of partial derivatives

Relevant for

Learning about partial derivatives with examples.

See examples

CALCULUS
Examples of partial derivatives

Relevant for

Learning about partial derivatives with examples.

See examples

How to find partial derivatives of functions?

To find the partial derivative of a function with respect to one of its variables, you can follow these steps:

Step 1: Write the function in terms of the variables with respect to which you want to differentiate it.

For example, if you wanted to find the partial derivative of the function $latex f(x,y,z)$ with respect to $latex x$, you would write it as $latex \dfrac{\partial f}{\partial x}$.

Step 2: Take the derivative of the function with respect to the variable you are interested in. In this case, we would take the derivative of $latex f(x,y,z)$ with respect to $latex x$.

Step 3: Treat the other variables of the function as constants while taking the derivative. This means that you can ignore the derivative of $latex y$ and $latex z$, and focus only on the derivative of $latex x$.

For example, if $latex f(x,y,z) = x^2 + y^2 + z^2$, the partial derivative of f with respect to x would be $latex 2x$, since y and z are treated as constants.

It is also important to note that the partial derivative of a function is a concept of multivariable calculus, which is a branch of mathematics that deals with functions of multiple variables.


Partial derivatives – Examples with answers

EXAMPLE 1

Given the following function:

$$f(x,y)=(2x+y^{2})$$

Find the first-order partial derivatives, with respect to the variables x and y.

The notation for the partial derivative is similar to that of the normal derivative, except that, instead of the letter d, the symbol ∂ is used.

On the other hand, when a function is partially derived with respect to one of its variables, the other variables are taken as if they were constant during the procedure of calculating the partial derivative.

For example, to take the partial derivative of f(x, y) with respect to x, the variable y is taken as if it were a constant:

$$\dfrac{\partial f}{\partial x}=\dfrac{\partial }{\partial x} (2x+y^{2})=\allowbreak 2 $$

Similarly, when calculating the partial derivative of f(x, y) with respect to y, the variable x acts as if it were a constant during the process of calculating the derivative:

$$\dfrac{\partial f}{\partial y}=\dfrac{\partial }{\partial y} (2x+y^{2})=\allowbreak 2y $$

EXAMPLE 2

Find the first-order partial derivatives of the following function of two variables:

$$f(x,y)=2xy^{2} $$

To find the partial derivative with respect to the variable x, the second variable y of the function is taken as a constant, and we proceed as in the ordinary derivatives.

In this case, $latex 2y^2$ is a constant that comes out of the derivative operator and that multiplies the partial derivative of x with respect to x, which is 1:

$$\dfrac{\partial f}{\partial x}=\dfrac{\partial }{\partial x} (2xy^{2})=\allowbreak 2y^{2} $$

Similarly, to find the partial derivative with respect to y, the variable x is taken as constant. Then 2x comes out of the derivative operation with respect to y, then y is squared with respect to y:

$$\dfrac{\partial f}{\partial y}=\dfrac{\partial }{\partial y} (2xy^{2})=\allowbreak 4xy $$

EXAMPLE 3

We have the following function of two variables:

$$f(x,y)=\dfrac{3x}{y^{2}} $$

Find the partial derivative of the function f(x, y) with respect to x and the partial derivative of f(x, y) with respect to y.

To calculate the partial with respect to x, y is taken as a constant, so that $latex \frac{3}{y^2}$ comes out of the derivation symbol and is left by multiplying the derivative of x with respect to x, which is 1.

$$\dfrac{\partial f}{\partial x}=\dfrac{\partial }{\partial x}( \dfrac{3x}{y^{2}})=\allowbreak \dfrac{3}{y^{2}} $$

Similarly, to find the partial with respect to y, we take x as a constant and 3x as a factor preceding the derivative symbol, then we take the derivative of 1 over y squared, which is -2 times y raised to the minus 3.

$$\dfrac{\partial f}{\partial y}=\dfrac{\partial }{\partial y}( \dfrac{3x}{y^{2}})=\allowbreak -6\dfrac{x}{y^{3}} $$

EXAMPLE 4

Calculate the first-order partial derivatives of the following function of two variables:

$$f(x,y)=\dfrac{x^{2}-y}{x+y^{2}} $$

To find $latex \dfrac{\partial f}{\partial x}$, we take the variable y as a constant. Then proceed as an ordinary derivative. In this case, the ‘formula’ for the derivative of a quotient has been used.

$$\dfrac{\partial f}{\partial x}=\dfrac{\partial }{\partial x}\left( \dfrac{ x^{2}-y}{x+y^{2}}\right)$$

$$ =\allowbreak \dfrac{1}{\left( y^{2}+x\right) ^{2}} \left( x^{2}+2xy^{2}+y\right) $$

Similarly, to find $latex \dfrac{\partial f}{\partial y}$, we take the variable x as a constant and apply the ‘formula’ for the derivative of a quotient.

$$\dfrac{\partial f}{\partial y}=\dfrac{\partial }{\partial y}\left( \dfrac{ x^{2}-y}{x+y^{2}}\right)$$

$$ =\allowbreak -\dfrac{1}{\left( y^{2}+x\right) ^{2}} \left( 2x^{2}y+x-y^{2}\right) $$

EXAMPLE 5

We have the following:

$$ f(x,y)=\sqrt{\dfrac{x-y}{x+y}} $$

Find: $latex \dfrac{\partial f}{\partial x} $ and $latex \dfrac{\partial f}{\partial y} $.

We have the following:

$$\dfrac{\partial f}{\partial x}=\dfrac{\partial }{\partial x}\left( \sqrt{ \dfrac{x-y}{x+y}}\right) $$

$$=\allowbreak \dfrac{y}{\sqrt{\dfrac{x-y}{x+y}} \left( x+y\right) ^{2}} $$

Taking x as constant, it is derived in the usual way with respect to y.

$$\dfrac{\partial f}{\partial y}=\dfrac{\partial }{\partial y}\left( \sqrt{ \dfrac{x-y}{x+y}}\right) $$

$$=\allowbreak -\dfrac{x}{\sqrt{\dfrac{x-y}{x+y}} \left( x+y\right) ^{2}} $$

EXAMPLE 6

Given the function:

$$f(x,y)=(2x^{2}+y^{3}) $$

Find: $latex \dfrac{\partial ^{2}f}{\partial x^{2}} $, $latex \dfrac{\partial ^{2}f}{ \partial y^{2}} $ and $latex \dfrac{\partial ^{2}f}{\partial y \partial x} $.

Since this is a second derivative with respect to x, the partial with respect to x is taken first and the result is derived again with respect to x.

$$\dfrac{\partial ^{2}f}{\partial x^{2}}=\dfrac{\partial ^{2}}{ \partial x^{2}}(2x^{2}+y^{3})$$

$$=\dfrac{\partial }{\partial x}\left( \dfrac{ \partial }{\partial x}(2x^{2}+y^{3})\right)$$

$$ =\dfrac{\partial }{\partial x} \left( 4x\right) =\allowbreak 4 $$

To obtain the second derivative with respect to y, first the partial is taken with respect to y and the result is derived again with respect to y.

$$\dfrac{\partial ^{2}f}{\partial y^{2}}=\dfrac{\partial ^{2}}{ \partial y^{2}}(2x^{2}+y^{3})$$

$$=\dfrac{\partial }{\partial y}\left( \dfrac{ \partial }{\partial y}(2x^{2}+y^{3})\right) $$

$$=\dfrac{\partial }{\partial y} \left( 3y^{2}\right) =\allowbreak 6y $$

Since this is a mixed second derivative, the partial is first taken with respect to x and the result is derived again with respect to y.

$$\dfrac{\partial ^{2}f}{\partial y\partial x}=\dfrac{\partial ^{2}}{\partial y\partial x}(2x^{2}+y^{3})$$

$$=\dfrac{\partial }{\partial y}\left( \dfrac{ \partial }{\partial x}(2x^{2}+y^{3})\right) $$

$$=\dfrac{\partial }{\partial y} \left( 4x\right) =\allowbreak 0 $$

EXAMPLE 7

We have the function:

$$f(x,y)=-3x^{2}y^{3} $$

Find: $latex f_{x}(2,3)$ and $latex f_{y}\left( 2,3\right) $.

The notation $latex f_{x}(x,y)$ is an abbreviated form of writing $latex\dfrac{ \partial f(x,y)}{\partial x} $

$latex f_{x}(2,\,1) $ means to evaluate the partial derivative with respect to x at coordinate point $latex x=2 $ and $latex y=1 $.

$$ f_x (2,1)=\dfrac{\partial f(x,y)}{\partial x} |_{(2, \, 1)} $$

$$= \dfrac{\partial (-3x^{2}y^{3})}{\partial x} | _{(2,\,1)}$$

$$=-6xy^{3}|_{(2,\,1)}=-6\cdot 2\cdot 1^{3}= -12$$

Similarly, $latex f_{y}(2,\,1) $ means to evaluate the partial derivative with respect to y at the point of coordinates $latex x=2 $ and $latex y=1 $.

$$f_{y}(2,1)=\dfrac{\partial f(x,y)}{\partial y} |_{(2,\,1)}$$

$$=\dfrac{\partial (-3x^{2}y^{3})}{\partial y} |_{(2,\,1)}$$

$$= -9x^{2}y^{2}|_{(2,\,1)}=-9\cdot 2^{2}\cdot 1^{2}=\allowbreak -36$$

EXAMPLE 8

Given the following function:

$$f(x,y) = \ln (2x + y^2) $$

Determine $latex D_x f$ and $latex D_y f$.

The notation $latex D_x f$ is a shorthand way of writing $latex \dfrac{\partial f}{\partial x}$.

$$D_{x}f=D_{x}\ln (2x+y^{2})$$

$$=\allowbreak \dfrac{2}{y^{2}+2x}$$

Similarly, $latex D_y f$ is equivalent to writing $latex \dfrac{\partial f}{\partial y}$.

$$D_{y}f=D_{y}\ln (2x+y^{2})$$

$$=\allowbreak 2\dfrac{y}{y^{2}+2x}$$

EXAMPLE 9

We have the following:

$$f(x,y)=x^y – y^x$$

Find $latex f_{xy}(2,3)$.

We start by finding the partial derivatives:

$$f_{xy}(2,3)=\dfrac{\partial ^{2}f}{\partial x\partial y}|_{(2,3)}$$

$$\dfrac{\partial f}{\partial y}=\dfrac{\partial (x^{y}-y^{x})}{\partial y} = x^{y}\ln x-xy^{x-1}$$

$$ \dfrac{\partial ^{2}f}{\partial x\partial y}=\dfrac{\partial }{\partial x} \left( \dfrac{\partial f}{\partial y}\right)$$

$$=\dfrac{\partial }{\partial x} \left( \allowbreak x^{y}\ln x-xy^{x-1}\right) $$

$$=-\frac{1}{xy} \left( xy^{x}-x^{y}y+x^{2}y^{x}\ln y-x^{y}y^{2}\ln x\right) $$

Now replace x with 2 and y with 3:

$$f_{xy}(2,3)=\dfrac{\partial ^{2}f}{\partial x\partial y}|_{(2,3)}$$

$$=-\dfrac{1 }{2\cdot 3}\left( 2\cdot 3^{2}-2^{3}3+2^{2}3^{2}\ln 3-2^{3}3^{2}\ln 2\right) $$

Therefore, we have:

$$f_{xy}(2,3)=12\ln 2-6\ln 3+1= 2.7261$$

EXAMPLE 10

From the following function of two variables:

$$ f(x,y)=e^{x}\sin (y)$$

Find $latex D_{xx}f+D_{yy}f$.

$$D_{x}f=D_{x}(e^{x}\sin (y))= e^{x}\sin y $$

$$D_{xx}f=D_{x}(D_{x}f)=D_{x}(e^{x}\sin y)= e^{x}\sin y $$

Similarly:

$$D_{y}f=D_{y}(e^{x}\sin (y))= \left( \cos y\right) e^{x}$$

$$D_{yy}f=D_{y}(D_{y}f)=D_{y}(\left( \cos y\right) e^{x})= -e^{x}\sin y$$

Therefore:

$$D_{xx}f+D_{yy}f= e^{x}\sin y+(-e^{x}\sin y)=0$$


Partial derivatives – Practice problems

Partial derivatives quiz
Logo
You have completed the quiz!

Find the partial derivative of $latex f(x,y)=x^2+x\sin(y)$ with respect to $latex y$.

Write the answer in the input box.

$latex \frac{\partial f}{\partial y}=$

See also

Interested in learning more about partial derivatives? You can take a look at these pages:

Profile picture for author Jefferson Huera Guzman

Jefferson Huera Guzman

Jefferson is the lead author and administrator of Neurochispas.com. The interactive Mathematics and Physics content that I have created has helped many students.

Learn mathematics with our additional resources in different topics

LEARN MORE