# Find v(x) of a mass suspended from a spring

Methinks the image in #48 is a good answer to the problem statement in #19 (also an image ).
Whether it's still correct can be checked 'easily':
• ##{dv\over dx} = 0\ \ ## at ##\ \ x_0 = - {mg\over k} ##
• substitute ##\omega =\sqrt{k\over m}, \ \ \xi = x_0-x, \ \ v = ## .... oh, well, maybe not that easy ...
and all that for 3 points ....

Makes me curious to see parts b) and c)
##\ ##

I think 48 is the derivative of the solution?

we solved a and b almost I think. a asks to set up the differential equation. b asks to solve it.

I haven't looked at what c and d is yet, but it seems not to difficult, c) asks you to graph the function v(x) in an x-v-diagramm.

And d finally asks you for the deviation (*Auslenkung, I don't quite know what that word in german means actually) and the speed of the mass when the spring is pulled 20 cm up or down.
I think it just means plug in 0.2 for x and state the value. so v(0.2).

a, b and c each give you 3 points, d 1 point.

I'll figure out Latex too! :-) It doesn't let me edit the previous post anymore, I think I did it too many times. But next chance I get.

I should think ##a(x) = -\omega^2 (x-x_0) \ \ ## with ##\ \ \omega^2 = {k\over m}##

In other words: ##{da\over dx} = -\omega^2 ##
Thank you for all the help!

SammyS
Staff Emeritus
Homework Helper
Gold Member
From Post #41:
...

##v = \sqrt{ v_^2 - \frac {kx^2} {m}, - 2gx}## (/ I'm sorry tried to but won't convert)

v = sqrt( v0^2 - (k*x^2) /m), - 2*g*x)
Just some ##\LaTeX## stuff.

The ##\LaTeX## code you entered was: ##v = \sqrt{ v_^2 - \frac {kx^2} {m}, - 2gx}## .

Correcting the omission of the 0 (thanks @BvU) to give v_0^2 and letting ##\LaTeX## do its thing gives the following.

##v = \sqrt{ v_0^2 - \frac {kx^2} {m}, - 2gx}##

Drop the comma, wrap v_0 in braces and use \dfrac rather than \frac gives the result

## v = \sqrt{ {v_0}^2 - \dfrac {kx^2} {m} - 2gx } ##

from the input line:

## v = \sqrt{ {v_0}^2 - \dfrac {kx^2} {m} - 2gx } ##

spsch
kuruman
Homework Helper
Gold Member

It looks like the big picture may still elude you. Remember that the zero of potential energy is arbitrary. The gravitational energy of mass ##m## at height ##y## above ground is ##U_g=mg(y-y_0)##; it is zero when ##y=y_0##. The elastic energy of a spring stretched (or compressed) by amount ##x## from its relaxed position is ##U_s=\frac{1}{2}k(x^2-x_0^2)##; it too is zero when ##x=x_0##. Note that ##x## in this context denotes "displacement of the spring from equilibrium", it does not denote position. The total potential energy is ##U_{tot}=U_g+U_s=mg(y-y_0)+\frac{1}{2}k(x^2-x_0^2)##.

Case 1. A horizontal spring-mass system
For the vertical motion
(a) you can choose the position of the origin, ##Y_{or}## at the vertical height of the mass
(b) you can choose the zero of potential energy at the origin (##y_0=0##)
Then ##U_g =mg(0-0)=0## throughout the motion.
For the horizontal motion
(a) you can choose the horizontal location of the origin, ##X_{or}## at the mass when the spring is unstretched. Remembering that ##x## stands for the displacement of the spring from the origin, clearly it also stands for the displacement of the mass from the origin. At this point you still have to choose the zero of spring energy.
(b) A common and useful choice is ##x_0=0##, but it could be anything you want.

With all of the above in mind, if the mass has speed ##v_0## when the spring is unstretched, the mechanical energy at some arbitrary ##x## is $$ME=K+U_g+U_s=\frac{1}{2}mv^2+0+\frac{1}{2}kx^2.$$Because mechanical energy is conserved and we have chosen the zero spring potential energy to be where the speed is maximum at ##x=0##, this becomes the familiar $$ME=\frac{1}{2}mv^2+\frac{1}{2}kx^2=\frac{1}{2}mv_0^2~~~~~(1)$$

Case 2. A vertical spring-mass system
Start with the most general expression for the mechanical energy and then you need to choose three quantities, the position of the origin ##Y_{or}##, the zero of gravitational potential energy ##y_0## and the zero of spring potential energy ##x_0##.$$ME=\frac{1}{2}mv^2+mg(y-y_0)+\frac{1}{2}k(x^2-x_0^2)~~~~~(2)$$

Suppose you choose the origin ##Y_{or}## to be at the position of the mass when the net force acting on it is zero, i.e. ##kx_{eq}-mg=0##. Then ##x_{eq}=\frac{mg}{k}## below the unstretched position of the spring. The displacement of the mass from this origin is the same as the additional stretch (or compression) of the spring call that quantity, ##\xi##, that is ##y=\xi##.
We choose the zero of gravitational potential energy to be at ##Y_{or}##. Then ##y_0=0##.
We also choose the zero of spring potential energy to be not where the spring is unstretched but where the additional stretch ##\xi = 0##. That occurs at ##x_{eq}## as we have previously found, that is ##x_0=x_{eq}=\frac{mg}{k}##.

Finally, the stretch of the spring from the equilibrium position ##x## is related to the additional stretch ##\xi## by$$x=\xi-\frac{mg}{k}.$$With all this equation (2) becomes$$ME=\frac{1}{2}mv^2+mg\xi-\frac{1}{2}k\left[\left(\xi- \frac{mg}{k}\right)^2-\left(\frac{mg}{k}\right)^2\right]$$This simplifies to$$ME=\frac{1}{2}mv^2+\frac{1}{2}k\xi^2~~~~~(3)$$
If we compare equations (1) and (2) for the mechanical energy of a spring-mass system, we see that they are identical in that, by judicious choices of the origin and the zeroes of the two potential energies, (a) the spring potential energy depends quadratically on the displacement relative to the (force) equilibrium position and (b) the potential energy contribution can be written out of the picture.

Last edited:
spsch
BvU
Homework Helper
Second @kuruman ! With all due respect, to me the nice feature of this exercise (see OP image in #19) is that they ask for a first-order differential equation in ##v(x) ##, as opposed to the usual ##\ddot x = -kx## second order treatment.

Note that the choice for x=0 has already been made in the problem statement. At that point the initial ##v_0## is also given. And the 1st order DE for ##v(x)## necessarily contains the gravitational potential energy.

And we should emphasize that the physics outcome is of course independent of the choices for zero coordinate and zero potential energy.
##\ ##

SammyS
kuruman
Homework Helper
Gold Member
Note that the choice for x=0 has already been made in the problem statement. At that point the initial v0v_0 is also given. And the 1st order DE for v(x)v(x) necessarily contains the gravitational potential energy.
Yes, I tried to show how, using ME conservation, one can get the same result as integrating the DE, but I sidetracked myself. I should have picked ##Y_{or}=x_0=y_0=0## instead.

It looks like the big picture may still elude you. Remember that the zero of potential energy is arbitrary. The gravitational energy of mass ##m## at height ##y## above ground is ##U_g=mg(y-y_0)##; it is zero when ##y=y_0##. The elastic energy of a spring stretched (or compressed) by amount ##x## from its relaxed position is ##U_s=\frac{1}{2}k(x^2-x_0^2)##; it too is zero when ##x=x_0##. Note that ##x## in this context denotes "displacement of the spring from equilibrium", it does not denote position. The total potential energy is ##U_{tot}=U_g+U_s=mg(y-y_0)+\frac{1}{2}k(x^2-x_0^2)##.

Case 1. A horizontal spring-mass system
For the vertical motion
(a) you can choose the position of the origin, ##Y_{or}## at the vertical height of the mass
(b) you can choose the zero of potential energy at the origin (##y_0=0##)
Then ##U_g =mg(0-0)=0## throughout the motion.
For the horizontal motion
(a) you can choose the horizontal location of the origin, ##X_{or}## at the mass when the spring is unstretched. Remembering that ##x## stands for the displacement of the spring from the origin, clearly it also stands for the displacement of the mass from the origin. At this point you still have to choose the zero of spring energy.
(b) A common and useful choice is ##x_0=0##, but it could be anything you want.

With all of the above in mind, if the mass has speed ##v_0## when the spring is unstretched, the mechanical energy at some arbitrary ##x## is $$ME=K+U_g+U_s=\frac{1}{2}mv^2+0+\frac{1}{2}kx^2.$$Because mechanical energy is conserved and we have chosen the zero spring potential energy to be where the speed is maximum at ##x=0##, this becomes the familiar $$ME=\frac{1}{2}mv^2+\frac{1}{2}kx^2=\frac{1}{2}mv_0^2~~~~~(1)$$

Case 2. A vertical spring-mass system
Start with the most general expression for the mechanical energy and then you need to choose three quantities, the position of the origin ##Y_{or}##, the zero of gravitational potential energy ##y_0## and the zero of spring potential energy ##x_0##.$$ME=\frac{1}{2}mv^2+mg(y-y_0)+\frac{1}{2}k(x^2-x_0^2)~~~~~(2)$$

Suppose you choose the origin ##Y_{or}## to be at the position of the mass when the net force acting on it is zero, i.e. ##kx_{eq}-mg=0##. Then ##x_{eq}=\frac{mg}{k}## below the unstretched position of the spring. The displacement of the mass from this origin is the same as the additional stretch (or compression) of the spring call that quantity, ##\xi##, that is ##y=\xi##.
We choose the zero of gravitational potential energy to be at ##Y_{or}##. Then ##y_0=0##.
We also choose the zero of spring potential energy to be not where the spring is unstretched but where the additional stretch ##\xi = 0##. That occurs at ##x_{eq}## as we have previously found, that is ##x_0=x_{eq}=\frac{mg}{k}##.

Finally, the stretch of the spring from the equilibrium position ##x## is related to the additional stretch ##\xi## by$$x=\xi-\frac{mg}{k}.$$With all this equation (2) becomes$$ME=\frac{1}{2}mv^2+mg\xi-\frac{1}{2}k\left(\xi- \frac{mg}{k}\right)^2-\left(\frac{mg}{k}\right)^2$$This simplifies to$$ME=\frac{1}{2}mv^2+\frac{1}{2}k\xi^2~~~~~(3)$$
If we compare equations (1) and (2) for the mechanical energy of a spring-mass system, we see that they are identical in that, by judicious choices of the origin and the zeroes of the two potential energies, (a) the spring potential energy depends quadratically on the displacement relative to the (force) equilibrium position and (b) the potential energy contribution can be written out of the picture.
Hi, thank you kuruman. This was very helpful. What gives me trouble is how a(x) has been related to ## \sqrt{ \frac km} ## by just knowing x.
I see how it's the acceleration. I had some trouble following it. It's more clear now, but still a little fuzzy haha. I'm sure it shall clear up.

Last edited:
It looks like the big picture may still elude you. Remember that the zero of potential energy is arbitrary. The gravitational energy of mass ##m## at height ##y## above ground is ##U_g=mg(y-y_0)##; it is zero when ##y=y_0##. The elastic energy of a spring stretched (or compressed) by amount ##x## from its relaxed position is ##U_s=\frac{1}{2}k(x^2-x_0^2)##; it too is zero when ##x=x_0##. Note that ##x## in this context denotes "displacement of the spring from equilibrium", it does not denote position. The total potential energy is ##U_{tot}=U_g+U_s=mg(y-y_0)+\frac{1}{2}k(x^2-x_0^2)##.

Case 1. A horizontal spring-mass system
For the vertical motion
(a) you can choose the position of the origin, ##Y_{or}## at the vertical height of the mass
(b) you can choose the zero of potential energy at the origin (##y_0=0##)
Then ##U_g =mg(0-0)=0## throughout the motion.
For the horizontal motion
(a) you can choose the horizontal location of the origin, ##X_{or}## at the mass when the spring is unstretched. Remembering that ##x## stands for the displacement of the spring from the origin, clearly it also stands for the displacement of the mass from the origin. At this point you still have to choose the zero of spring energy.
(b) A common and useful choice is ##x_0=0##, but it could be anything you want.

With all of the above in mind, if the mass has speed ##v_0## when the spring is unstretched, the mechanical energy at some arbitrary ##x## is $$ME=K+U_g+U_s=\frac{1}{2}mv^2+0+\frac{1}{2}kx^2.$$Because mechanical energy is conserved and we have chosen the zero spring potential energy to be where the speed is maximum at ##x=0##, this becomes the familiar $$ME=\frac{1}{2}mv^2+\frac{1}{2}kx^2=\frac{1}{2}mv_0^2~~~~~(1)$$

Case 2. A vertical spring-mass system
Start with the most general expression for the mechanical energy and then you need to choose three quantities, the position of the origin ##Y_{or}##, the zero of gravitational potential energy ##y_0## and the zero of spring potential energy ##x_0##.$$ME=\frac{1}{2}mv^2+mg(y-y_0)+\frac{1}{2}k(x^2-x_0^2)~~~~~(2)$$

Suppose you choose the origin ##Y_{or}## to be at the position of the mass when the net force acting on it is zero, i.e. ##kx_{eq}-mg=0##. Then ##x_{eq}=\frac{mg}{k}## below the unstretched position of the spring. The displacement of the mass from this origin is the same as the additional stretch (or compression) of the spring call that quantity, ##\xi##, that is ##y=\xi##.
We choose the zero of gravitational potential energy to be at ##Y_{or}##. Then ##y_0=0##.
We also choose the zero of spring potential energy to be not where the spring is unstretched but where the additional stretch ##\xi = 0##. That occurs at ##x_{eq}## as we have previously found, that is ##x_0=x_{eq}=\frac{mg}{k}##.

Finally, the stretch of the spring from the equilibrium position ##x## is related to the additional stretch ##\xi## by$$x=\xi-\frac{mg}{k}.$$With all this equation (2) becomes$$ME=\frac{1}{2}mv^2+mg\xi-\frac{1}{2}k\left(\xi- \frac{mg}{k}\right)^2-\left(\frac{mg}{k}\right)^2$$This simplifies to$$ME=\frac{1}{2}mv^2+\frac{1}{2}k\xi^2~~~~~(3)$$
If we compare equations (1) and (2) for the mechanical energy of a spring-mass system, we see that they are identical in that, by judicious choices of the origin and the zeroes of the two potential energies, (a) the spring potential energy depends quadratically on the displacement relative to the (force) equilibrium position and (b) the potential energy contribution can be written out of the picture.

Does epsilon (if it is epsilon, the additional stretch) just represent dx here?

haruspex
Homework Helper
Gold Member
2020 Award
With all this equation (2) becomes$$ME=\frac{1}{2}mv^2+mg\xi-\frac{1}{2}k\left(\xi- \frac{mg}{k}\right)^2-\left(\frac{mg}{k}\right)^2$$
Did you mean $$ME=\frac{1}{2}mv^2+mg\xi+\frac{1}{2}k\left(\left(\xi- \frac{mg}{k}\right)^2-\left(\frac{mg}{k}\right)^2\right)$$

kuruman
haruspex
Homework Helper
Gold Member
2020 Award
Does epsilon (if it is epsilon, the additional stretch) just represent dx here?
##\xi##, pronounced "ksy", is the Greek equivalent of x. Not sure how you are defining dx here, but that usually refers to an infinitesimal change. @kuruman is using ##\xi## to stand for a variable like x but differing from it by a constant amount.

spsch
##\xi##, pronounced "ksy", is the Greek equivalent of x. Not sure how you are defining dx here, but that usually refers to an infinitesimal change. @kuruman is using ##\xi## to stand for a variable like x but differing from it by a constant amount.
Ah thanks, yes, I was able to infer that but wanted to make sure. dx for me is a small change usually?

kuruman
Homework Helper
Gold Member
Did you mean $$ME=\frac{1}{2}mv^2+mg\xi+\frac{1}{2}k\left(\left(\xi- \frac{mg}{k}\right)^2-\left(\frac{mg}{k}\right)^2\right)$$
Absolutely what I meant. Thanks for the catch, I edited the post.

spsch
@kuruman I studied your very informative post quite a bit yesterday and today. It was quite helpful. I think I had the same intuition before, but it's more clear now. I think I dreamt about your equations with ksy. My problem may have been with thinking about the coordinate system and setting it up correctly, which I have a much better grasp on how to approach now. thanks @haruspex, @BvU @SammyS too!

I think my first solution was almost correct and the correct solution is v(x) = ## \sqrt { - \frac {kx^2} {m} - 2gx + 9} ## ?

SammyS and BvU
kuruman
Homework Helper
Gold Member
@kuruman

I think my first solution was almost correct and the correct solution is v(x) = ## \sqrt { - \frac {kx^2} {m} - 2gx + 9} ## ?
Replace ##9## with ##v_0^2## and the solution will be fine.

spsch
Replace ##9## with ##v_0^2## and the solution will be fine.

Thank you Kuruman,
I apologize if I'm being slow, isn't 9 = ##v_0^2## ? And my C when I integrate the differential equation?
Should I not insert the constant values in a solution? (Meaning if it would be considered incorrect?)

kuruman
Homework Helper
Gold Member
Thank you Kuruman,
I apologize if I'm being slow, isn't 9 = ##v_0^2## ? And my C when I integrate the differential equation?
Should I not insert the constant values in a solution? (Meaning if it would be considered incorrect?)

You are welcome.

When you write ##9##, you mean ##9## what? Apples, bananas, oranges? You could have written ##9~\rm{m^2/s^2}## but then what about the other quantities? It is bad form to mix symbols and numbers. You can, if you wish, replace all the quantities that are given to you with numbers, but then you will have to include their units next to them in the final equation.

The integration constant is taken care of because in reality you are doing a definite integral. Here is the gist of the solution
$$ma = -kx-g$$ $$mv\frac{dv}{dx} = -kx-g$$ $$m \int_{v_0}^{v(x)} v ~dv = -k\int_{0}^x x~dx-g \int_{0}^x dx$$ Note that the limits of integration reflect the physical situation: at the lower limit ##x=0## the speed matches the initial speed ##v_0##; at the upper limit of some arbitrary value ##x## the speed is ##v(x)##. Since this is a definite integral, no integration constant is necessary.

Last edited:
spsch
You are welcome.

When you write ##9##, you mean ##9## what? Apples, bananas, oranges? You could have written ##9~\rm{m/s^2}## but then what about the other quantities? It is bad form to mix symbols and numbers. You can, if you wish, replace all the quantities that are given to you with numbers, but then you will have to include their units next to them in the final equation.

The integration constant is taken care of because in reality you are doing a definite integral. Here is the gist of the solution
$$ma = -kx-g$$ $$mv\frac{dv}{dx} = -kx-g$$ $$m \int_{v_0}^{v(x)} v ~dv = -k\int_{0}^x x~dx-g \int_{0}^x dx$$ Note that the limits of integration reflect the physical situation: at the lower limit ##x=0## the speed matches the initial speed ##v_0##; at the upper limit of some arbitrary value ##x## the speed is ##v(x)##. Since this is a definite integral, no integration constant is necessary.
@kuruman thank you! I wasn't aware of that. That makes sense though.

It looks like the big picture may still elude you. Remember that the zero of potential energy is arbitrary. The gravitational energy of mass ##m## at height ##y## above ground is ##U_g=mg(y-y_0)##; it is zero when ##y=y_0##. The elastic energy of a spring stretched (or compressed) by amount ##x## from its relaxed position is ##U_s=\frac{1}{2}k(x^2-x_0^2)##; it too is zero when ##x=x_0##. Note that ##x## in this context denotes "displacement of the spring from equilibrium", it does not denote position. The total potential energy is ##U_{tot}=U_g+U_s=mg(y-y_0)+\frac{1}{2}k(x^2-x_0^2)##.

Case 1. A horizontal spring-mass system
For the vertical motion
(a) you can choose the position of the origin, ##Y_{or}## at the vertical height of the mass
(b) you can choose the zero of potential energy at the origin (##y_0=0##)
Then ##U_g =mg(0-0)=0## throughout the motion.
For the horizontal motion
(a) you can choose the horizontal location of the origin, ##X_{or}## at the mass when the spring is unstretched. Remembering that ##x## stands for the displacement of the spring from the origin, clearly it also stands for the displacement of the mass from the origin. At this point you still have to choose the zero of spring energy.
(b) A common and useful choice is ##x_0=0##, but it could be anything you want.

With all of the above in mind, if the mass has speed ##v_0## when the spring is unstretched, the mechanical energy at some arbitrary ##x## is $$ME=K+U_g+U_s=\frac{1}{2}mv^2+0+\frac{1}{2}kx^2.$$Because mechanical energy is conserved and we have chosen the zero spring potential energy to be where the speed is maximum at ##x=0##, this becomes the familiar $$ME=\frac{1}{2}mv^2+\frac{1}{2}kx^2=\frac{1}{2}mv_0^2~~~~~(1)$$

Case 2. A vertical spring-mass system
Start with the most general expression for the mechanical energy and then you need to choose three quantities, the position of the origin ##Y_{or}##, the zero of gravitational potential energy ##y_0## and the zero of spring potential energy ##x_0##.$$ME=\frac{1}{2}mv^2+mg(y-y_0)+\frac{1}{2}k(x^2-x_0^2)~~~~~(2)$$

Suppose you choose the origin ##Y_{or}## to be at the position of the mass when the net force acting on it is zero, i.e. ##kx_{eq}-mg=0##. Then ##x_{eq}=\frac{mg}{k}## below the unstretched position of the spring. The displacement of the mass from this origin is the same as the additional stretch (or compression) of the spring call that quantity, ##\xi##, that is ##y=\xi##.
We choose the zero of gravitational potential energy to be at ##Y_{or}##. Then ##y_0=0##.
We also choose the zero of spring potential energy to be not where the spring is unstretched but where the additional stretch ##\xi = 0##. That occurs at ##x_{eq}## as we have previously found, that is ##x_0=x_{eq}=\frac{mg}{k}##.

Finally, the stretch of the spring from the equilibrium position ##x## is related to the additional stretch ##\xi## by$$x=\xi-\frac{mg}{k}.$$With all this equation (2) becomes$$ME=\frac{1}{2}mv^2+mg\xi-\frac{1}{2}k\left[\left(\xi- \frac{mg}{k}\right)^2-\left(\frac{mg}{k}\right)^2\right]$$This simplifies to$$ME=\frac{1}{2}mv^2+\frac{1}{2}k\xi^2~~~~~(3)$$
If we compare equations (1) and (2) for the mechanical energy of a spring-mass system, we see that they are identical in that, by judicious choices of the origin and the zeroes of the two potential energies, (a) the spring potential energy depends quadratically on the displacement relative to the (force) equilibrium position and (b) the potential energy contribution can be written out of the picture.
Hi @kuruman I wanted to let you know that it sank in yesterday and I feel I understand the benefit and why to chose the coordinate axes like you suggested.
I've been doing lot's of problems and I tried to follow your suggestions but it hasn't quite made click, even though I could always get the correct answers.
Until yesterday I got to a problem that basically had the reverse as this problem.
The mass was on top of the spring instead of hanging from the spring.
It sounds silly, but from this perspective, everything made total sense.

After, I came here right away to thank you, but my browser or this site didn't work well together.
So belated, thank you kuruman and all who helped, it took a while but I think I've got an intuitive feeling (which is what I'm looking for) for these types of problems now!

SammyS and kuruman