Let's say I have a simple problem like this:
$$ \frac{d}{dx}[2^x] $$
I would apply the exponent rule and work it like this:
$$ \frac{d}{dx}[2^x] $$
$$ =x\cdot 2^{x-1} $$
**I don't know how to simplify that further so I will leave it as is. If anyone knows, just comment.
But the real answer turns out to be $\ln(2)\cdot 2x$. How is this worked out and how can I apply this rule to complex problems like:
$$ \frac{d}{dx}[(2x+4)^{x+1}] $$
I want to know the following:
- How to use this $\ln(x)$ rule?
- When to use this rule?
- Why you can't use the standard exponent rule?
5 Answers
$\begingroup$I think that you are confusing the rules. The rule you are misquoting is$$\frac{d}{dx} x^a =ax^{a-1}$$(Note that $x$ is not in the exponent). To calculate the derivative of $a^x$ we will use the special property of $e$. More precisely, we have:$$\begin{align}\frac{d}{dx}a^x&=\frac{d}{dx} e^{x\ln a}\\[1ex]&=e^{x\ln a}\left(\dfrac{d}{dx}x\ln a\right)\\[1ex]&=e^{x\ln a}\ln a\\[1ex]&=a^x \ln a\end{align}$$
So for the more complex example, we have:$$\begin{align} \frac{d}{dx}[(2x+4)^{x+1}] &= \frac{d}{dx} e^{(x+1)\ln(2x+4)}\\[1ex]&= \left(\frac{d}{dx}((x+1)\ln(2x+4))\right)e^{(x+1)\ln(2x+4)}\\[1ex]&=\left(\ln(2x+4) +\frac{x+1}{2x+4}\right)e^{(x+1)\ln(2x+4)}\\[1ex]&=\left(\ln(2x+4)+\frac{1}{2}\frac{x+1}{x+2}\right)(2x+4)^{x+1} \end{align}$$
If you want a more general rule we can write:$$\begin{align}\frac{d}{dx} f(x)^{g(x)}&=\frac{d}{dx}e^{g(x)\ln(f(x))}\\[1ex]&=\left(g'(x)\ln(f(x))+g(x)\frac{1}{f(x)}\right)e^{g(x)\ln(f(x))}\\[1ex]&=\left(g'(x)\ln(f(x))+g(x)\frac{1}{f(x)}\right) f(x)^{g(x)}\end{align}$$
Hope that helps.
$\endgroup$ 3 $\begingroup$The "exponent rule" is for $\frac{d}{dx} x^a$ not $\frac{d}{dx} a^x$
To handle $a^x$, note $a^x=e^{x \ln(a)}$ and use the "chain rule" and $\frac{d}{dx} e^x=e^x $ so $$\frac{d}{dx} a^x = \frac{d}{dx} e^{x \ln(a)} = \ln(a) e^{x \ln(a)} =\ln(a) \,a^x$$
$\endgroup$ 1 $\begingroup$The derivative of $2^x$ is $\ln(2)2^x$, because $2^x$ is an exponential function.
Now when dealing with an exponential function of the form $y=a^x$, you can write $a = e^{ln(a)}$, so we can write $a^x = e^{x\ln(a)}$. Then using the chain rule you get $ a^x\ln(a)$.
For your example:
$$\frac{d}{dx} (2x+4)^{x+1}$$
And from the exponent rule we know
$$e^{(x+1)\ln(2x+4)}=(2x+4)^{x+1}$$
Then apply the chain rule
$$e^{(x+1)\ln(2x+4)}\frac{d}{dx}(x+1)\ln(2x+4)$$
Using the product rule, this gives
$$e^{(x+1)\ln(2x+4)}(\ln(2x+4)+\frac{x+1}{x+2})$$
And we saw that
$$e^{(x+1)\ln(2x+4)} = (2x+4)^{x+1}$$
So this ends up in
$$(\ln(2x+4)+\frac{x+1}{x+2})(2x+4)^{x+1}$$
You often, with more complex functions, need to use several rules. Just learn all the rules by heart and the rest is just practice, practice, practice, ...
$\endgroup$ $\begingroup$The rules for $x^a$ and $a^x$ only work when $a$ is NOT a function of $x$. If $a$ is a function of $x$, then we exponentiate, like for example in the case of $(2x+4)^{x+1}$:
We rewrite it as $e^{\ln{((2x+4)^{x+1}})}=e^{(x+1)\ln(2x+4)}$. To differentiate this, we use the rule for the exponential, so the derivative is $e^{(x+1)\ln(2x+4)}((x+1)\ln(2x+4))\prime$, which, by the product rule for the derivative, becomes $e^{(x+1)\ln(2x+4)}((x+1)\prime\ln(2x+4)+(x+1)\ln(2x+4)\prime)=e^{(x+1)\ln(2x+4)}(\ln(2x+4)+(x+1)\cdot\frac{2}{2x+4})=(e^{\ln(2x+4)})^{x+1} (\ln(2x+4)+(x+1)\cdot\frac{2}{2x+4})=(2x+4)^{x+1}(\ln(2x+4)+\frac{x+1}{x+2}$.
$\endgroup$ $\begingroup$You seem to be confusing two different rules: if $f(x)=x^a$, then $f'(x)=ax^{a-1}$; however, if $f(x)=a^x$, then $f'(x)=a^x \cdot \ln(a)$. This is because if $f(x)=e^x$, then by definition, $f'(x)=e^x$, and if $f(x)=a^x$, then we can rewrite $f(x)$ as $e^{x\ln(a)}$ and use the chain rule and product rule to obtain $f'(x)=e^{x\ln(a)} \cdot \ln(a)=a^x\cdot\ln(a)$. You can't apply the standard exponent rule because the function $x\mapsto 2^x$ has a constant base and a variable exponent, not a variable base and constant exponent. Every time you have a function of the form $x\mapsto a^x$, you should use the "$\ln(x)$ rule".
If $f(x)=g(x)^{h(x)}$, then things become even trickier: now, both the base and the exponent are variable. To get around this, you should rewrite $f(x)$ as $e^{h(x)\cdot \ln(g(x))}$. In the rewritten form, only the exponent is variable, and so we can use the "$\ln(x)$ rule", along with the chain and product rule. Let $y=e^{h(x) \cdot \ln(g(x))}$ and $u=h(x) \cdot \ln(g(x))$. Then,\begin{align} \frac{dy}{dx}&=\frac{dy}{du} \cdot \frac{du}{dx} \\[5pt] &=e^u \cdot \frac{d}{dx}\bigl(h(x) \cdot \ln(g(x))\bigr) \\[5pt] &= e^{h(x)\cdot \ln(g(x))} \cdot \left(h'(x)\ln(g(x))+h(x)\frac{h'(x)}{g(x)}\right) \\[5pt] &= g(x)^{h(x)} \cdot \left(h'(x)\ln(g(x))+h(x)\frac{h'(x)}{g(x)}\right) \, . \end{align}In the case $g(x)=2x+4$ and $h(x)=x+1$, this becomes$$ \frac{dy}{dx}=(2x+4)^{x+1} \cdot \left(\ln(2x+4)+\frac{x+1}{2x+4}\right) $$
$\endgroup$