# Thread: Show how this derivative is computed

1. ## Show how this derivative is computed

Good morning all, I am following a book which covers aspects of astronomy/cosmology, I'd like to know how the part in the middle is worked out. I have the start and end of the derivation but its quite scant on how it proceeds from point to point, the book simply says using the chain rule "this" becomes "this", basically.

∂ρ/∂z

Where the solution for $\displaystyle \rho$ is:

$\displaystyle \rho (z) = \rho exp (-z^2/2H^2)$

The result is:

$\displaystyle (-z/H^2) \rho$

This is simply for myself and trying to understand how the calculations are derived.

Rod.

2. Looks to me like you have copied incorrectly- you should not have that $\displaystyle \rho$ on the right side of the equation defining the function $\displaystyle \rho(z)$.

If $\displaystyle \rho(z)= e^{-z^2/(2H^2)}= exp(-z^2/(2H^2))$ then we use the chain rule:
Letting $\displaystyle u= -z^2/(2H^2)$, $\displaystyle \rho= e^{u}$.

Then $\displaystyle \frac{d\rho}{du}= e^{u}= \rho$ and $\displaystyle \frac{du}{dz}= -2z/(2H^2)= -z/H^2$

By the chain rule then
$\displaystyle \frac{d\rho}{dz}= \frac{d\rho}{du}\frac{du}{dz}= (-z/H^2)\rho(z)$

3. Originally Posted by HallsofIvy
Looks to me like you have copied incorrectly- you should not have that $\displaystyle \rho$ on the right side of the equation defining the function $\displaystyle \rho(z)$.
It could probably be my copying, forgive an old man I am not well adjusted to using the symbol format on the forum. When I retired so it seems did my eyesight and finger control.

I'll try and be more accurate:

∂ρ/∂z

Where the solution for $\displaystyle \rho (z)$ is:

$\displaystyle \rho (z) = \rho{}_{c} exp(-z^2/2H^2)$

Then it jumps to:

∂ρ/∂z = $\displaystyle (-2z/2H^2)\rho{}_{c} exp(-z^2/2H^2) = (-z/H^2) \rho$

4. OK, after a few more hours and using what HallsofIvy kindly replied with as a start I am still not sure how to derive this:

$\displaystyle \rho (z) = \rho{}_{c} exp(-z^2/2H^2)$

Then it jumps to:

∂ρ/∂z = $\displaystyle (-2z/2H^2)\rho{}_{c} exp(-z^2/2H^2) = (-z/H^2) \rho$

5. Originally Posted by RodBrown
OK, after a few more hours and using what HallsofIvy kindly replied with as a start I am still not sure how to derive this:

$\displaystyle \rho (z) = \rho{}_{c} exp(-z^2/2H^2)$

Then it jumps to:

∂ρ/∂z = $\displaystyle (-2z/2H^2)\rho{}_{c} exp(-z^2/2H^2) = (-z/H^2) \rho$
Writing $\displaystyle u= -z^2/H^2$ we have [tex]\rho(u)= \rho_ce^{u}[/itex] so the $\displaystyle \frac{d\rho}{du}= \rho_ce^u$
Do you understand that? It is simply asserting that the derivative of the exponential is the exponential and is a defining property of the exponential.

Also $\displaystyle \frac{du}{dz}= -2z/H^2$. That is just using the fact that the derivative of z squared is 2z.

Then, by the chain rule
$\displaystyle \frac{d\rho}{dz}= \frac{d\rho}{du}\frac{du}{dz}= \left(\rho_ze^{u}\right)\left(-2z/H^2\right)$
but that first parentheses is $\displaystyle \rho(z)$ so that
$\displaystyle \frac{d\rho}{dz}= (-2z/H^2)\rho(z)$