# Taking derivative of $\exp\bigg(\frac{-x^2}{2 C}\bigg)$ with respect to $x^2$

I am asked to take the derivative:

$$\frac{\partial}{\partial x^2} \exp\bigg(\frac{-x^2}{2 C}\bigg)$$

I am told it gives

$$\bigg(-\frac{1}{C}+\frac{x^2}{C^2}\bigg)\cdot \exp\bigg(\frac{-x^2}{2 C}\bigg)$$

I guess I kind of see the first term coming around, as just seeing $-x^2$ as $-x$ but I am not quite sure why the second term appears or what the general method to tackle such a problem is. Any help is highly appreciated :)

Edit: The solution is that it is simply a second derivative, as follows: $$\frac{\partial^2}{\partial x^2} \exp\bigg(\frac{-x^2}{2 C}\bigg)$$

• This is most likely a second derivative. Commented Jul 28, 2018 at 17:09
• Ah, yes it clearly is because that gives exactly that. Just sloppy/weird notation :) thanks Commented Jul 28, 2018 at 17:12
• Maybe a typo? $$\frac{\partial\color{red}{^2}}{\partial x^2} \exp\left(-\frac{x^2}{2C} \right)$$ Commented Jul 28, 2018 at 17:14
• highly likely :) Commented Jul 28, 2018 at 17:16
• You are missing the exponential term in the solution, aren't you? Commented Jul 28, 2018 at 17:28

It seems that the second derivative has been calculated. The first derivative is

$$\frac{\partial }{\partial x}\exp\left( -\frac{x^2}{2c} \right)=-\frac{2x}{2c}\cdot \exp\left( -\frac{x^2}{2c} \right)$$

Just calculate the derivative of $-\frac{x^2}{2c}$ w.r.t. $x$ and put it in front of the exponential function. The general rule is:

If $f(x)=e^{g(x)}$ it follows that $f'(x)=g'(x)\cdot e^{g(x)}$

To obtain the second derivative you have to use the product rule, where $u(x)=-\frac{2x}{2c}$ and $v(x)=\exp\left( -\frac{x^2}{2c} \right)$. The product rule is

$$\left( u(x)\cdot v(x) \right)^{'}=u'(x)\cdot v(x)+u(x)\cdot v'(x)$$

Can you proceed? The result is not what you have posted in the question. The exponential term is missing.

• Yea, it is quite clear when considering it a second derivative and it is true - the exponential term is missing :) Ill correct it. Thanks Commented Jul 28, 2018 at 17:50
• @user469216 You´re welcome. Commented Jul 28, 2018 at 17:54

Using logarithmic differentiation helps$$f=e^{-\frac{x^2}{2 c}} \implies\log(f)=-\frac{x^2}{2 c}$$ Differentiate both sides $$\frac{f'}f=-\frac x c\implies f'=-\frac x c\,f$$ Now, product rule $$f'=-\frac x c\,f\implies f''=-\frac 1{c}(f+xf')=-\frac 1{c}\left(f-x\frac x c\,f\right)=-\frac 1{c}\left(1-\frac {x^2} c\right)f$$