<p>I think that making the substitutions <strong>you overlooked some dependence on <span class="math-container">$z=x_3/x_1$</span>.</strong> I mean, if you look at your calculations, you will find some <span class="math-container">$x_3/x_1$</span> which is not substituted by <span class="math-container">$z$</span>.<span class="math-container">$^1$</span></p>
<p>By the way, in general, your method is correct, but cumbersome.</p>
<p>It is formally correct to write the substitution as <span class="math-container">$x_1 (z) = x_3/z$</span> and <span class="math-container">$x_3 (z) = z x_1$</span>, but if you substitute them in the <span class="math-container">$MRS_{13}$</span> as such, and then you differentiate using the chain rule for composite functions, you make your life harder when calculating the derivative.</p>
<p>Instead, just plug into the formula of <span class="math-container">$MRS_{13}$</span> <span class="math-container">$x_1 = x_3/z$</span> and <span class="math-container">$x_3 = z x_1$</span>, and treat <span class="math-container">$x_1$</span> and <span class="math-container">$x_3$</span>, after the substitution, as constants.
But one must be careful to not forget some dependence on <span class="math-container">$z$</span>.</p>
<p>The following are <strong>my calculations for the derivative of  <span class="math-container">$MRS_{13}$</span></strong> <strong>with respect to <span class="math-container">$z=x_3/x_1$</span></strong>.</p>
<p><strong><span class="math-container">$MRS_{13}$</span> is:</strong></p>
<p><span class="math-container">$$MRS_{13}  = \frac{\delta}{\gamma} \frac{x_1^{\delta-1}}{x_3^{\gamma - 1}} \qquad (1)$$</span></p>
<p>In order to 'isolate' <span class="math-container">$z$</span>,  I write <span class="math-container">$(1)$</span> as:</p>
<p><span class="math-container">$$MRS_{13}  = \frac{\delta}{\gamma} \frac{x_1^{\delta-1+\gamma-1-\gamma+1}}{x_3^{\gamma - 1}}== \frac{\delta}{\gamma} \frac{x_1^{\gamma-1} }{x_3^{\gamma - 1}} x_1^{\delta -1-\gamma +1}=\frac{\delta}{\gamma}z^{1-\gamma} x_1^{\delta-\gamma}\qquad (2)$$</span></p>
<p><strong>Differentiating with respect to <span class="math-container">$z$</span> and substituting back <span class="math-container">$x_3/x_1$</span> for <span class="math-container">$z$</span></strong> I have:</p>
<p><span class="math-container">$$\frac{\partial MRS_{13}}{\partial z} =  \frac{\delta}{\gamma}  (1-\gamma) z^{-\gamma} x_1 ^{\delta-\gamma}=\frac{\delta}{\gamma}  (1-\gamma) (\frac {x_1}{x_3})^{\gamma} x_1 ^{\delta-\gamma} =\frac{\delta}{\gamma}(1-\gamma)\frac {x_1^\delta}{x_3^\gamma}.\qquad (3)$$</span></p>
<hr />
<p><span class="math-container">$^1$</span> <sup>I tried to follow your method making the substitutions, I had the same result as you, but I realized that some dependence on <span class="math-container">$z$</span> had been forgotten, because in the formula remained some <span class="math-container">$x_3/x_1$</span> that was not substituted by <span class="math-container">$z$</span>. This mistake was indicated to you also in the post you linked to Math.SE. I think that here there is a similar mistake during the substitutions. </sup></p>

CC BY-SA 4.0
2023-03-28T18:16:58.190Z
Thank you very much! However, are you sure your result would be the correct one? Because if we plug it into the formula for EoS, we would get constant EoS, which I know is not the case (I have found suitable demands for goods - very long and ugly formula - then found the optimum values and measured EoS - it was constant for $x_1$ and $x_2$ etc... but varying for $x_1$ and $x_3$ etc...). Moreover, this would indicate that EoS depends on one parameter, which is intuitivelly weird... I am actually not sure, to be honest, if we can ever treat it as constants after the substitution.
Athaeneus
CC BY-SA 4.0
2023-03-28T18:58:59.253Z
Are you sure that $MRS_{13}$ is correct? I didn't calculated it.
BakerStreet
CC BY-SA 4.0
2023-03-28T19:57:40.583Z
These are my calculations, maybe there is a mistake, but you don't have the correct result? You said that you simulated it, what does it mean? Did you find it on Wolfram Alpha or similar?
BakerStreet
CC BY-SA 4.0
2023-03-28T20:29:04.650Z
The problem is that I interpreted your derivative as a partial derivative, with other variables except $z$ fixed, so I treated $x_1$ as fixed. But now I realize tha it is not a partial derivative, is a derivative in one variable, $z$: $\frac {dMRS_ 13}{d(z)}$. In this case you are right, $x_1$ is not fixed, but one must use the chain rule. So I think that the symbol  of partial derivatives in $\sigma _{ij}$ is not the right symbol. Sorry for the misunderstanding, I was confused by the partial derivative.
BakerStreet
CC BY-SA 4.0
2023-03-28T20:37:35.840Z
There  was a comment to your questionon Math.SE  that noticed this fact of the partial derivative, by  
@ Hans Lundmark, who I see  is a very high reputation user, so I think that this observation about the partial derivative is right. Sorry again for the misunderstanding.
BakerStreet
CC BY-SA 4.0
2023-03-29T06:36:32.950Z
I know I do not have the right result either. By simulation I mean, I have found Marshallian demands for all goods (this makes 8 possible relations between parameters, actually, so it is not completely free to move parameters as I would like to, but it still allows me to analyze the result). With the demands I was solving few problems for varying prices but constant parameters. Then I applied the OLS trick. There is also another trick: that for constant EoS, the OLS will be perfect fit for any combination of prices. For the utility function I have I see it is not the case, unfortunately.
Athaeneus
CC BY-SA 4.0
2023-03-29T06:44:15.073Z
Yeah... I have problems with distinction of these derivatives. You are right. If $x_3/x_1$ changes, each variable has to change as well, logically. Do I understand it well, that till the second step, my calculation would be correct (before solving derivatives)? That means that $d (x_3 (z))/dz \neq x_1$?  But wouldn't I get into infinite spiral then? Because $x_3 (z) = z  x_1(z) = z z^{-1} x_3(z)$ etc...? In this case? Shall I then write it just like $d x_3(z)$ and $d x_1 (z)$ and end my calculation there?
Athaeneus
CC BY-SA 4.0
2023-03-29T09:10:26.290Z
I find this issue slippery, and also the MathSE post left me doubtful, also about treating $x_1$ etc. as constants. The point is that it is not always possible to reduce the function(In our case $MRS_{13}$ )to a function of $z$ only, so that some other variable can appear, as $x_1$, and in this case actually it is a function of two variables, the derivative is actually a partial derivative and $x_1$ should be treated as constant. But this are hasty thougths, I need the time to think and make the calculations slowly.  I'm am very busy, but I will return to this question  as soon as possible.
BakerStreet
CC BY-SA 4.0
2024-11-14T09:55:53.163Z
I thought about this problem once again (well, more than once - and even that is an understatement). One option was that the operation when I put $\partial (x_j/x_i)$ under $MRS_{ij}$ was unfeasible... But that does not hold in this case as the utility function is invertible... So, I am intrigued by a different explanation... By assuming that both $x_i$ and $x_j$ are constants, we basically say that $z = x_j/x_i$ must be constant as well, right? Thus, $d z = 0$? And in that case, derivative would not make sense, because we want to investigate the effect of the variable's change?
Athaeneus
CC BY-SA 4.0
2023-03-28T17:55:56.790Z
2023-03-28T17:55:56.790Z
BakerStreet
<p>I have a following function and would like to find the elasticity of substitution between pairs:</p>
<p><span class="math-container">$$U = \left( x_1^\delta + x_2^\delta + x_3^\gamma + x_4^\gamma \right)^{\frac{1}{\delta + \gamma}}$$</span></p>
<p>With elasticity of substitution formula being:</p>
<p><span class="math-container">$$ \sigma_{ij} = \frac{\frac{\partial (x_j/x_i)}{x_j/x_i}}{\frac{\partial MRS_{ij}}{MRS_{ij}}} = \frac{1}{\frac{\partial MRS_{ij}}{\partial (x_j/x_i)}} \frac{MRS_{ij}}{x_j/x_i}$$</span></p>
<p>Where <span class="math-container">$MRS_{ij} = MU_i/MU_j$</span>.</p>
<p>I can divide the elasticity of substitution into two groups based on sameness of parameters. What concerns the results, <span class="math-container">$\sigma_{1,2}$</span> and <span class="math-container">$\sigma_{3,4}$</span> is <strong>easy to compute</strong>... <em>It gives the same result as CES function</em>.</p>
<p><strong>HOWEVER</strong>, the case of <span class="math-container">$\sigma_{1,3}$</span> and similar seems rather hard to find analythically. See what the <span class="math-container">$MRS_{13}$</span> is equal to:</p>
<p><span class="math-container">$$MRS_{13} = \frac{\frac{\delta}{\delta + \gamma}}{\frac{\gamma}{\delta + \gamma}} \frac{x_1^{\delta-1}}{x_3^{\gamma-1}} = \frac{\delta}{\gamma} \frac{x_1^{\delta-1}}{x_3^{\gamma - 1}} $$</span></p>
<p><strong>The difficulty comes because of the next step</strong> when we should <strong>differentiate it by fraction</strong> of <span class="math-container">$x_3/x_1$</span> and <a href="https://math.stackexchange.com/questions/4661581/when-substitution-works-and-when-it-fails-differentiation">math SE</a> told me this is usually solved through substitution <span class="math-container">$z= x_3/x_1$</span>, which means I should rewrite the variables as: <span class="math-container">$x_1 (z) = x_3/z$</span> and <span class="math-container">$x_3 (z) = z x_1$</span>.</p>
<h2>So why is this approach not correct:</h2>
<p><span class="math-container">$$\frac{\partial MRS_{13}}{\partial \frac{x_3}{x_1}} = \frac{\partial \left[\frac{\delta}{\gamma} \frac{x_1^{\delta-1}}{x_3^{\gamma - 1}} \right]}{\partial \frac{x_3}{x_1}} = 
\frac{\delta}{\gamma} \frac{\partial \left[ (x_1 (z) )^{\delta-1} \cdot (x_3 (z))^{-(\gamma-1)} \right]}{\partial z} = 
\frac{\delta}{\gamma} \left[ \frac{\partial (x_1 (z) )^{\delta-1}}{\partial z} (x_3 (z))^{-(\gamma-1)} + (x_1 (z) )^{\delta-1} \frac{\partial (x_3 (z))^{-(\gamma-1)}}{\partial z} \right] =
\frac{\delta}{\gamma} \left[ (\delta-1) (x_1 (z) )^{\delta-2} \frac{\partial x_1 (z)}{ \partial z} (x_3 (z))^{-\gamma+1} + (x_1 (z) )^{\delta-1} (-\gamma +1) (x_3 (z))^{-\gamma} \frac{\partial x_3 (z)}{\partial z} \right]$$</span></p>
<p><strong>Now substituing back</strong> for <span class="math-container">$x_1(z)$</span>, <span class="math-container">$x_3(z)$</span> and <span class="math-container">$z$</span>, we get:</p>
<p><span class="math-container">$$\frac{\partial MRS_{13}}{\partial \frac{x_3}{x_1}} = 
\frac{\delta}{\gamma} \left[ (\delta-1) \left( \frac{x_3}{\frac{x_3}{x_1}} \right)^{\delta-2} \left( x_1 \frac{x_3}{x_1}\right)^{-\gamma +1} \frac{\partial x_1 (z)}{ \partial z} + \left( \frac{x_3}{\frac{x_3}{x_1}} \right)^{\delta-1} (-\gamma + 1) \left( x_1 \frac{x_3}{x_1} \right)^{-\gamma} \frac{\partial x_3 (z)}{\partial z} \right]=
\frac{\delta}{\gamma} \left[ (\delta-1) ( x_1)^{\delta-2} ( x_3)^{-\gamma +1} \frac{\partial x_1 (z)}{ \partial z} + (x_1)^{\delta-1} (-\gamma + 1) (x_3)^{-\gamma} \frac{\partial x_3 (z)}{\partial z} \right]$$</span></p>
<p><strong>Now solving the interior derivatives</strong> since I know that <span class="math-container">$\partial x_3(z) / \partial z = \partial (x_1 \cdot z )/ \partial z = x_1$</span> etc... I should get:</p>
<p><span class="math-container">$$\frac{\partial MRS_{13}}{\partial \frac{x_3}{x_1}} = 
\frac{\delta}{\gamma} \left[(\delta-1) ( x_1)^{\delta-2} ( x_3)^{-\gamma +1}  (-1) \frac{x_3}{\left( \frac{x_3}{x_1} \right)^2}  + (x_1)^{\delta-1} (-\gamma + 1) (x_3)^{-\gamma} x_1 \right] =
\frac{\delta}{\gamma} \left[ (-\delta +1) x_1^\delta x_3^{-\gamma} + x_1^\delta x_3^{-\gamma} (-\gamma + 1) \right] =
\frac{\delta}{\gamma} \frac{x_1^\delta}{x_3^\gamma} \left[ 2 - \gamma - \delta \right]$$</span></p>
<h2>I know it is not correct because I have simulated the results</h2>

<microeconomics><mathematical-economics><elasticity-of-substitution>
Hardcore elasticity of substitution (bad results)
Athaeneus
# Hardcore elasticity of substitution (bad results)

(Asked by: username_0 on 2023-03-28)

I have a following function and would like to find the elasticity of substitution between pairs:

$$U = \left( x\_1^\delta + x\_2^\delta + x\_3^\gamma + x\_4^\gamma \right)^{\frac{1}{\delta + \gamma}}$$

With elasticity of substitution formula being:

$$ \sigma\_{ij} = \frac{\frac{\partial (x\_j/x\_i)}{x\_j/x\_i}}{\frac{\partial MRS\_{ij}}{MRS\_{ij}}} = \frac{1}{\frac{\partial MRS\_{ij}}{\partial (x\_j/x\_i)}} \frac{MRS\_{ij}}{x\_j/x\_i}$$

Where $MRS\_{ij} = MU\_i/MU\_j$.

I can divide the elasticity of substitution into two groups based on sameness of parameters. What concerns the results, $\sigma\_{1,2}$ and $\sigma\_{3,4}$ is **easy to compute**... *It gives the same result as CES function*.

**HOWEVER**, the case of $\sigma\_{1,3}$ and similar seems rather hard to find analythically. See what the $MRS\_{13}$ is equal to:

$$MRS\_{13} = \frac{\frac{\delta}{\delta + \gamma}}{\frac{\gamma}{\delta + \gamma}} \frac{x\_1^{\delta-1}}{x\_3^{\gamma-1}} = \frac{\delta}{\gamma} \frac{x\_1^{\delta-1}}{x\_3^{\gamma - 1}} $$

**The difficulty comes because of the next step** when we should **differentiate it by fraction** of $x\_3/x\_1$ and [math SE](https://math.stackexchange.com/questions/4661581/when-substitution-works-and-when-it-fails-differentiation) told me this is usually solved through substitution $z= x\_3/x\_1$, which means I should rewrite the variables as: $x\_1 (z) = x\_3/z$ and $x\_3 (z) = z x\_1$.

## So why is this approach not correct:

$$\frac{\partial MRS\_{13}}{\partial \frac{x\_3}{x\_1}} = \frac{\partial \left[\frac{\delta}{\gamma} \frac{x\_1^{\delta-1}}{x\_3^{\gamma - 1}} \right]}{\partial \frac{x\_3}{x\_1}} =
\frac{\delta}{\gamma} \frac{\partial \left[ (x\_1 (z) )^{\delta-1} \cdot (x\_3 (z))^{-(\gamma-1)} \right]}{\partial z} =
\frac{\delta}{\gamma} \left[ \frac{\partial (x\_1 (z) )^{\delta-1}}{\partial z} (x\_3 (z))^{-(\gamma-1)} + (x\_1 (z) )^{\delta-1} \frac{\partial (x\_3 (z))^{-(\gamma-1)}}{\partial z} \right] =
\frac{\delta}{\gamma} \left[ (\delta-1) (x\_1 (z) )^{\delta-2} \frac{\partial x\_1 (z)}{ \partial z} (x\_3 (z))^{-\gamma+1} + (x\_1 (z) )^{\delta-1} (-\gamma +1) (x\_3 (z))^{-\gamma} \frac{\partial x\_3 (z)}{\partial z} \right]$$

**Now substituing back** for $x\_1(z)$, $x\_3(z)$ and $z$, we get:

$$\frac{\partial MRS\_{13}}{\partial \frac{x\_3}{x\_1}} =
\frac{\delta}{\gamma} \left[ (\delta-1) \left( \frac{x\_3}{\frac{x\_3}{x\_1}} \right)^{\delta-2} \left( x\_1 \frac{x\_3}{x\_1}\right)^{-\gamma +1} \frac{\partial x\_1 (z)}{ \partial z} + \left( \frac{x\_3}{\frac{x\_3}{x\_1}} \right)^{\delta-1} (-\gamma + 1) \left( x\_1 \frac{x\_3}{x\_1} \right)^{-\gamma} \frac{\partial x\_3 (z)}{\partial z} \right]=
\frac{\delta}{\gamma} \left[ (\delta-1) ( x\_1)^{\delta-2} ( x\_3)^{-\gamma +1} \frac{\partial x\_1 (z)}{ \partial z} + (x\_1)^{\delta-1} (-\gamma + 1) (x\_3)^{-\gamma} \frac{\partial x\_3 (z)}{\partial z} \right]$$

**Now solving the interior derivatives** since I know that $\partial x\_3(z) / \partial z = \partial (x\_1 \cdot z )/ \partial z = x\_1$ etc... I should get:

$$\frac{\partial MRS\_{13}}{\partial \frac{x\_3}{x\_1}} =
\frac{\delta}{\gamma} \left[(\delta-1) ( x\_1)^{\delta-2} ( x\_3)^{-\gamma +1} (-1) \frac{x\_3}{\left( \frac{x\_3}{x\_1} \right)^2} + (x\_1)^{\delta-1} (-\gamma + 1) (x\_3)^{-\gamma} x\_1 \right] =
\frac{\delta}{\gamma} \left[ (-\delta +1) x\_1^\delta x\_3^{-\gamma} + x\_1^\delta x\_3^{-\gamma} (-\gamma + 1) \right] =
\frac{\delta}{\gamma} \frac{x\_1^\delta}{x\_3^\gamma} \left[ 2 - \gamma - \delta \right]$$

## I know it is not correct because I have simulated the results

**Tags:** microeconomics, mathematical-economics, elasticity-of-substitution

---

## 1 answers

### Answer by username_1 on 2023-03-28. Score: 3

I think that making the substitutions **you overlooked some dependence on $z=x\_3/x\_1$.** I mean, if you look at your calculations, you will find some $x\_3/x\_1$ which is not substituted by $z$.$^1$

By the way, in general, your method is correct, but cumbersome.

It is formally correct to write the substitution as $x\_1 (z) = x\_3/z$ and $x\_3 (z) = z x\_1$, but if you substitute them in the $MRS\_{13}$ as such, and then you differentiate using the chain rule for composite functions, you make your life harder when calculating the derivative.

Instead, just plug into the formula of $MRS\_{13}$ $x\_1 = x\_3/z$ and $x\_3 = z x\_1$, and treat $x\_1$ and $x\_3$, after the substitution, as constants.
But one must be careful to not forget some dependence on $z$.

The following are **my calculations for the derivative of $MRS\_{13}$** **with respect to $z=x\_3/x\_1$**.

**$MRS\_{13}$ is:**

$$MRS\_{13} = \frac{\delta}{\gamma} \frac{x\_1^{\delta-1}}{x\_3^{\gamma - 1}} \qquad (1)$$

In order to 'isolate' $z$, I write $(1)$ as:

$$MRS\_{13} = \frac{\delta}{\gamma} \frac{x\_1^{\delta-1+\gamma-1-\gamma+1}}{x\_3^{\gamma - 1}}== \frac{\delta}{\gamma} \frac{x\_1^{\gamma-1} }{x\_3^{\gamma - 1}} x\_1^{\delta -1-\gamma +1}=\frac{\delta}{\gamma}z^{1-\gamma} x\_1^{\delta-\gamma}\qquad (2)$$

**Differentiating with respect to $z$ and substituting back $x\_3/x\_1$ for $z$** I have:

$$\frac{\partial MRS\_{13}}{\partial z} = \frac{\delta}{\gamma} (1-\gamma) z^{-\gamma} x\_1 ^{\delta-\gamma}=\frac{\delta}{\gamma} (1-\gamma) (\frac {x\_1}{x\_3})^{\gamma} x\_1 ^{\delta-\gamma} =\frac{\delta}{\gamma}(1-\gamma)\frac {x\_1^\delta}{x\_3^\gamma}.\qquad (3)$$

---

$^1$ I tried to follow your method making the substitutions, I had the same result as you, but I realized that some dependence on $z$ had been forgotten, because in the formula remained some $x\_3/x\_1$ that was not substituted by $z$. This mistake was indicated to you also in the post you linked to Math.SE. I think that here there is a similar mistake during the substitutions.

> **Comments:**
> **username_0**: Thank you very much! However, are you sure your result would be the correct one? Because if we plug it into the formula for EoS, we would get constant EoS, which I know is not the case (I have found suitable demands for goods - very long and ugly formula - then found the optimum values and measured EoS - it was constant for $x_1$ and $x_2$ etc... but varying for $x_1$ and $x_3$ etc...). Moreover, this would indicate that EoS depends on one parameter, which is intuitivelly weird... I am actually not sure, to be honest, if we can ever treat it as constants after the substitution.  
> **username_1**: Are you sure that $MRS_{13}$ is correct? I didn't calculated it.  
> **username_1**: These are my calculations, maybe there is a mistake, but you don't have the correct result? You said that you simulated it, what does it mean? Did you find it on Wolfram Alpha or similar?  
> **username_1**: The problem is that I interpreted your derivative as a partial derivative, with other variables except $z$ fixed, so I treated $x_1$ as fixed. But now I realize tha it is not a partial derivative, is a derivative in one variable, $z$: $\frac {dMRS_ 13}{d(z)}$. In this case you are right, $x_1$ is not fixed, but one must use the chain rule. So I think that the symbol  of partial derivatives in $\sigma _{ij}$ is not the right symbol. Sorry for the misunderstanding, I was confused by the partial derivative.  
> **username_1**: There  was a comment to your questionon Math.SE  that noticed this fact of the partial derivative, by   @ Hans Lundmark, who I see  is a very high reputation user, so I think that this observation about the partial derivative is right. Sorry again for the misunderstanding.  
> **username_0**: I know I do not have the right result either. By simulation I mean, I have found Marshallian demands for all goods (this makes 8 possible relations between parameters, actually, so it is not completely free to move parameters as I would like to, but it still allows me to analyze the result). With the demands I was solving few problems for varying prices but constant parameters. Then I applied the OLS trick. There is also another trick: that for constant EoS, the OLS will be perfect fit for any combination of prices. For the utility function I have I see it is not the case, unfortunately.  
> **username_0**: Yeah... I have problems with distinction of these derivatives. You are right. If $x_3/x_1$ changes, each variable has to change as well, logically. Do I understand it well, that till the second step, my calculation would be correct (before solving derivatives)? That means that $d (x_3 (z))/dz \neq x_1$?  But wouldn't I get into infinite spiral then? Because $x_3 (z) = z  x_1(z) = z z^{-1} x_3(z)$ etc...? In this case? Shall I then write it just like $d x_3(z)$ and $d x_1 (z)$ and end my calculation there?  
> **username_1**: I find this issue slippery, and also the MathSE post left me doubtful, also about treating $x_1$ etc. as constants. The point is that it is not always possible to reduce the function(In our case $MRS_{13}$ )to a function of $z$ only, so that some other variable can appear, as $x_1$, and in this case actually it is a function of two variables, the derivative is actually a partial derivative and $x_1$ should be treated as constant. But this are hasty thougths, I need the time to think and make the calculations slowly.  I'm am very busy, but I will return to this question  as soon as possible.  
> **username_0**: I thought about this problem once again (well, more than once - and even that is an understatement). One option was that the operation when I put $\partial (x_j/x_i)$ under $MRS_{ij}$ was unfeasible... But that does not hold in this case as the utility function is invertible... So, I am intrigued by a different explanation... By assuming that both $x_i$ and $x_j$ are constants, we basically say that $z = x_j/x_i$ must be constant as well, right? Thus, $d z = 0$? And in that case, derivative would not make sense, because we want to investigate the effect of the variable's change?  

---

