Initial-value problem $y' = Ax^py$ with initial condition $y(2)=1$ 
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?
 A: 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]$$
A: $$y'(x)=\text{A}x^\text{p}y(x)\Longleftrightarrow\int\frac{y'(x)}{y(x)}\space\text{d}x=\text{A}\int x^\text{p}\space\text{d}x$$
Now, use:


*

*Substitute $u=y(x)$ and $\text{d}u=y'(x)\space\text{d}x$:
$$\int\frac{y'(x)}{y(x)}\space\text{d}x=\int\frac{1}{u}\space\text{d}x=\ln\left|u\right|+\text{C}=\ln\left|y(x)\right|+\text{C}$$

*$$\int x^\text{p}\space\text{d}x=\frac{x^{1+\text{p}}}{1+\text{p}}+\text{C}$$


So, we get:
$$\ln\left|y(x)\right|=\frac{\text{A}x^{1+\text{p}}}{1+\text{p}}+\text{C}$$
So, to solve $\text{C}$ use $y(2)=1$:
$$\ln\left|1\right|=\frac{\text{A}\cdot2^{1+\text{p}}}{1+\text{p}}+\text{C}\Longleftrightarrow\text{C}=-\frac{\text{A}\cdot2^{1+\text{p}}}{1+\text{p}}$$
So:
$$\ln\left|y(x)\right|=\text{A}\cdot\left(\frac{x^{1+\text{p}}}{1+\text{p}}-\frac{2^{1+\text{p}}}{1+\text{p}}\right)$$
A: Separate and integrate as usual:
$$
\frac{dy}{dx}=Ax^p\Rightarrow \frac{dy}{y}=Ax^pdx\Rightarrow \ln(y)=A\frac{x^{p+1}}{p+1}+C_0\Rightarrow y(x)=C_1e^{A\frac{x^{p+1}}{p+1}}
$$
Then plug in initial conditions to find $C_1$
$$
y(2)=1=C_1e^{A\frac{2^{p+1}}{p+1}}\Rightarrow C_1=e^{-A\frac{2^{p+1}}{p+1}}
$$
And you have your unique solution in terms of the parameters.
