In the modeling of the oscillation of a meniscus in a straw, the following non-linear ODE was derived.
$$y'' = 1/y - 1$$
$y$ is a dimensionless displacement that is solely a function of time. The initial condition are $$dy/dt = 0$$ and we can choose the initial position, say $y_0 = 2$.
I know I can do the substitution $dy/dt = v$ and get $v$ as a function of $y$. But I would like to get $y$ as a function of $t$.
Of course if we linearize the equation around $y = 1$ and use small initial displacement, we get sinusoidal oscillation. But a full solution would be wonderful.
This seems like such a simple fundamental equation, I can believe it has not come up in other context. I can't find any information for this equation on-line.
Thx.
There is a lot of literature on conservative nonlinear oscillators, but I haven't seen this particular oscillator receiving special treatment. It resembles undriven, undamped Duffing oscillator, but is worse... and considering that Duffing already requires elliptic functions, I would not expect any reasonable analytic solution here. Even if you found a solution as an enormous formula with obscure generalizations of elliptic functions, you'd probably ask for approximation next. Why not do it from the beginning? For example, $$y(t)=1.394+0.751\frac{\cos(0.975 t)}{1+0.24\cos(0.975t)} \tag1$$ looks pretty good compared to the numerical solution of the IVP $$y''=\frac{1}{y}-1,\quad y(0)=2,\ y'(0)=0 \tag2$$
Above, (1) is in blue, (2) is in red. Think of the simplifying assumptions in your model; chances are they introduce a larger error than this.
Here is how I found (1). The starting point is the energy conservation $$E=\frac12 (y')^2+y-\ln y-2+\ln 2\equiv 0 \tag3$$ Setting $y'=0$ in (3), we find the minimal value of $y$: $$y_{\min}=-W(-2/e^2) \tag4$$ where $W$ is Lambert W. The time it takes for $y$ to go from maximum $y=2$ to minimum $y_{\min}$ is the half-period $$\frac{T}{2}=\int_{y_{\min}}^2 (2(2-y+\ln y-\ln 2))^{-1/2}\,dy$$ This I integrated numerically and obtained the angular frequency $\omega=2\pi/T=0.9749234\dots$
At first I tried to look for the Fourier series $$y=a_0+a_1\cos \omega t+ a_2\cos 2\omega t+\dots$$ Here $a_0=\frac12(2+y_{\min})$, but the determination of other coefficients is tricky. This paper describes an approximate method, but I was disappointed by its performance on this equation.
Then again, why should I look for a (trigonometric) polynomial when the equation involves a rational function? It's more natural to look for $y$ as a rational function of $\cos \omega t$. The simplest form is $$y=a+\frac{b\cos \omega t}{1+c\cos \omega t} \tag5$$ Equating $y(0)=2$ and $y(\pi/\omega)=y_{\min}$ yields $$a=1+c+(1-c)\frac{y_{\min}}2,\quad b=1-c^2 -(1-c^2)\frac{y_{\min}}2\tag6$$
It remains to choose $c$. At first I tried to plug $y$ into total energy $E$ (which is supposed to be identically $0$) and equate the result to $0$ at $t=\pi/(2\omega)$, which is the quarter-period $T/4$. (We already know that $E=0$ at $t=0$ and $t=T/2$.) The result did not look good, it was worse than choosing $c=0$. Interpolation is apt to produce a totally wrong equation that just happens to cross the true solution at the interpolation point.
So, I decided to minimize the integral $\int_0^T E^2\,dt$ instead. Here $E$ is given by (3) into which I plugged (5)-(6). The minimum was found (numerically) at $c\approx 0.21$, which yields a good approximation:
This is the corresponding graph of $E$; the deviation of $E$ from $0$ measures the error in the solution. Note the vertical scale.
The nearby value $c=0.24$ gave an even better-looking solution (1); this was determined just by trial and comparison with the numerical solution. But note that $c=0.21$ and corresponding $a,b,\omega$ were found without any references to the numerical solution of the ODE.