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] |

*From*: Brian Whatcott <betwys1@sbcglobal.net>*Date*: Tue, 8 Dec 2020 17:18:12 +0000 (UTC)

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

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

~ avoids the sqrt(0) trap. On Tuesday, December 8, 2020, 10:23:21 AM CST, 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*(y-y0)].

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

-----

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

**References**:**[Phys-L] simple Mathematica question (two typos fixed)***From:*Carl Mungan <mungan@usna.edu>

- Prev by Date:
**[Phys-L] simple Mathematica question (one more typo fixed)** - Next by Date:
**Re: [Phys-L] simple Mathematica question (one more typo fixed)** - Previous by thread:
**Re: [Phys-L] simple Mathematica question (two typos fixed)** - Next by thread:
**[Phys-L] simple Mathematica question (one more typo fixed)** - Index(es):