Given $\frac{dS}{dt}=-\frac{SI}{S + I + R}$ and $R = -(SI + S + I)/ \frac{dS}{dt}$ Determine $\frac{d^2S}{dt^2}$ I am given a system of equations:
\begin{align}
\frac{dS}{dt} &= -\frac{SI}{S + I + R}\\
\frac{dI}{dt} &= \frac{SI}{S + I + R} -I \\
\frac{dR}{dt} &= I - R\\
\end{align}
I am to subsitute $R = -\left(SI + S + I\right) / \frac{dS}{dt} $ to determine $\frac{d^2S}{dt^2}$
I chose to work only with the first equation.
When I substitute what is given for $R$ into the denominator I get:
\begin{align}
S + I + R &= S + I + R = -\left(SI + S + I\right) / \frac{dS}{dt}\\
&=\frac{\frac{dS}{dt}(S+I)-(SI+S+I)}{\frac{ds}{dt}}
\end{align}
I substitute this into the equation for $\frac{dS}{dt}$ and I get:
\begin{align}
\frac{dS}{dt} &= \frac{-SI \left(\frac{dS}{dt}\right)}{\frac{ds}{dt}\left(S+I\right)-(SI+S+I)}\\
\left(\frac{dS}{dt}\right)^2(S+I)-\frac{dS}{dt}\left(SI+S+I\right) &= -SI\left(\frac{dS}{dt}\right)\\
\left(\frac{dS}{dt}\right)^2(S+I) &= \left(\frac{dS}{dt}\right)\left(S+I\right)\\
\left(\frac{dS}{dt}\right)^2 &= \left(\frac{dS}{dt}\right)\\
\end{align}
How do I get the desired result of
$$
\frac{d^2S}{dt^2}= \frac{2}{S}\left(\frac{dS}{dt}\right)^2
$$

Try differentiating $\frac{dS}{dt}$ directly.
$\begin{align}\frac{d^2S}{dt^2} &= -\frac{(S+I+R)\frac{d(SI)}{dt}- SI\frac{d(S+I+R)}{dt}}{(S+I+R)^2}\\
\\&=-\frac{(S+I+R)\left[I\frac{d(S)}{dt}+S\frac{d(I)}{dt}\right]- SI\frac{d(S+I+R)}{dt}}{(S+I+R)^2}\\
\\&=-\frac{(S+I+R)\left[-I\frac{SI}{S + I + R}+S\frac{SI}{S + I + R} -SI\right]+SIR}{(S+I+R)^2}\\
\\&=-\frac{(S+I+R)\left[\frac{-SI(R+2I)}{S + I + R}\right]+SIR}{(S+I+R)^2}\\
\\&=\frac{2SI^2}{(S+I+R)^2} \\
\\& = \frac{2}{S}\left(\frac{SI}{S+I+R}\right)^2\\
\\&=\frac{2}{S}\left(\frac{dS}{dt}\right)^2\end{align}$
