# Finding The Position of A Mass As A Function of Time

embphysics

## Homework Statement

Consider a mass m on the end of a spring of force constant k and constrained
to move along the horizontal x axis. If we place the origin at the spring’s equilibrium
position, the potential energy is U = 1/2kx^2 At time t = 0 the mass is sitting at the
origin and is given a sudden kick to the right so that it moves out to a maximum
displacement x_max = A and then continues to oscillate about the origin.

(a) Write down the equation for conservation of energy and solve it to give the
mass’s velocity $\dot{x}$ in terms of the position x and the total energy E.

(b) Show that E = 1/2kA^2 and use this to eliminate E from your expression for $\dot{x}$. Find the time for the mass to move from the origin out to a position x.

(c) Solve the result of part (b) to give x as a function of t and show that the mass
executes simple harmonic motion with period $2 \pi \sqrt{m/k}$

## The Attempt at a Solution

All right. I am currently trying to evaluate the integral, which was instructed of me to find in part (b).

Before I proceed any further, here is a little preliminary work:

$\dot{x}(x) = kA^2 - \frac{k}{m} x^2$

And I used this fact to find the integral: $\dot{x} = \frac{dx}{dt}$ which becomes by separation of variables $dt = \frac{dx}{\dot{x}}$

Substituting in, and integrating both sides, this is the integral thus far:

$\int_0^t dt' = \int_0 ^x \frac{dx}{\sqrt{kA^2 - \frac{k}{m}x^2 }}$

$kA^2 = (k^{1/2}A)^2$ and $\frac{k}{m}x^2= (\omega x)^2$, where

$\omega = \sqrt{\frac{k}{m}}$. This leads to trigonometric substitution:

$sin \theta = \frac{(k^{1/2}A)^2}{\sqrt{kA^2 -(\omega x)^2}}$

The problem I have is finding how dx is equal to dθ. I tried using the fact that $\cos \theta = \frac{( \omega x)^2}{(k^{1/k} A)^2}$, then taking the arccos of this, and then taking the derivative of theta with respect to x. This didn't really seem helpful.

How can I get rid of dx, so that I might have an integral involving only theta?

Homework Helper
All right. I am currently trying to evaluate the integral, which was instructed of me to find in part (b).
(b) Show that E = 1/2kA^2 and use this to eliminate E from your expression for ##\dot{x}. Find the time for the mass to move from the origin out to a position x.

Starting with:
$$\frac{dx}{dt}=kA^2+\omega^2 x^2 : \omega^2=\frac{k}{m}$$ I get $$dt = \frac{dx}{kA^2+\omega x^2}$$

embphysics
Are you certain that that is correct? Here is my work from the beginning:

$E = T(\dot{x}) U(x) ~ \rightarrow E =\frac{1}{2}m \dot{x} + \frac{1}{2}kx^2$

When $x_max = A$, then $\dot{x} = 0$; thus, $E = 0 + \frac{1}{2}kA^2$

Taking the equation and solving for $\dot{x}$:

$\frac{1}{2}kA^2 =\frac{1}{2}m \dot{x} + \frac{1}{2}kx^2$

$\dot{x}^2 = kA^2 - \omega x^2$

$\dot{x} = \sqrt{kA^2 - \omega x^2}$

And then I applied the fact that $\dot{x} = \frac{dx}{dt}$, which, by separation of variables, can be written as $dt = \frac{dx}{\dot{x}}$

I am not certain as to how you were able to do this without introducing a square root.

Homework Helper
From post #1:
Before I proceed any further, here is a little preliminary work:
$$\dot{x}(x) = kA^2 - \frac{k}{m} x^2$$
And I used this fact to find the integral
... that's what I started from. I take it that's a typo?

$$\dot{x} = \sqrt{kA^2 - \omega x^2}$$
... makes more sense :) ... shouldn't that be ##\omega^2## though?

$$\frac{dx}{dt}= \sqrt{kA^2 - \omega^2 x^2}$$

Try substitution:
$$x=\sqrt{\frac{kA^2}{\omega^2}}\sin\theta\\ dx = \sqrt{\frac{kA^2}{\omega^2}}\cos\theta\; d\theta$$

embphysics
Yes, sorry for the typos. How where you able to get $x = \sqrt{\frac{kA^2}{\omega^2}} \sin \theta$?

Homework Helper
Did you try the substitution?

To understand the choice of substitution, consider:
If the stuff under the surd was ##1-x^2## ...... what would be the substitution?

embphysics
Oh, I just realized that I drew my triangle incorrectly. I wrote the square of the lengths of the hypotenuse and one of the legs; that is, for the hypotenuse, I wrote$(k^{1/2} A)^2$, when I should have written $k^{1/2} A$, and for the leg I wrote$(\omega A)^2$, rather than $\omega A$.

From the way I have my triangle drawn, $\sec \theta = \frac{k^{1\2}A}{\sqrt{(k^{1/2}A)^2 - (\omega A)^2}} \implies \frac{\sec \theta}{k^{1/2} A} = \frac{1}{\sqrt{(k^{1/2}A)^2 - (\omega A)^2}}$

For the differential of x, $x = \frac{k^{1/2}A}{\omega} \sin \theta \implies dx = \frac{k^{1/2}A}{\omega} \cos \theta d \theta$

Using these two expressions, I'll substitute them into the integral, for which I will get:

$t = \int \frac{\sec \theta}{k^{1/2} A} \frac{k^{1/2}A}{\omega} \cos \theta d \theta$

Simplifying,

$t = \frac{1}{\omega} \int d \theta \implies t = \frac{\theta}{\omega}$

Going back to the triangle, we find that theta is $\theta = \sin^{-1} (\frac{\omega x}{k^{1/2}A})$

Substituting this in, simplifying, and solving for x, I get

$x = \sqrt{m}A \sin (\omega t)$.

How do I get rid of that square root of the mass?