Analytical solution for freefall....

Click For Summary

Discussion Overview

The discussion revolves around the analytical solution for freefall in a gravitational field, specifically examining the discrepancies in calculations using MATLAB. Participants explore the validity of formulas, convergence of series, and the challenges in deriving an analytical solution for the motion of an object under gravity.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant presents a MATLAB program to test an analytic solution for freefall distance but encounters unexpected results, suggesting a potential error in the formula used.
  • Another participant points out a typo in the exponent of the formula and suggests that series used may have poor convergence properties, recommending testing with different truncation points.
  • A participant corrects the exponent and observes that the results still indicate an upward motion, raising questions about convergence as time increases.
  • There is a suggestion to use proper notation for exponentiation to avoid misinterpretation in MATLAB.
  • Some participants mention that previous threads have discussed analytical solutions for position versus time, indicating the complexity of the problem.
  • A later reply introduces the idea of using Kepler's equations to approach the problem, noting that as eccentricity approaches 1, the orbit becomes a straight line, which could be relevant for plotting a 1-D trajectory.
  • Concerns are raised about the readability of mathematical expressions in the posts, with suggestions to use LaTeX for clarity.
  • One participant reflects on the challenges of programming and debugging, emphasizing the learning process involved in verifying the calculations.
  • Another participant raises a concern about precision issues in MATLAB calculations, suggesting that the mass of the object being dropped may not significantly affect the results due to double precision limitations.

Areas of Agreement / Disagreement

Participants express various viewpoints on the correctness of the formulas and the convergence of the series. There is no consensus on the validity of the analytical solution or the best approach to derive it, indicating that multiple competing views remain.

Contextual Notes

Limitations include potential precision issues in MATLAB calculations, dependence on the accuracy of the series used, and unresolved mathematical steps regarding convergence and the applicability of Kepler's equations.

Will Flannery
Messages
121
Reaction score
36
The freefall wiki entry wiki Freefall has an analytic solution for freefall distance in a gravitational field, but ... it doesn't seem to work ... at least i can't get it to work ... here is my MATLAB program to test it ...
clear
G=6.7e-11; % gravitational constant m^3/(kg*s^2)
mEarth = 5.9742e24; % mass of Earth in kg
rEarth = 6.378e6; % radius of Earth in m

% drop a 1kg ball from 100m above the surface of the earth
mu = G*(mEarth + 1);
y0 = rEarth + 100;

t = 1;
x = (3/2*(pi/2-t*sqrt(2*mu/y0^3)))*2/3;
y1 = y0*(x - x^2/5 - 3*x^3/175 - 23*x^4/7875 - 1894*x^5/3931875 - 3293*x^6/21896875 - 2418092*x^7/62077640625);

y0-y1

ans =

9.5639e+04

So, the apple fell 95000 m in the 1st second ... (or I made a mistake)
I tried to check the references, the first has a lot of formulas but not the one above, and the second is behind paywall (The Physics Teacher) and the abstract does not look promising.

Is there an analytic formula anywhere ?
 
Last edited:
Physics news on Phys.org
Your definition for x has a typo in the exponent at the end. As an aside, I recall a lot of these series having terrible convergence properties. You might try doing the calculation truncating the inverted series at different powers to see if the answer varies wildly.
 
Thanks, corrected ...
x = (3/2*(pi/2-t*sqrt(2*mu/y0^3)))^2/3;

However, now the apple is falling upwards ...

y0-y1 = ans =

-2.2703e+04

The last term in the series ... 2418092*x^7/62077640625
ans =

0.0028

but ... *y0 = 1.8177e+04

So, it's a long way from converging ... However, as t increases, x decreases and convergence improves, so when t = 500 the last term (including multiplication by y0) is 0.1935 ! So, is it converging to the true value ?
 
Last edited:
Try ^(2/3). a^2/3 is interpreted as ##a^2/3##, but you want ##a^{2/3}##.
 
Last edited:
  • Like
Likes   Reactions: davenn
there are a couple of old threads here where an analytical solution for position vs time is derived. It is messier than one might imagine.
 
Ibix said:
Try ^(2/3). a^2/3 is interpreted as ##a^2/3##, but you want ##a^{2/3}##.
By Jove ! ... and I've only been Matlabbing for 100 years !

G=6.7e-11; % gravitational constant m^3/(kg*s^2)
mEarth = 5.9742e24; % mass of Earth in kg
rEarth = 6.378e6; % radius of Earth in m

mu = G*(mEarth + 1);
y0 = rEarth;

t = 1;
x = (3/2*(pi/2-t*sqrt(2*mu/y0^3)))^(2/3);
y1 = y0*(x - x^2/5 - 3*x^3/175 - 23*x^4/7875 - 1894*x^5/3931875 ...
- 3293*x^6/21896875 - 2418092*x^7/62077640625);

y0-y1 = -2.9134e+04
y0*2418092*x^7/62077640625 = 1.3488e+04

so it's still not converging on the high end ...
for t = 500
y0 -y1 = 1.3217e+06
y0*2418092*x^7/62077640625 = 296.6925

So, it's better but still not so good.
Conclusion - there are not enough terms in this thing to tell if it works or not (or there is yet another bug ... )
 
Last edited:
vanhees71 said:
Just use LaTeX, and one can read you math!

https://www.physicsforums.com/help/latexhelp/
That's not math, that's MATLAB.

In any case, now the question is, why does every book ignore the problem of an analytical solution for the 1-D gravity problem (as noted in the ref. in the wiki article, the guy looked at 100 physics books) and what is the solution?

From the reference in the wiki article, the approach to a solution is thru Kepler's eq. Note that when eccentricity e approaches 1 in Kepler's eq, the orbit does not approach a parabola, Kepler's original eq. only works for ellipses, and as e -> 1 the orbit gets flatter and flatter and when e = 1 you get a straight line !, I just plotted one, So, apparently we can use either a numeric or analytic solution to Kepler's eq, with e = 1, to plot a 1-d trajectory. And so the questions for the day is ... how?

So, if we drop a ball from a height of 100m, a = 100+rEarth and we can plot the trajectory ...
(1.5 hours later) ... that seems to work ...
clear
G=6.7e-11; % gravitational constant m^3/(kg*s^2)
mEarth = 5.9742e24; % mass of Earth in kg
rEarth = 6.378e6; % radius of Earth in m

a = 100+rEarth;
T = sqrt(a^3 /(G*mEarth/(4*pi^2))); % from Kepler's 3rd Law
e = 1;

N=100;
for i = 1:4
E = 2*pi*(i-1)/N + pi; % Eccentric anomaly, start at apogee
M = E - e*sin(E); % Mean anomaly
t(i) = M*T/(2*pi)-T/2; % M(t) = 2*pi*t/T
x(i) = a*cos(E);
end

plot(t,-x-rEarth) % invert graph
 
  • Sad
Likes   Reactions: weirdoguy
Why are you writing when you don't want to be read? SCNR.
 
  • #10
vanhees71 said:
Why are you writing when you don't want to be read? SCNR.
? That doesn't make sense, I want it to be read... even debugged if necessary ...

Generally, things become much clearer when you actually have to program them and check if they work ... For example, it took me over an hour, and many corrections, to get that program to work.
 
  • #11
If it's code, put it in code tags.
Matlab:
X=1 % It's even got a syntax highlighter
 
  • Love
  • Like
Likes   Reactions: Nugatory and vanhees71
  • #12
If it's code, put it in code tags.
Code:
SCNR
 
  • #13
EDIT: after thinking for a few more minutes, I think my concern is bogus. I think my post isn't worth reading, but don't like to delete posts since it feels dishonest...

I know this is a very old thread, but I just stumbled across it. If you still care about this it seems to me that you have a precision problem. Matlab uses double precision by default, so mEarth+1=mEarth. The smallest mass you could use and not get this problem will be the order of 1e9 kg. Now the value of ##\mu## doesn't change the result, but you may have similar problems with other portions of this calculation as well. Have you looked at the orders of magnitude of each of the terms in your sum?

I have certainly run into cases like this in my work on numerous occasions, where a pretty analytical formula is completely useless for practical calculations. Sometimes using appropriate numerical techniques is much more practical. jason
 
Last edited:
  • Like
Likes   Reactions: Delta2

Similar threads

  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
4
Views
4K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 6 ·
Replies
6
Views
30K
Replies
9
Views
17K
Replies
4
Views
5K