Find derivative of $f(x)=(x+2)^{(x-1)}$ 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)
 A: Correct except for the second line,you must write $f'(x)=e^{(x-1)ln(x+2)}\cdot ((x-1)ln(x+2))'$ and not $f'(x)= (e^{{(x-1)ln(x+2)}})'((x-1)ln(x+2))'$
A: Ok, but it is a bit simpler by taking logs first
$\quad \begin{eqnarray} \log(f) \,&=&\  (x-1)\ \log(x+2)\\ \\
\Rightarrow\ \ \ \ \dfrac{f'}f\, &=&\, \dfrac{x-1}{x+2} + \log(x+2)\end{eqnarray}$
Now multiply through by $\,f\,$ to obtain $\,f'.$
Remark $\ $ This handy method is known as logarithmic differentiation. Similarly
$$\rm (abc\: \cdots\: f)'\: =\ \: abc\:\cdots f\:\ \bigg(\frac{a'}{a} + \frac{b'}{b} + \frac{c'}{c} +\:\cdots\:+ \frac{f\:'}{f}\bigg) $$
A: Assuming $x > -2$.
Take the log on both sides:
$$ ln(f(x)) = (x-1)\,ln(x-2)$$
Differentiate, by the chain rule we get
$$ \frac{f'(x)}{f(x)} = \frac{x-1}{x+2} + ln(x + 2)$$
Thus we get,
$$ f'(x) = (x+2)^{(x-1)}(\frac{x-1}{x-2} + ln(x + 2))$$
A: I checked your answer on Wolfram Alpha, and it is correct: 
Their solution: 
http://www.wolframalpha.com/input/?i=derivative+of+%28x%2B2%29%5E%28x-1%29
They wrote the answer differently, but the following evaluates that it is the same as yours:
http://www.wolframalpha.com/input/?i=%282+%2B+x%29%5E%28-2+%2B+x%29+%28-1+%2B+x+%2B+%282+%2B+x%29+Log%5B2+%2B+x%5D%29+%3D+%28x%2B2%29%5E%28x-1%29%28ln%28x%2B2%29+%2B+%28x-1%29%2F%28x%2B2%29+%29 . 
