Exact Solution of Second Order Non-Linear Differential Equation I have problem with solution of differential equation on non-topological soliton $$\frac{d^2\phi(x)}{dx^2}+(w^2-\mu^2)\phi(x)+\phi(x)^2-a\phi(x)^3=0$$
I get some information that the ansatz for solving this differential equation $$\phi(x)^n=\frac{a}{b+c\cosh{Dx}}$$ but I don't know how to use this ansatz specially finding the constants $a,b,c,d,n$ or what is method using this ansatz?
Thank you
 A: This equation begs us to consider the inverse function $x(\phi)$ instead.
Rewriting the equation as:
$$\frac{d^2\phi}{dx^2}+f(\phi)=0$$
And using the inverse function relation:
$$\frac{d^2\phi}{dx^2}=-\left(\frac{d \phi}{dx} \right)^3 \frac{d^2x}{d \phi^2}=-\frac{x''}{x'^3}$$
We obtain:
$$x''-f(\phi) x'^3=0$$
Introducing a new function:
$$u(\phi)=x'$$
We can write:
$$u'-f(\phi) u^3=0$$
Inegrating:
$$-\frac{1}{2 u^2}=\int f(\phi) d\phi+C_1= \\ =\int \left((w^2-\mu^2)\phi+\phi^2-a\phi^3 \right) d\phi+C_1=\frac{w^2-\mu^2}{2} \phi^2+\frac{\phi^3}{3}-\frac{a}{4}\phi^4 +C_1$$
Or:
$$u^2=-\frac{1}{C_1+(w^2-\mu^2) \phi^2+\frac{2}{3} \phi^3 - \frac{a}{2} \phi^4}$$

$$u= \pm \frac{1}{\sqrt{C_1-(w^2-\mu^2) \phi^2-\frac{2}{3} \phi^3 + \frac{a}{2} \phi^4}}$$

Integrating a second time, we obtain:

$$x(\phi)= \pm \int \frac{d\phi}{\sqrt{C_1-(w^2-\mu^2) \phi^2-\frac{2}{3} \phi^3 + \frac{a}{2} \phi^4}}+C_2$$

I believe we can find the exact form of this antiderivative in terms of elementary or simple special functions (like elliptic integrals), but I will leave it for later. In any case the above represents the exact implicit solution of the original ODE.

Not sure about the ansatz, I may check it out later, but this is how I would approach such an equation if I wasn't given any additional information.
