Ok, struggling with this one for a bit, not too sure where I'm going wrong so can anyone give me a few pointers please...
If we have
$$ A(x) = p(x)\exp\left(i\alpha\left(x\right) \right) $$
where $ p $ and $ x $ and real. We also have
$$ \begin{align} & \frac{dp}{dx} = \frac{1}{2}p - \frac{1}{2}p^3 \\ & \frac{d\alpha}{dx} = 0 \end{align} $$
Now, obviously $ \alpha\left( x\right) = constant $, lets say $ a $.
The issue I have is that I have a given answer that is:
$$ p\left(x\right) = (1 + b\exp(-x))^{-\frac{1}{2}} $$
Where $ b $ is an arbitrary constant.
Now, here is my attempt at finding $ p $ ...
$$ \begin{align} & \frac{dp}{dx} = \frac{1}{2}p - \frac{1}{2}p^3 \\ & \frac{dp}{dx} = \frac{1}{2}\left(p - p^3 \right) \\ & \frac{dp}{\left(p - p^3 \right)} = \frac{1}{2}dx \\ \end{align} $$
Integrate both sides...
$$ \begin{align} & \int \frac{dp}{\left(p - p^3 \right)} = \int \frac{1}{2}dx \\ & \int \frac{dp}{\left(p - p^3 \right)} = \frac{1}{2}x + C \\ & \log(p) - \frac{1}{2}\log\left(1 - p^2\right) = \frac{1}{2}x + C \\ & 2\log(p) - \log\left(1 - p^2\right) = x + C \\ & 2p^2 - 1 = \exp(x) + C \\ & 2p^2 = \exp(x) + C \\ & p^2 = \frac{1}{2}\exp(x) + C \\ & p = \sqrt{\frac{1}{2}\exp(x)} + C \end{align} $$
Which is obviously not correct. My question is, does anyone have any pointers as to where I'm going wrong?
Thankyou for your time.