POV-Ray : Newsgroups : povray.off-topic : Reflections on ODEs : Reflections on ODEs Server Time
29 Jul 2024 00:25:34 EDT (-0400)
  Reflections on ODEs  
From: Invisible
Date: 26 Jul 2012 07:51:58
Message: <50112f5e$1@news.povray.org>
Suppose you have a weight attached to a spring. Each time you move the 
weight, the spring pushes or pulls it in the opposite direction, trying 
to return it to its starting point.

If we assume the spring follows Hooke's law, then the force increases 
linearly as the displacement increases. If we assume that the spring 
constant is unity, then we have

   force = -displacement

Now force = mass * acceleration, or (more usefully) acceleration = force 
/ mass. If we assume that the mass of our weight is unity, then we have

   acceleration = force

Putting these together, if we assume that f(t) computes the displacement 
at time t, then we have

   f''(t) = -f(t)

In other words, for any function describing the displacement of the 
weight over time, we must have that the second derivative of this 
function is equal to the additive inverse of itself. Here we have ended 
up with a differential equation describing a property that the weight's 
motion must obey. But that still doesn't actually /tell/ us how the 
weight moves. We just know what property to look for.

It is not immediately obvious what functions might have this property. A 
moment's reflection reveals that

   f(t) = 0

is a perfectly correct solution, since then f''(t) = 0 also, and clearly 
0 = -0. This corresponds to the weight remaining stationary for all 
eternity - a physically valid outcome, but not a very interesting one.

A few moments of further contemplation reveal that the derivative of sin 
is cos, and the derivative of cos is -sin. Thus, if we have

   f(t) = sin t

then it would follow that

   f''(t) = -sin t

which satisfies the required differential equation. By a nearly 
identical chain of reasoning, f(t) = cos t works just as well.

Both of these solutions correspond to the fact that if you pull the 
weight back and then let go, it oscillates back and forth. (We're 
ignoring friction, which IRL would eventually slow the system to a halt.)



Now suppose that by some bizarre mechanism, the spring actually pushes 
the weight in the direction it's already going, rather than back against 
it. Then our differential equation becomes

   f''(t) = f(t)

Again, f(t) = 0 is one valid solution. But supposing the weight /does/ 
ever move, it seems obvious that it would accelerate forever, without 
limit. And indeed, any elementary calculus textbook will reveal that 
there is precisely /one/ function who's derivative equals the original 
function. This function is exp. So if we write

   f(t) = exp t

then it follows that /all/ derivatives of f (including f'') would equal 
f. In other words, this solves our differential equation.



So here we have two differential equations. One represents a system with 
negative feedback, and produces oscillations in terms of sin and/or cos. 
The other represents a system with positive feedback, which grows 
exponentially. As you'd expect both systems produce very different 
behaviour, and hence both of them have very different-looking solutions.

...and then we recall Euler's relation: If you take the Taylor series 
expansion of exp x

   1 + x + x^2/2! + x^3/3! + x^4/4! + ...

and replace x with xi

   1 + xi - x^2/2! - x^3i/3! + x^4i/4! + ...

it splits into two series, one real, and one imaginary. And it /just so 
happens/ that these series exactly match the Taylor series for sin and cos:

   exp xi = cos x + i sin x

In fact, sin can be expressed in terms of exp, and exp can be expressed 
in terms of sin:

   sin(x) = (exp(xi) - exp(-xi)) / 2i

   exp(x) = sin(xi)/i + cos(xi)

Now I can't help but wonder... Is this a coincidence? Or some deep 
fundamental result? Is there some way of writing a solution to an 
equation like

   f''(t) = k f(t)

such that you get exp() or sin() depending on the sign of k?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.