# Use logarithmic differentiation to find the derivative of $y = (1 +\frac1x)^{2x}$

Can someone guide me through solving this problem? $$\dfrac{\mathrm d}{\mathrm dx}\left(1 +\dfrac1x\right)^{2x}$$

Let $$y=\left(1 +\dfrac1x\right)^{2x}$$ then $$\ln y=2x\ln\left(1 +\dfrac1x\right).$$ Thus \begin{align} \frac{d}{dx}\ln y&=\frac{d}{dx}2x\ln\left(1 +\frac1x\right)\\ \frac1y\frac{dy}{dx}&=2\ln\left(1 +\frac1x\right)+\frac{2x}{1 +\frac1x}\cdot\left(-\frac1{x^2}\right)\\ &=2\ln\left(1 +\frac1x\right)-\frac{2}{x +1}\\ \frac{dy}{dx}&=y\left(2\ln\left(1 +\frac1x\right)-\frac{2}{x +1}\right)\\ &=\left(1 +\dfrac1x\right)^{2x}\left(2\ln\left(1 +\frac1x\right)-\frac{2}{x +1}\right).\\ \end{align}
$(u^v)^\prime = (e^{v\ln u})^\prime = e^{v\ln u}\cdot(v \ln u)^\prime=u^v\cdot(v^\prime\ln u+v\cdot\frac{u^\prime}{u})$
Take logs on both sides and differentiate, \begin{align} y &=\left(1+\frac{1}{x}\right)^{2x}\\ \ln y &=2x \ln \left(1+\frac{1}{x}\right)\\ \frac{\frac{dy}{dx}}{ y} &=2 \ln \left(1+\frac{1}{x}\right)-2 x\frac{\frac{1}{x^2}}{1+\frac{1}{x}} \\ \frac{dy}{dx} &=2 y\ln \left(1+\frac{1}{x}\right)-2 yx\frac{\frac{1}{x^2}}{1+\frac{1}{x}} \end{align} and you can substitute in for $y$ and simplify.
Taking the log of both sides results in $$\ln y = 2x\ln\left(1+\frac{1}{x}\right)$$ Differentiating this leads to $$\frac{1}{y}\frac{dy}{dx}=2\ln\left(1+\frac{1}{x}\right)+2x\left(\frac{-1}{x^2}\frac{x}{x+1}\right)=2\ln\left(1+\frac{1}{x}\right)-\frac{2}{x+1}$$ where, for the right hand side, we used both the product rule and the fact that $\large\frac{d}{dx}\log f(x)=\frac{f'(x)}{f(x)}$
This leads to $$\frac{dy}{dx}=2y\left[\ln\left(1+\frac{1}{x}\right)-\frac{1}{x+1}\right]$$ Expressing $y$ in terms of $x$ on the right hand side of the equation leads to:- $$\frac{dy}{dx}=2\left(1+\frac{1}{x}\right)^{2x}\left[\ln\left(1+\frac{1}{x}\right)-\frac{1}{x+1}\right]$$