# Homework Help: Confused about Hooke's law when analyzed at different times

Tags:
1. Aug 6, 2017

### CGandC

1. The problem statement, all variables and given/known data
A.
Suppose I have a block of mass 'M' that is attached to a wall via spring of coefficient 'k' , the spring has rest length Xo .
Suppose I look at the problem at some time 't' such that the spring is being compressed and the block moves left ( moving towards x = 0 ) , in this case , the diagram will look :

Now , if at this time I apply newton's second law on the block, I'll get:
m*d2x/dt2 = k*(x-Xo)
Which is wrong ( why? )

I know that I'm supposed to get:
m*d2x/dt2 = -k*(x-Xo)
but I only get this result if I look at the problem at some time 't' such that the body is after Xo and is being
stretched . But this is not the time interval I want.

* So suppose I want to reach the correct equation from the situation when the spring compresses ( the
situation where I got the first equation )
, I know there's wrong with first equation , but why? , after all , the force from Hooke's law does point to the right when the spring compresses , and I know that I shouldn't mingle around with the sign of the acceleration.

B. Suppose I have the same block from question A , but now , I change my coordinates so that the y stays the same and the positive x axis points to the left, and suppose I look at the block at time 't' such that the block is being stretched after rest length Xo :

So , using newton's second law on the block , I'll get:

m*d2x/dt2 = k*(x-Xo)

* which is wrong, but why? , after all , since the displacment ' x-Xo ' is negative and by hooke's law:
-k*(x-X0) > 0 so the force is indeed pointing positively in this coordinates.

2. Relevant equations
F = ma
m*d2x/dt2 = -k*(x-Xo)

3. The attempt at a solution
-

2. Aug 6, 2017

### TSny

Hello, and welcome to PF!
Can you explain your argument for writing +k*(x-Xo) on the right hand side, rather than -k*(x-Xo)?

3. Aug 6, 2017

### scottdave

Why did you say it like that? Really you have this: ∑(Force) = m*accel where Force and accel are vectors. The acceleration is the 2nd derivative of position, with respect to time, but it is a vector quantity.

With one dimensional motion, you can just use the sign to represent direction, though.
OK so you say that Force = k(x - x0), but this depends on how you define the positive x direction. If you are stretching or compressing the spring away from x0, it is always going to pull or push it back toward x0, so you need to assign the sign of the force, accordingly.

4. Aug 6, 2017

### CWatters

X-X0 is negative because X is smaller than X0. The acceleration is in the positive X direction.

Edit: sorry cross posted with the above.

5. Aug 7, 2017

### CGandC

Because I already knew that ( x-Xo)<0 and by hookes law -k*(x-Xo)>0 so I just wrote k*(x-Xo) , taking care of the sign already,

Yes but what about the acceleration? , I'm supposed to have a negative sign in the F = k*(x-xo) otherwise solving the ODE will give me the wrong solution.

If it's negative then I can say that -k*(x-xo) > 0 ( because ' x-xo ' < 0 ) so now I can just write F = k*(x-Xo) , this will give me the wrong equation and solving this ODE will give the wrong solution.

6. Aug 7, 2017

### vela

Staff Emeritus

You can't just drop the minus sign. I'm not sure what your reasoning is here. Why does the fact that -k(x-x0) > 0 mean you can write F = +k(x-x0)?

7. Aug 7, 2017

### scottdave

You need to set up your equation so it works. You should not flip the sign depending on where it is. Try this: move the origin to the rest position of the spring. Then you have Force = -kx, because if you are moving to positive x, it wants to move in opposite direction. The spring does the same if it is in the negative x (spring provides force back toward origin, which is +)

Last edited: Aug 7, 2017
8. Aug 7, 2017

### Staff: Mentor

Suppose we do it with unit vectors. The force exerted by the spring on the mass is $-k(x-x_0)\mathbf{i}_x$ where $\mathbf{i}_x$ is the unit vector in the positive x direction. So, when $x\gt x_0$ the force is pointing in the negative x direction and when $x\lt x_0$, the force is pointing in the positive x direction. So, $$m\frac{d^2x}{dt^2}\mathbf{i}_x=-k(x-x_0)\mathbf{i}_x$$

9. Aug 7, 2017

### CGandC

Thanks , as soon as I worked on the problem ( or any problem relating to hooke's law ) using unit vectors for F = ma as " Chestermiller" did the problem became very clear and no problems persist now.