Hooke's Law Second Order Differential Equation

1. The problem statement, all variables and given/known data
A mass ##m## on a frictionless table is connected to a spring with spring constant ##k## so that the force on it is ##F_x = -kx## where ##x## is the distance of the mass from its equilibrium position. It is then pulled so that the spring is stretched by a distance ##x## from its equilibrium position and at ##t = 0## is released.
Write Newton’s Second Law and solve for the acceleration. Solve for the acceleration and write the result as a second order, homogeneous differential equation of motion for this system.

3. The attempt at a solution
I write the the Newton's Second Law and solve for the acceleration:
$$F = m a_x = - k x$$
$$a_x = -\frac{k}{m} x$$
Now it tells me to write the result as a second order, homogeneous differential equation of motion. I don't quite get how I should do this but I think this way:
I write ##a_x = -\frac{k}{m} x## as ##\frac{d v_x}{d t} = -\frac{k}{m} x## and multiplying both sides for ##d t## and integrating I have:
$$v_x(t) = -\frac{k}{m} x t + C$$
where ##C## is a constant and would actually be ##v_{0x} = 0##
Same thing again with ##\frac{d x}{d t} = -\frac{k}{m} x t## and having:
$$x(t) = -\frac{k}{2m} x t^2 + C$$
Now, should I put all this like
$$x''(t) + x'(t) + x(t) = 0$$
and so
$$(-\frac{k}{m} x) + (-\frac{k}{m} x t) + (-\frac{k}{2m} x t^2) =0$$
Is this the correct way?

I write the the Newton's Second Law and solve for the acceleration:
$$F = m a_x = - k x$$
$$a_x = -\frac{k}{m} x$$
Now it tells me to write the result as a second order, homogeneous differential equation of motion. I don't quite get how I should do this

Here you treated ##x## as a constant. But ##x## is a function of time. You are asked to find a second-order, homogeneous differential equation such that if you solved it, it would give you the answer for ##x(t)##. But the statement of the question does not ask you to solve the differential equation.

Can you express ##a_x## as a second derivative?
Here you treated ##x## as a constant. But ##x## is a function of time. You are asked to find a second-order, homogeneous differential equation such that if you solved it, it would give you the answer for ##x(t)##. But the statement of the question does not ask you to solve the differential equation.

I can express ##a_x## as ##\frac{d^2 x}{d t^2}##.
And yes, you're right, I wrongly treated it as a constant. So I should have something like ##v_x = -\frac{k}{m} \int x(t) dt##.

Yes. Writing the answer as ##x''(t) = -\frac{k}{m}x(t)## is probably OK, too. Writing it with 0 on the right just puts the differential equation in standard form. The question statement is not clear on whether or not you need to put it into standard form. Since it says, "solve for the acceleration" it could be that they actually want ##x''(t) = -\frac{k}{m}x(t)##. Who knows.

Yes. Writing the answer as ##x''(t) = -\frac{k}{m}x(t)## is probably OK, too. Writing it with 0 on the right just puts the differential equation in standard form. The question statement is not clear on whether or not you need to put it into standard form.

Oh, I get it now. I think I got confused before.
Yeah, well, I'll use the standard form. Thank you very much!