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] solving an energy equation



Got it. But if it is a one DOF problem, is there any possibility of doing a "Lagrangian-in-spirit" analysis where you simply numerically the component of Newton's second law along the surface?

Yes, another list member pointed that out offline and you're quite right: it does in fact reproduce Lagrange's equation, as one would expect.

But I'm still bothered by the question of whether something is lost in the energy approach. Let's go back to the example of a ball thrown vertically upward with initial speed v0.

conservation of energy => (dy/dt)^2 = v0^2 - 2gy

This has a sign ambiguity in that dy/dt is a double-valued function of y.

It would appear something is missing. However, try differentiating the energy equation:

2(dy/dt)(a) = -2g(dy/dt)

If you cancel 2(dy/dt) from both signs, you recover N2L, which has NO sign ambiguity in it.

To put it another way, Mathematica integrates (d^2y/dt^2) = -g with no problem, but gets stumped trying to integrate the energy equation. If anyone would like to try it, here's the code, where I chose g = v0 = 1:

sol1 = NDSolve[{y''[t] == -1, y[0] == 0, y'[0] == 1}, y, {t, 0, 2}]
Plot[y[t] /. sol1, {t, 0, 2}]

sol2 = NDSolve[{(x'[t])^2 == 1 - 2x[t], x[0] == 0}, x, {t, 0, 2}]
Plot[x[t] /. sol2, {t, 0, 2}]

The first pair of lines produces the expected parabola, the second pair produces a bunch of error messages. If you replace the second pair instead with the following, you do get a correct half parabola:

sol2 = NDSolve[{x'[t] == Sqrt[1 - 2x[t]], x[0] == 0}, x, {t, 0, 1}]
Plot[x[t] /. sol2, {t, 0, 1}]

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