Damped pendulum equation Given the equation of a damped pendulum:
$$\frac{d^2\theta}{dt^2}+\frac{1}{2}\left(\frac{d\theta}{dt}\right)^2+\sin\theta=0$$
with the pendulum starting with $0$ velocity, apparently we can derive:
$$\frac{dt}{d\theta}=\frac{1}{\sqrt{\sqrt2\left[\cos\left(\frac{\pi}{4}+\theta\right)-e^{-(\theta+\phi)}\cos\left(\frac{\pi}{4}-\phi\right)\right]}}$$
where $\phi$ is the initial angle from the vertical. How can we derive that? Obviously $\frac{dt}{d\theta}$ is the reciprical of $\frac{d\theta}{dt}$, but I don't see how to deal with the second derivative.
I've found a similar derivation at https://en.wikipedia.org/wiki/Pendulum_(mathematics), where the formula
$${\frac {d\theta }{dt}}={\sqrt {{\frac {2g}{\ell }}(\cos \theta -\cos \theta _{0})}}$$
is derived in the "Energy derivation of Eq. 1" section. However, that uses a conservation of energy argument which is not applicable for a damped pendulum.
So how can I derive that equation?

HINT...Write $$\dot{\theta}=x$$
Then you have $$x\frac{dx}{d\theta}+\frac 12x^2+\sin\theta=0$$
This is a Bernoulli Differential Equation
