When differentiating an exponential is it better to convert to $e$ form first?

79 Views Asked by At

Taking the simplest case: $$y=2^x$$

If I want to differentiate this I could do: $$y=2^x$$ $$\ln y=\ln 2^x=x\ln2$$ $$\frac{1}{y}\frac{dy}{dx}=\ln2$$ $$\frac{dy}{dx}=y\ln2=2^x \ln2$$

Or I could convert the $2^x$ to $e$ form first and then differentiate:

$$y=2^x=e^{kx}$$ $$\ln2^x=\ln e^{kx}$$ $$x\ln2=kx$$ $$k=\ln2$$ $$y=2^x=e^{kx}=e^{x\ln2}$$ $$\frac{dy}{dx}=e^{x\ln2}(\ln2)=2^x \ln2$$

Both methods work fine for this example, but for more complex situations, which method tends to be a simpler approach?

2

There are 2 best solutions below

4
On BEST ANSWER

Making the problem more general, when you face an expression which is a combination of products, quotients, powers, expoentials, logarithmic differentiation helps a lot.

Just as an example, consider $$y=\frac{P^a(x)}{Q^b(x)}\,e^{R(x)}$$ where $P,Q,R$ are functions of any kind.

Take logarithms making $$\log(y)=a\log(P(x))-b\log(Q(x))+R(x)$$ Differentiate $$\frac 1y\frac{dy}{dx}=a \frac{P'(x)}{P(x)}-b\frac{Q'(x)}{Q(x)}+R'(x)$$ Now, just as you did, write $$\frac{dy}{dx}=y \left(\frac 1y\frac{dy}{dx} \right)$$ ans simplify as much as you can.

When you think about it, this is almost the cheapest way to code the derivative.

1
On

In general, when dealing with exponentials with a constant base (eg $2^x$ etc) it will be easier to just use the known formula. If you have to derive the derivative algebraically then the choice, for these types, is very much up to you (although note that logarithmic differentiation is shorter when written out in full here).

The utility of converting to the $e$ form becomes clear when you are dealing with exponentials without a constant base, for example $x^{x^x}$. In general, with an equation of this form ($x^{f(x)}$), it will be easier to convert to $e$ form ($e^{f(x)\ln{x}}$), which works because: $$e^{f(x) \ln{x}} = \left(e^{\ln{x}}\right)^{f(x)} = x^{f(x)},$$ as the result now follows from the chain rule: $$\frac{d}{dx}(e^{f(x)\ln{x}}) = e^{g(x)}g'(x) $$ Where $g(x)=f(x)\ln{x}$.

Of course these equations could also be differentiated logarithmically (because you are essentially doing the same thing), however it quickly becomes cumbersome and harder to follow when more powers are added.

Hope this helps!