We know that, using indefinite integration over f'(x) we can get f(x) whose derivative is f'(x). That's why integration is also called antiderivative. But when we do definite Integration, we get ∆f(x) for ∆x. But in the above mentioned case, indefinite integration gives an absurd result.
The case is as follows, A body of mass m connected to a spring displaces from its equilibrium position..
On applying force on the body for a while the body displaces to x=x(i.e. position w.r.t. equilibrium position is a certain value x) and at that position it has velocity equals to V. But due to its inertia it moves to further to x=a. Durin this displacement from x to a, the body experiences varying spring force and this causes the body to retardate and at x=a, velocity becomes 'zero'.
According to *Hook's law', F(spring force)= -kx, where k is the spring constant. Now using this formula and doing a bit of indefinite integration to express V in terms of x, we get the following equation, Expressing V as a function of x in case of spring-mass system.
Since Velocity can't be imaginary,hence this equation is quite absurd. However applying the upper and lower limits 0 and V & a and x respectively for both sides, we get **V = √{(k/m)*(a²-x²)}, which seems quite correct. But the question is why the equation from where we have derived this one seems to be so 'incorrect' or 'invalid' ?
$v \frac {dv}{dx} = -\frac {k}{m} x\\ \int v\ dv = \int -\frac {k}{m} x\\ \frac 12 v^2 = -\frac 12 \frac {k}{m} x^2 + C\\ v^2 = -\frac {k}{m} x^2 + C\\ v = \sqrt {C - \frac {k}{m} x^2}$
Now, what you would normally do...
Since $C$ is an arbitrary constant we can replace $C$ with $\frac {k}{m}C.$ And since C is necessarily positive we can replace $C$ with $\frac {k}{m} C^2$
$\frac {dx}{dt} = \sqrt {\frac {k}{m}C^2 - \frac {k}{m} x^2}\\ \int \frac {dx}{\sqrt {C^2 - x^2}} = \int \sqrt {\frac km}dt\\ \arcsin \frac {x}{C} = \sqrt {\frac {k}{m}}t + \phi\\ x = C\sin (\sqrt{\frac km} t + \phi)$
$C$ is the maximum amplitude of the oscillation.