<p>They are taking a total derivative, not a partial derivative.</p>
<p>Mathematically, when the variables <span class="math-container">$x_1,x_2$</span> of a function depend on some parameter <span class="math-container">$a$</span>, the total effect of (infinitesimally) changing this parameter is
<span class="math-container">$$
\frac{\text{d} F(x_1(a),x_2(a))}{\text{d} a} = 
\frac{\partial F(x_1,x_2)}{\partial x_1} \frac{\text{d} x_1(a)}{\text{d} a} +
\frac{\partial F(x_1,x_2)}{\partial x_2} \frac{\text{d} x_2(a)}{\text{d} a}.
$$</span></p>
<hr />
<p><strong>Example</strong> <br>
Define the area of a rectangle with sidelengths <span class="math-container">$a,b$</span>:
<span class="math-container">$$
A(a,b) = ab.
$$</span>
If this is a square, then
<span class="math-container">$$
A(a,a) = a^2.
$$</span>
What is the effect on area of lengthening <em>one side</em> of the square? You get this by taking the partial derivative of <span class="math-container">$T$</span>:
<span class="math-container">$$
\frac{\partial A(a,a)}{\partial a} = a.
$$</span>
Here <span class="math-container">$\partial$</span> denotes that we are taking the derivative of the function <span class="math-container">$A( a , b)$</span> w.r.t the first variable. We could also write this as:
<span class="math-container">$$
\left.\frac{\partial A(x_1,x_2)}{\partial x_1}\right|_{x_1=x_2=a} = \left.x_2\right|_{x_1=x_2=a} = a.
$$</span></p>
<p>You can also look at the effect of increasing the parameter <span class="math-container">$a$</span> while maintaining a square shape, i.e. increasing both sides at the same time. This is the total derivative:
<span class="math-container">$$
\frac{\text{d} A(a,a)}{\text{d} a} =
\frac{\text{d} a^2}{\text{d} a} =
 2a
$$</span>
or
<span class="math-container">$$
\begin{equation*}
\frac{\text{d} A(a,a)}{\text{d} a} = 
\left.\frac{\partial A(x_1,x_2)}{\partial x_1} \frac{\text{d} x_1(a)}{\text{d} a}\right|_{x_1=x_2=a} +
\left.\frac{\partial A(x_1,x_2)}{\partial x_2} \frac{\text{d} x_2(a)}{\text{d} a}\right|_{x_1=x_2=a} = \\
\left.x_2\right|_{x_1=x_2=a} \frac{\text{d} a}{\text{d} a} +
\left.x_1\right|_{x_1=x_2=a} \frac{\text{d} a}{\text{d} a} = 
a + a = 2a.
\end{equation*}
$$</span></p>

CC BY-SA 4.0
2024-01-22T15:35:44.960Z
2024-01-23T06:14:39.893Z
2024-01-23T06:14:39.893Z
Giskard
<p>I have an issue deriving the proof of Roy's Identity. It's merely a math issue since I cannot understand how the derivative works. More specifically: <a href="https://i.sstatic.net/yLiOo.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/yLiOo.png" alt="enter image description here" /></a></p>
<p>When it says: &quot;differentiating the above identity with respect to the price of a generic commodity j we have: ...
Well, i cannot understand how this derivative works. how is it possible that we have the first element in the RHS and then plus (+) something??
Can someone be clear about this please? I am struggling with the proof.</p>
<p>Thanks to all.</p>

CC BY-SA 4.0
2024-01-22T15:25:13.877Z
You might want to have a look at the Chain Rule: https://en.wikipedia.org/wiki/Chain_rule
Matteo Bulgarelli
CC BY-SA 4.0
2024-01-22T15:41:53.213Z
Long story short: if you have a function $f$ of two variables $x,g$, and if one of these two variables, say $g$ depends on the other variable, say $x$, so that we can write $g (x) $ the partial derivative of this function $f(x, g (x))$ with respect to $x$ is given by the "direct" effect of the change $f$ due to the marginal change in x, plus the "indirect" effect that the marginal change in $x$ has on the other variable.  Idk why there is this fxxg in the end of my comment
Matteo Bulgarelli
<microeconomics>
Differentiation in proof of Roy's identity
john
# Differentiation in proof of Roy's identity

(Asked by: username_0 on 2024-01-22)

I have an issue deriving the proof of Roy's Identity. It's merely a math issue since I cannot understand how the derivative works. More specifically: [![enter image description here](https://i.sstatic.net/yLiOo.png)](https://i.sstatic.net/yLiOo.png)

When it says: "differentiating the above identity with respect to the price of a generic commodity j we have: ...
Well, i cannot understand how this derivative works. how is it possible that we have the first element in the RHS and then plus (+) something??
Can someone be clear about this please? I am struggling with the proof.

Thanks to all.

**Tags:** microeconomics
> **Comments:**
> **username_1**: You might want to have a look at the Chain Rule: https://en.wikipedia.org/wiki/Chain_rule  
> **username_1**: Long story short: if you have a function $f$ of two variables $x,g$, and if one of these two variables, say $g$ depends on the other variable, say $x$, so that we can write $g (x) $ the partial derivative of this function $f(x, g (x))$ with respect to $x$ is given by the "direct" effect of the change $f$ due to the marginal change in x, plus the "indirect" effect that the marginal change in $x$ has on the other variable.  Idk why there is this fxxg in the end of my comment  

---

## 1 answers

### Answer by username_2 on 2024-01-22. Score: 1

They are taking a total derivative, not a partial derivative.

Mathematically, when the variables $x\_1,x\_2$ of a function depend on some parameter $a$, the total effect of (infinitesimally) changing this parameter is
$$
\frac{\text{d} F(x\_1(a),x\_2(a))}{\text{d} a} =
\frac{\partial F(x\_1,x\_2)}{\partial x\_1} \frac{\text{d} x\_1(a)}{\text{d} a} +
\frac{\partial F(x\_1,x\_2)}{\partial x\_2} \frac{\text{d} x\_2(a)}{\text{d} a}.
$$

---

**Example**   
Define the area of a rectangle with sidelengths $a,b$:
$$
A(a,b) = ab.
$$
If this is a square, then
$$
A(a,a) = a^2.
$$
What is the effect on area of lengthening *one side* of the square? You get this by taking the partial derivative of $T$:
$$
\frac{\partial A(a,a)}{\partial a} = a.
$$
Here $\partial$ denotes that we are taking the derivative of the function $A( a , b)$ w.r.t the first variable. We could also write this as:
$$
\left.\frac{\partial A(x\_1,x\_2)}{\partial x\_1}\right|\_{x\_1=x\_2=a} = \left.x\_2\right|\_{x\_1=x\_2=a} = a.
$$

You can also look at the effect of increasing the parameter $a$ while maintaining a square shape, i.e. increasing both sides at the same time. This is the total derivative:
$$
\frac{\text{d} A(a,a)}{\text{d} a} =
\frac{\text{d} a^2}{\text{d} a} =
2a
$$
or
$$
\begin{equation\*}
\frac{\text{d} A(a,a)}{\text{d} a} =
\left.\frac{\partial A(x\_1,x\_2)}{\partial x\_1} \frac{\text{d} x\_1(a)}{\text{d} a}\right|\_{x\_1=x\_2=a} +
\left.\frac{\partial A(x\_1,x\_2)}{\partial x\_2} \frac{\text{d} x\_2(a)}{\text{d} a}\right|\_{x\_1=x\_2=a} = \\
\left.x\_2\right|\_{x\_1=x\_2=a} \frac{\text{d} a}{\text{d} a} +
\left.x\_1\right|\_{x\_1=x\_2=a} \frac{\text{d} a}{\text{d} a} =
a + a = 2a.
\end{equation\*}
$$


---

