# Simple harmonic motion: origin of the formula v^2=w^2(a^2-x^2)

I forgot how this formula $v^2=w^2(a^2-x^2)$ comes in the simple harmonic motion. I mean $v^2=w^2 r^2$ but then how do you substitute $(a^2-x^2)$ in place of r^2. Something to do with circles. Just couldn't find in the M3 book. Please help me or give me some links where i can find this formula.(Happy)
I forgot how this formula $v^2=w^2(a^2-x^2)$ comes in the simple harmonic motion. I mean $v^2=w^2 r^2$ but then how do you substitute $(a^2-x^2)$ in place of r^2. Something to do with circles. Just couldn't find in the M3 book. Please help me or give me some links where i can find this formula.(Happy)
I'd start from the definition: $ma = - kx$ where a is the acceleration. Therefore solve the following differential equation for v (v is velocity): $\frac{d}{dx} \left(\frac{v^2}{2} \right) = - \frac{k}{m} x$.