I was trying to solve a physics problem and the equation I came up with was: $$F-2kx(t)=mx''(t)$$ It is given that $x(0)=0$ and $x'(0)=0$, and my target is to find the extrema values of $x(t)$
Solving the differential equation: $$x(t)=c_2\sin{\left(\sqrt{\frac{2k}{m}}t\right)}+c_1\cos{\left(\sqrt{\frac{2k}{m}}t\right)}+\frac{F}{2k}$$ Putting in the given conditions, $c_2=0$ and $c_1=-\frac{F}{2k}$ , so: $$x(t)=\frac{F}{2k}\left(1-\cos{\left(\sqrt{\frac{2k}{m}}t\right)}\right)$$ Finding the extrema values:$$x_{min}=0$$$$x_{max}=\frac{F}{k}$$ Now my question is:
Is it possible to find the extrema values of $x(t)$ using only the given differential equation and the 2 conditions, but without actually solving the differential equation?
NOTE:
The actual question that I simplified down to come up with the equation:

I used the relative acceleration of the right block with respect to the left one to create the equation.
From
$$ F-2kx=m\ddot x\Rightarrow F \dot x-2kx\dot x=m\dot x\ddot x\Rightarrow F x-k x^2 + C = \frac m2 \dot x^2 $$
now from the initial conditions we have $C = 0$ then
$$ \frac m2\dot x^2+k x^2-Fx=0 $$
The potential energy associated to the elongation, is maximum when the kinetic fraction is null so the extrema are the solutions for
$$ k x^2-Fx = 0 $$