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] simple Mathematica question (one more typo fixed)



The problem is that Mathematica knows mathematics but not physics. As stated, your problem is ill posed because you start it off at a point at which the derivative does not exist. Perhaps there is a way in Mathematica to start off your problem at y=100-epsilon for epsilon>0 and then take the limit as epsilon approaches zero.
Best,
Francois

Sent from my iPad

On Dec 8, 2020, at 9:17 AM, Carl Mungan via Phys-l <phys-l@mail.phys-l.org> wrote:

Since people seem to be in a talkative mood today, maybe somebody can help me a with a simple (?) matter. It involves dropping a rock. I’m using Mathematica but you don’t have to be an expert in that to see the issue.

If we use conservation of mechanical energy, then we find the downward speed of the rock (choosing upward to be +y with the ground at y=0) is v_y = - Sqrt[2*g*(y0-y)].

Suppose we choose y0 = 100 m and g = 9.8 m/s/s and ask Mathematica to do a numerical solution from t = 0 to 4 s:

s = NDSolve[{y'[t] == -Sqrt[2 9.8 (100 - y[t])], y[0] == 100}, y, {t, 0, 4}]

Plot[Evaluate[y[t] /. s], {t, 0, 4}]

Can you guess what happens here? It’s a failure. The rock just sits at rest in the air at 100 m.

If I instead start the evaluation at 99 m height, so the rock has already fallen 1 m, then it works just fine:

s = NDSolve[{y'[t] == -Sqrt[2 9.8 (100 - y[t])], y[0] == 99}, y, {t, 0, 4}]

Plot[Evaluate[y[t] /. s], {t, 0, 4}]

But I want to start the rock at 100 m. How do I nudge the rock so it starts falling?

I must be missing something. My actual problem is like this, but more complicated. The above is just a test case for debugging purposes.

Who can tell me what I need to do? -Carl

ps: Converting to acceleration does work but I don’t see why I should have to do that:

s2 = NDSolve[{y''[t] == -9.8, y[0] == 100, y'[0] == 0}, y, {t, 0, 4}]

Plot[Evaluate[y[t] /. s2], {t, 0, 4}]

-----
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 <mailto:mungan@usna.edu> http://usna.edu/Users/physics/mungan/ <http://usna.edu/Users/physics/mungan/>
_______________________________________________
Forum for Physics Educators
Phys-l@mail.phys-l.org
https://www.phys-l.org/mailman/listinfo/phys-l