Find derivative of $f(x)=(x+2)^{(x-1)}$
What I did: $$f(x)=(x+2)^{(x-1)}= e^{{\ln(x+2)}^{(x-1)}}= e^{{(x-1)\ln(x+2)}}$$ $$f'(x)= e^{{(x-1)\ln(x+2)}}((x-1)\ln(x+2))'$$ $$f'(x)= e^{{\ln(x+2)}^{(x-1)}}(1\cdot \ln(x+2)+(x-1)\cdot (\frac {1}{x+2}))$$ ~so the solution is: $$f'(x)= (x+2)^{(x-1)}( \ln(x+2)+\frac {x-1}{x+2})$$
Is this correct? (I got the right solution, but I've seen people solve this with $f′(x)=f(x)\frac {d}{dx}(\ln(f(x))$ (?!), and I've never used or seen this formula)