# Separable? Differential Equation

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?

• Asterisk is confusing, get rid of it. Your mistake is that the LHS on final fourth equation should be $2\ln(p) - \ln(1-p^2) = \ln(\frac{p^2}{1-p^2})$. – Chee Han Feb 27 '17 at 22:41
• Are you sure that integral is $log(1 - p^2)$? I have questions – victoria Feb 28 '17 at 0:02
OK for $\quad 2\log(p) - \log\left(1 - p^2\right) = x + C$
The mistake is in $\quad 2p^2 - 1 = \exp(x) + C\quad$ which should be :
$$\frac{p^2}{1-p^2}=c\:e^x$$ Solving for p : $$p^2=\frac{c\:e^{x}}{c\:e^x+1}$$ $$p=\frac{1}{\sqrt{1+b\:e^{-x}}}$$ where $b=1/c$