# Differential equation simple question

I am just starting with differential equations, and...I need a lot of reading, but this question should be simple for you.

Acceleration at a spring is analogous to the position (displacement) x. But the definition of acceleration is the second derivative of the function: (distance x in relation to time t), that is, the second derivative of the function f(t) where f(t)=x. So I guess the known formula is f''(t)=kx. So I want to find acceleration in relation to time (and not in relation to x) in the case of the spring. So I GUESS I have to solve this differential equation:

f’’(t)=kf(t)

(where k is the constant of the spring. Mass gets involved, but let's ignore it for the moment even if it wrong to ignore it.) And I guess that I still have to keep f''(t) in the solution (since I do want acceleration in the equation=solution), and have to get rid of f(t) only and replace it with ... what is equal to, having t as the variable instead of f(t). Lol, confused, but: I just want to find f(t)=? and then I will know f''(t) too.

LOL, the answer is known and it's f''(t)=cos(t) or something like that. And I remembered that it is known, when I thought that the cos<->sin functions are the only ones where the f’’(t)=kf(t) could be valid. (I semi-solved the diferential equation almost by intuition). They produced this proof out of Work (!!!), whereas I just prooved that this is always the case when acceleration is analogous to displacement, and exactly because of f''(t)=cf(t), and not because of Work.

Am I correct? I still don't know how to solve that though.

Last edited:

First of all, you're not talking about f''(t), you're talking about df(x)/dt, i.e. f''(x).

I'm not exactly sure of your question, but I wouldn't really say f''(x) is analogous to f(x), I'd just say they're related.

In the real world, what that says is that the amount by which the end of a spring is accelerating (or wants to accelerate, since F=ma) is related to how much it's been stretched.

Then your equation f''(x) = kf(x) is not quite right. If you pull the spring in one direction (say positive x) it will tend to accelerate in the opposite direction (negative x). Then your ODE is

f''(x) = -kf(x)

To solve an ODE like that, take the auxiliary equation:
f''(x) + k f(x) = 0
becomes
m^2 + k = 0

Now find the roots (you'll see they're complex conjugates), apply Euler's identity and so on, and you see that the solution f(x) is the sum of a cosine and a sin term.

If you have some initial/boundary conditions, use them to solve your constants.

Check your book for "auxiliary equations". You'll probobly see three sections: 1) two distinct real roots; 2) two equal real roots; 3) roots that form a complex conjugate pair. Your solution is in there.

(wrong post)

Last edited:
You said: First of all, you're not talking about f''(t), you're talking about df(x)/dt, i.e. f''(x).

Let's stick on this. I ... think that x=f(t), that is, x=displacement. The graph of the displacement in relation to time puts x=f(t) at the axis of ...y, and t at the axis of...x. I used the term x because we say Δx and dx. And x is what they use at springs.
So you still think I am wrong? If yes, can you explain why?

Forget about physics. In maths we say f(t), so then we say f''(t). This is...wrong?

Last edited:
x=f(t) at the axis of ...y, and t at the axis of...x. I

No you're not wrong, becuase at the end of the day you can call your independent variable whatever you please. I was also not 100% in calling the function f(x) either.

The convential form for a mass-spring system would have a function called x that is expressed in terms of t. If you consider Hooke's law (which is where the ODE comes from)

F = -kx

k is a constant
x is position which changes with time... so x = x(t)
F is force, so thanks to Newton we can say F = ma

And of course you know that acceleration is the decond derivative of position. This is where mass gets involved, but those two constant terms (k and m) could be "lumped" into one constant with no physical significance. So when you rewrite the equation, you get

ma = -kx
letting K = k/m if neither change with time
a = -Kx
d^2x(t)/dt^2 = -Kx(t)
or if you prefer
x''(t) = -Kx(t)

Your are probably used to thinking of "x and y" axes which is true for y=f(x). Remember that "f" is just a name for a function. In this case you just have slightly different notation so the old "y-axis" is analogous to position "x" and the old "x-axis" is analogous to time "t". So we could say x=x(t) where the lhs "x" is a variable representing position and the rhs "x" is the name of the oscillatory function describing the position as it changes over time.

If you say x=x(t) is like you're saying f=f(t), which is used, but ...
x=f(t)
u=f'(t)
α=f''(t),
where α the acceleration.
Is this correct? See why I choose that as the most ...correct. Below I supposed (number of dt of one sec)=10, so when you suppose the number of dt greater and greater, the below table agrees with all definitions. And then it seems weird to say x=x(t), and I fear whether it's wrong because then you must say u=x'(t) ...anyway it's confusing for me.

(number of dt of one sec)=10<=>dt=1/10sec
u=(last dx)/dt
10metres/sec^2:
t --- x --- dx --- u ---du ---α=du/dt
0,1 - 0,1 - 0,1 - 1,0 - 1,0 - 10
0,2 - 0,3 - 0,2 - 2,0 - 1,0 - 10
0,3 - 0,6 - 0,3 - 3,0 - 1,0 - 10
0,4 - 1,0 - 0,4 - 4,0 - 1,0 - 10
0,5 - 1,5 - 0,5 - 5,0 - 1,0 - 10
0,6 - 2,1 - 0,6 - 6,0 - 1,0 - 10
0,7 - 2,8 - 0,7 - 7,0 - 1,0 - 10
0,8 - 3,6 - 0,8 - 8,0 - 1,0 - 10
0,9 - 4,5 - 0,9 - 9,0 - 1,0 - 10
1,0 - 5,5 - 1,0 -10,0 - 1,0 -10

However, I face problems with the f(t)=x, f'(t)=u, f''(t)=α, as it somehow seems right only when the initial speed is zero...Are you familiar with air resistance (drag)?

Last edited: