Tuesday, June 27, 2017

Unizor - Ordinary Differential Equations - Hooke's Law





Notes to a video lecture on http://www.unizor.com

Higher Order Ordinary
Differential Equations -
Hooke'sLaw


Our next subject is Hooke's Law.
This law describes the force of a stretched or compressed spring.

Let's assume that we have a weightless spring horizontally lying on the frictionless table along an imaginary X-axis and fixed at the left end. Its free right end is at coordinate x=0 and there is a point mass m attached to this free end of a spring.
Then we stretch this spring by pulling the right end from a neutral position by certain length x.

Obviously, the spring exerts a force to compress back to a neutral position. The Hooke's Law states that within certain reasonable boundaries (no over-stretching) this force is proportional to a difference in length between a stretched string and a string in a neutral position.
This is expressed by the formula
F = −k·x
where F is the force exerted by a spring, x is a displacement of the free end of a spring from a neutral position, k is a positive constant that characterizes a spring (called a spring constant) and the minus sign signifies that the direction of force is opposite to the direction of displacement because, if displacement is positive (stretching), the force is directed towards negative direction of the X-axis and, if displacement is negative (compression), the force is directed towards positive direction of the X-axis.

Now recall Newton's Second Law that related the force and acceleration
F = m·a
where F is the force, m is the mass of an object and a is its acceleration.

From these two laws we conclude that
m·a = −k·x

Since x is a distance along the X-axis and a is an acceleration along this axis, that is a second derivative from a distance by time, we came up with the following differential equation
m·x''(t) = −k·x or
m·x''(t) + k·x(t) = 0 or
x''(t) + (k/m)·x(t) = 0
This is a second order ordinary differential equation. It is a little more complex than we considered in a lecture about acceleration and Newton's Second Law.
Let's try to solve it.

First of all, let us mention that even a simple guessing in this and many other cases is a good choice. Recall that first derivative of sin() is cos() and the first derivative of cos(), that is the same as the second derivative of sin(), is −sin(). So, the equation x''(t)+x(t)=0 has a solution x=sin(t). This is very close to what we have. Adding a factor α to an argument might help to satisfy multipliers in our equation:
if x(t)=sin(α·t) then
x'(t)=α·cos(α·t) and
x''(t) = −α²·sin(α·t)
and, therefore,
x''(t)+α²·x(t) = 0
Now we can choose α to satisfy α²=k/m, and the solution to our equation is found.

Guessing is good, when we can guess (as in this case), but guessing might not be successful and, even if you managed to guess one solution, it's not a guarantee that all solutions are found. By the way, if we start with cos(), we will also find a solution.
So, let's have some theory.

Our differential equation belongs to a class of linear ordinary differential equations of second order with constant coefficients and can be generalized as
x''(t) + p·x'(t) + q·x(t) = 0

As we saw above, functions sin() and cos() might be involved in a solution. Analogous quality of derivative being similar to a function itself is possessed by exponential functions. Recall also that exponential functions with complex exponent is related to trigonometric function through famous Euler's formula
eit = cos(t) + i·sin(t)
So, exponential functions, in some way, are more general than trigonometric, they encompass them.
Therefore, it's only natural to look for a solution in terms of exponential functions.
Let's try.

Assume, we are looking for a solution to our equation in the form x(t)=eλ·t, where λ might be any (including complex to accommodate trigonometric functions) number.
Then derivatives of this function are:
x'(t) = λ·eλ·t
x''(t) = λ²·eλ·t
Putting this into our equations, we get
λ²·eλ·t + λ·p·eλ·t + q·eλ·t = 0
Canceling eλ·t, we get a simple quadratic equation for λ called a characteristic polynomial of a given differential equation:
λ² + p·λ + q = 0
Since this equation always has two solutions λ1 and λ2 among complex numbers, we will have two particular solutions to our differential equation:
eλ1·t and eλ2·t
Finally, any linear combination of these two particular solutions will also be a solution (since our differential equation is linear and a derivative of linear combination of functions is a linear combination of derivatives).
Therefore, we can state the general solution to our differential equation:
x(t) = C1·eλ1·t+C2·eλ2·t
which depends on two unknown complex constants C1and C2, their values can be defined only if some initial conditions of the movement are given.

Let's get back to a movement of a spring.
Our initial equation
x''(t) + (k/m)·x(t) = 0
has a characteristic polynomial
λ² + k/m = 0
(where both k and m are positive) with two solutions:
λ1 = √(k/m)·i and
λ2 = −√(k/m)·i
where i²=−1 is an imaginary unit in the field of complex numbers.

Let ω = √(k/m).
Now we can represent the general solution to a movement of a spring based on the Hooke's Law as follows:
x(t) = C1·eiωt + C2·e−iωt
This expression can be easily transformed using Euler's formula into
x(t) = C1·cos(ωt)+i·C1·sin(ωt)+
+C2·cos(−ωt)+i·C2·sin(−ωt)


Since C1 can be represented as A1+i·B1 and C2 can be represented as A2+i·B2, where A1B1A2 and B2 are undefined unknown real numbers, the whole expression can be represented as
D1·cos(ωt) + D2·sin(ωt) + i·Z
where coefficients D1 and D2are any real numbers and i·Z represents purely imaginary part.

Since we deal with physics, we should exclude all imaginary solutions and leave only those, where D1 and D2 are real numbers.
So, the general physical solution looks like
x(t) = D1·cos(ωt) + D2·sin(ωt)
where D1 and D2 are undefined unknown real numbers.

In our experiment we have stretched a string by some known distance from a neutral position and let it spring back. That means, we know the initial position x(0)=d and initial speed x'(0)=0.
These initial conditions are sufficient to determine two unknown constants in our equation of a motion:
x(0)=d ⇒
⇒ D1cos(0)+D2sin(0)=d
⇒ D1 = d
x'(0)=0 ⇒
⇒ −ω·D1sin(0)+ω·D2cos(0)=0
⇒ D2 = 0

The final form of an equation of motion is
x(t) = d·cos(ωt)
where ω = √(k/m)k is a spring constant, m is a point mass at its free end and d is the initial distance we have stretched a spring from its neutral position.
As seen from this equation of motion, a free end of a spring with a mass attached to it will indefinitely oscillate around the neutral point.
The end.

No comments: