Problem:
Solve the following differential equation: $$ \frac{ d^2 s }{dt^2} = g(1 -s^2) $$ with the following initial condition: \begin{align*} \dfrac{ ds}{dt} \left( 0 \right) &= 0 \\ s(0) &= \dfrac{1}{4} \\ \end{align*} and $g$ is a positive constant.
Note: This differential equation is from a physics problem I am working on.
Answer:
\begin{align*} \frac{ d^2 s }{dt^2} &= g(1 -s^2) \\ \frac{ d^2 s} {dt^2} + gs^2 &= g \\ \frac{ d^2 s} {dt^2} &= g - gs^2 \\ d^2s &= g (1- s^2) \,\, dt^2 \\ \dfrac{ d^2 s}{1-s^2} &= g \,\, dt^2 \\ \end{align*} Now we integrate both sides. To integrate the left side, we apply the technique of partial fractions. \begin{align*} \dfrac{ 1}{1-s^2} &= \dfrac{A}{1-s} + \dfrac{B}{1+s} \\ 1 &= A(1+s) + B(1-s) \\ A + B &= 1 \\ A - B &= 0 \\ A &= B \\ A &= \dfrac{1}{2} \\ B &= \dfrac{1}{2} \\ \end{align*} Hence we have: $$ \int \dfrac{ 1 }{1-s^2} \,\, ds = \dfrac{1}{2} \ln{|1-s|} + \dfrac{1}{2} \ln{|1+s|} + C_1 $$ Going back to the differential equation we have: \begin{align*} \left( \dfrac{1}{2} \ln{|1-s|} + \dfrac{1}{2} \ln{|1+s|} \right) \,\, ds &= gt \,\, dt + C \\ % \dfrac{ds}{dt} &= \dfrac{ gt }{ \dfrac{1}{2} \ln{|1-s|} + \dfrac{1}{2} \ln{|1+s| } } + C \\ \end{align*} We know that $\dfrac{ ds }{dt}\left( 0 \right) = 0$. We also know that when $t = 0$ that $s = 1/4$. Hence we eliminate the constant. \begin{align*} 0 &= \dfrac{ g(0) }{ \dfrac{1}{2} \ln{|1-\dfrac{1}{4}|} + \dfrac{1}{2} \ln{|1+\dfrac{1}{4}| } } + C \\ 0 &= 0 + C \\ C &= 0 \\ \dfrac{ds}{dt} &= \dfrac{ gt }{ \dfrac{1}{2} \ln{|1-s|} + \dfrac{1}{2} \ln{|1+s| } } \\ \end{align*} Now we have the following first order differential equation. $$ \ln{|1-s|} + \ln{| 1+s | } \,\,\, ds = 2gt \,\, dt $$ Now we need to integrate both sides. However, there is a problem when $s = 1$ because $\ln{0}$ is not defined. What did I do wrong?

