# Hardcore elasticity of substitution (bad results)

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 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

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.

• Are you sure that $MRS_{13}$ is correct? I didn't calculated it. Mar 28 at 18:58
• 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? Mar 28 at 19:57
• 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. Mar 28 at 20:29
• 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. Mar 28 at 20:37
• 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? Mar 29 at 6:44