Chronology Current Month Current Thread Current Date [Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

# Re: [Phys-L] Mathematica question; stiff differential equation

• From: Carl Mungan <mungan@usna.edu>
• Date: Sun, 13 Dec 2020 13:22:22 -0500

Lots of great comments below, thanks.

I’ll follow up with some questions:

(1) We often say (for a conservative system like this one) that the mechanical energy is the first integral of the differential equation. In light of your comments, would you say this statement is misleading or at least incomplete?

(2) Let’s say it’s incomplete. We supplement it with our intuition; we tread carefully near turning points; we account for other things you’ve mentioned below. Nonetheless, there are plenty of problems that are more easily solved by directly proceeding to mechanical energy than by trying to solve Newton’s second law. Students will ask me sometimes how to tell which kinds of problems those are. I admit that even I am not always sure. A good example is objects rolling without slipping down an inclined plane. Solving either by conservation of mechanical energy or by using Newton’s second law (both for the translations of the COM and the rotations about the COM, or for the braver, by analyzing rotations about the instantaneous point of contact) works. It partly depends on what you’re immediately trying to find: Who wins the race? Time to descend? Speed (angular or translational) at the bottom? Minimum coefficient of static friction? If the incline is not planar but is instead curved (like a playground slide) then energy methods seem to gain the advantage for most of these questions.

(3) You hinted at, but didn’t elaborate on, Lagrangian methods as a third alternative. Would it be the “best of both worlds” scenario, in that it starts from energy ideas such as KE and PE, and yet it retains Newton second law ideas such as momentum? It does however leave off the constraint forces such as the normal force, needed if we want the minimum coefficient of static friction in the previous example, right?

There’s probably more that can be said or asked, but I’ll stop here. -Carl

On Dec 12, 2020, at 9:07 PM, John Denker via Phys-l <phys-l@mail.phys-l.org> wrote:

Hi --

Another couple of thoughts on the recalcitrant differential equation.

Last time I said "make a graph of what you know" at the start of the
exercise. That's always good advice. I also said beware of the
proximity of other solutions. We are about to see that concept return
in a big way.

This time let's plot something that we /didn't/ know at the outset.
That is, we use 20-20 hindsight to work backwards from the solution.
That's sometimes (not often, but sometimes) a good way to solve the
problem, and it is very often a way to /understand/ the problem after
it has been solved. In particular, we can work backwards all the way
to the starting point, and then identify the fewmets that should have
told us the situation was problematic.

Here's what we know:

1) Using 20-20 hindsight, we know the solution is h = ½ g t².

2) At the beginning of the exercise we wrote h' = √(2 g h). The RHS
is clearly a function of h. Everything we told the computer was
expressed as a function of h.

3) We are only interested in solutions for positive t and positive h,
but the computer doesn't know this. It can't read minds. Also, we
must consider the possibility that the calculation of h is not quite
exact. In particular, suppose at the point where h is supposed to be
zero, our best estimate of h comes out slightly negative. Then the
square root becomes imaginary. This is a huge fewmet!

Whenever you see a variable that might go imaginary behind your back,
you should say hmmm, the last ten times this happened I got badly
burned; maybe I should be careful here, or start over and reformulate
the whole problem so this doesn't happen. At the very least, it's
time to haul out some additional machinery, starting with a
root-locus plot, like this:
https://www.av8n.com/physics/img48/dt-dh-root-locus.png

4) You can see that as the points get closer to the origin, points
that are equally spaced in terms of h become disproportionately far
apart in terms of t. In fact dt/dh becomes infinite. This is

5) The equation of motion was derived from an energy principle.
That's always asking for trouble. The momentum will tell you the
kinetic energy, but the kinetic energy will not (in general) tell you
the momentum. (Given the *Lagrangian* you can figure out the
momentum, but that's the answer to a different question.)

Given a certain h such as h=1, there are two possible times when that
could occur, namely t=-1 (inbound, shown in red in the diagram) and
t=+1 (outbound, shown in blue in the diagram. This double-valuedness
is a huge worry. This is a /proximity/ issue. The outbound
trajectory is awfully close to the inbound trajectory.

6) The trajectory exists only for h≥0, but the universe as a whole
still exists even for h<0. For example, negative h could arise due
to a miscalculation. There are always uncertainties. We can revisit
item 4, because a tiny amount of negative h creates a huge amount of
imaginary t.

We can also revisit item 5, because the solution for positive t is in
proximity to negative t *and also* to imaginary t, as we now see. So
the "proximity" issue is even worse than you might have imagined when

You know and I know that we're not interested in imaginary-time
solutions, but as far as the computer knows, the system could have
arrived at h=0 from below, via imaginary time.

===================

We needed to know the solution to construct the root-locus plot, but
we have now learned from it a bunch of ideas that we can apply to the
original unsolved problem, and in particular to a wide range of other
problems that we may encounter.

a) Phase space is a thing. Phase space is your friend. It does not
get nearly enough emphasis in most classes nowadays. If you know
what's going on in phase space you can figure out the energy, but not
vice versa. Trying to derive the equation of motion from the energy
is asking for trouble. It's better to try to formulate things in
terms of phase space starting from Day One. It's worth taking some
time to reformulate them if necessary. Symplectic integrators are

b) Square roots may seem familiar and innocuous, but near the origin
they are asking for trouble, and they are representative of a wider
class of troublesome things. For starters, √h is not differentiable
at h=0. Trying to solve differential equations at places where
things are not differentiable is no fun.

c) If h = t² that does *not* mean that t=√h. The correct solution is
t=±√h. That ± sometimes matters a lot. That may sound like "duh"
... but I have seen physics professors at Big Name universities fool
themselves this way.

d) Near h=0, not only do you need to worry about negative-t solutions
(which may or may not be physically significant), you also need to
worry about imaginary-t solutions (which may or may not be physically
significant). The /equation/ doesn't know what's significant and
what's not. It can't read minds. "Beware the proximity of other
solutions."

When in doubt, draw the root-locus plot. You might discover some
new physics. Sometimes the analytic continuation of your equation
has some hitherto-unappreciated meaning.

Here's a famous example: Suppose d/dt d/dt y = y. Suppose you know
you are looking for a decaying exponential solution. The differential
equation is notoriously impossible to solve numerically, because
there is also an exponentially *increasing* solution, and no amount
of fiddling with the initial conditions will keep that solution from

e) The fact that dh/dt goes to zero may seem innocuous, but the fact
that dt/dh goes to infinity should make your hair catch on fire.
Using good old physics intuition you may think of the situation in
terms of functions of t, but the computer can't read minds. The
equation that the computer sees is a function of h. Yesterday's graph
https://www.av8n.com/physics/img48/dt-dh-integrator.png
as well as the dot-spacing in today's graph
https://www.av8n.com/physics/img48/dt-dh-root-locus.png
should raise the alarm.
_______________________________________________
Forum for Physics Educators
Phys-l@mail.phys-l.org
https://www.phys-l.org/mailman/listinfo/phys-l

-----
Carl E. Mungan, Professor of Physics 410-293-6680 (O) -3729 (F)
Naval Academy Stop 9c, 572C Holloway Rd, Annapolis MD 21402-1363
mailto:mungan@usna.edu http://usna.edu/Users/physics/mungan/