# Math Help - exponential function derivative

1. ## exponential function derivative

Can anyone help me find the derivative of y=2^|x|?

2. Originally Posted by nejikun
Can anyone help me find the derivative of y=2^|x|?
If $f(x) = a^x$ then $f'(x) = a^xln(a)$

Spoiler:
Take the log of both sides:

$ln(y) = ln(2^{|x|}) = |x|ln(2)$

Differentiate both sides:

$\frac{1}{y} \cdot \frac{dy}{dx} = ln(2)$

Isolate dy/dx:

$\frac{dy}{dx} = yln(2) = 2^{|x|}ln(2)$

3. Originally Posted by nejikun
Can anyone help me find the derivative of y=2^|x|?
Hi nejikun.

$y\ =\ 2^{|x|}\ =\ e^{(\ln2)|x|}\ =\ e^u$ where $u=(\ln2)|x|$

So, using the chain rule, $\frac{dy}{dx}\ =\ \frac{dy}{du}\,\frac{du}{dx}\ =\ e^u\cdot(\ln2)\frac{|x|}x\ =\ \frac{(\ln2)|x|}x2^{|x|}.$

Note that $\frac{d\left(|x|\right)}{dx}=\frac{|x|}x.$

4. Originally Posted by e^(i*pi)
$ln(y) = ln(2^{|x|}) = |x|ln(2)$

Differentiate both sides:

$\frac{1}{y} \cdot \frac{dy}{dx} = ln(2)$
The derivative of $|x|$ is 1 if $x>0$ and $-1$ if $x<0;$ i.e. $\frac{d(|x|)}{dx}=\frac{|x|}x.$