I have a question about negative powers in implicit differentiation.
I was asked to differentiate the equation
$$y = 2^x + 2^{-x}$$
Now, from previous studies, I can prove the following:
$y = a^x$
$\ln y = \ln a^x = x \ln a$
$\frac{1}{y} \frac{dy}{dx} = \ln a$
$\frac{dy}{dx} = y \ln a = a^x \ln a$
hence differentiating $y = a^x$ results as $\frac{dy}{dx} = a^x \ln a$.
Using the above information, I attempted to differentiate the equation above via implicit differentiation:
$$\frac{dy}{dx} = 2^x \ln 2 + 2^{-x} \ln 2$$
However, apparently, my solution is incorrect. Instead, it is
$$\frac{dy}{dx} = 2^x \ln 2 - 2^{-x} \ln 2$$
I'm confused. Why is my solution wrong?
$y = a^{-x}$
$\ln y = \ln a^{-x} = -x \ln a$
$\frac{1}{y} \frac{dy}{dx} = -\ln a$
$\frac{dy}{dx} =- y \ln a = -a^{-x} \ln a$
hence when differentiating $y = a^{-x}$ results as $\frac{dy}{dx} = -a^{-x} \ln a$.
credit - @MANMAID, @smurf