I am currently re-learning high school/university calculus for a project that I am working on. I know that the derivitive of the above function is as shown below: $$ -2 \cdot x \cdot e^{-x^2} $$
I can get at this solution using the chain rule: $$ g(x) = f(h(x) $$ $$ g^{'}(x) = f^{'}(h(x)) \cdot h^{'}(x) $$
However, when I write $ e^{-x^2} $ as $$ \frac{1}{e^{x^2}} $$
and then apply the quotient rule, I get the following:
$$ g(x) = \frac{f(x)}{h(x)} $$ $$ g^{'}(x) = f^{'}(x) \cdot h(x) - f(x) \cdot h^{'}(x) $$
Apply this to my fraction I get: $$ 0 \cdot e^{x^2} - e^{x^2} \cdot 2 \cdot x $$ which is $$ -2 \cdot x \cdot e^{x^2} $$
which is not the correct solution.
Am I missing something here? Any help would be appreciated.
Note that the quotient rule is
$$g(x) = \frac{f(x)}{h(x)}\implies g^{'}(x) = \frac{f^{'}(x)\cdot h(x) - f(x)\cdot h^{'}(x)}{[h(x)]^2} $$
and since $f(x)=1$ and $f'(x)=0$ we have
$$g^{'}(x) = -\frac{h^{'}(x)}{[h(x)]^2}$$