Assuming $p\neq-1$, find the solution $y=y(x)$ to the initial-value problem:
$$\frac{dy}{dx}= Ax^py$$ $$y(2)=1$$
in terms of $A$ and $p$.
So far I have, after rearranging the problem and integrating, came up with this equation:
$$\ln(y) = \frac{Ax^{p+1}}{p+1} + C$$ Simplifying it becomes: $$ y = e^{\frac{Ax^{p+1}}{p+1} + C}$$
In which case if you plugged in $y(2) = 1$, $\frac{Ax^{p+1}}{p+1} + C$ must $ = 0$. In which case C must be $=-\frac{Ax^{p+1}}{p+1}$ and the entire solution would be $$y = \frac{Ax^{p+1}}{p+1} -\frac{Ax^{p+1}}{p+1}$$
However this does not appear to be the correct answer. What am I doing wrong?
You have almost correctly solved the problem except the last step. $$\ln(y) = \frac{Ax^{p+1}}{p+1} + C$$
Plugging in the value $y(2) = 1$, we get $$\ln(1) = \frac{A\cdot2^{p+1}}{p+1} + C \implies C=-\frac{A\cdot(2)^{p+1}}{p+1}$$
So the required solution is $$\ln(y) = \frac{Ax^{p+1}}{p+1}-\frac{A\cdot2^{p+1}}{p+1}= \frac{A(x^{p+1}-2^{p+1})}{p+1}$$ $$\implies y=\exp\left[\frac{A(x^{p+1}-2^{p+1})}{p+1}\right]$$