<s>[INST] Differentiation using Chain Rule Find $\frac{dy}{dx}$ if $y=7+5^{x^2+2x-1}$.
So far I have done $\frac{dy}{dx}=(5^{x^2+2x-1})'$. Now, the RHS can be found by $(e^{\ln 5\cdot (x^2+2x-1)})'=e^{\ln 5\cdot (x^2+2x-1)}(x^2+2x-1)'\ln 5=5^{x^2+2x-1}(2x+2)\ln 5$.
However, my textbook says the answer is $(2x^3+6x^2+2x-2)(5^{x^2+2x-1})$. Where did I go wrong? Thanks.
 [/INST] Your work is correct
$$\frac { d\left( 7+5^{ x^{ 2 }+2x-1 } \right)  }{ dx } =\frac { d\left( 7 \right)  }{ dx } +\frac { d\left( 5^{ x^{ 2 }+2x-1 } \right)  }{ dx } =0+\left( 5^{ x^{ 2 }+2x-1 } \right) \ln { 5 } \frac { d\left( x^{ 2 }+2x-1 \right)  }{ dx } =\\ =\left( 5^{ x^{ 2 }+2x-1 } \right) \ln { 5 } \left( 2x+2 \right) \\ $$
</s>