+
Numerical Solution to the Nonlinear Differential Equation for an Object Dropped High Above Earth

Faculty Commons material developed by Brian Woodahl - Published February 23, 2023

Using Mathematica®, an example for finding numerically, the position, speed, and acceleration as a function of time for an object dropped from high above the surface of Earth is presented. The object is subject only to the downward pull of gravity (no air friction, no Coriolis effects, and we take the mass of Earth to be much greater than the object’s mass). Using Mathematica®, one can relatively quickly generate the numerical solution to the nonlinear differential equation that describes the motion of the object in free-fall: -- G M m = m r^2 r'' Taking the gravitational mass and inertial mass to be identical, they (of course) cancel and we are left with the two numerical variables: the gravitational constant, G, and the mass of the Earth, M. The position, as measured from Earth’s center, is r. We take the initial velocity, r'(0), to be zero (but this could be set to any value). To familiarize ourselves with the numerical solutions, we first look at the case where the object is dropped at a location relatively close to the surface, 1000 meters. In that case, it is sometimes convenient to define: g R^2 = G M Where R is the radius of Earth and g is the local (surface) acceleration due to gravity. Working in MKS units, we have the following: M = 5.97219 × 10^24 G = 6.6743 × 10^(-11) R = 6.3781 × 10^6 g = 9.79843 Let us use h for the initial height (above the surface) and dist = R+h, to be the initial distance from Earth’s center. For h=1000, the object will strike the Earth in about 14.3 seconds. We use the NDSolve function on the interval of 0=t =15, and specify the initial velocity to be zero and the initial position dist =R+h=6.3791 × 10^6: result = NDSolve[{-g R^2 == r[t]^2 r''[t], r[0] == dist, r'[0] == 0}, r, {t, 0, 15}] NDSolve returns an interpolating function. It is often easier to define a shortened function, say f(t) as this interpolating function using: f[t_] = (r /. First[result])[t] This returns the position as measured from Earth’s center as a function of time. But for the altitude, or position above Earth’s surface, let us also define: a[x_] := f[x] - R This function simply subtracts the radius of the Earth. We then plot a[t], the position as measured relative to the surface, on the interval between 0 = t = 15: ![](images/HighAltitudeFallingObject/image1.jpeg "") Using findAllRoots[a[t], {t, 12, 16}, "ShowPlot" -> False][[1]] returns the time of impact as 14.29 seconds. I have provided the code for findAllRoots below (it is not a built-in Mathematica® function). To obtain the velocity is simple, just use a’[t]. Using Abs[a’[14.29]] returns 140 m/s as the speed at impact. (Note: this is well above the terminal velocity of around 53 m/s.) To obtain the acceleration, the Mathematica® syntax is a’’[t]. Using Plot[a''[t], {t, 0.2, 15}, PlotRange -> {{0.2, 15}, {0, -20}}, Frame -> True] we can plot the basically constant acceleration: ![](images/HighAltitudeFallingObject/image2.jpg "") We then repeat the entire exercise, but now put the initial position of the object well above the surface, at h=10^7, (10,000 km) and as before, take the initial velocity to be zero. The position versus time plot (code included below) is: ![](images/HighAltitudeFallingObject/image3.jpg "") And finally, using Plot[a''[t], {t, 1, 3250}, PlotRange -> {{5, 3260}, All}, Frame -> True], we plot the acceleration as a function of time: ![](images/HighAltitudeFallingObject/image4.jpg "") (The entire Mathematica® code for all the examples is provided.) Learning Objectives Understand using both Newton’s (i) Second Law and his (ii) Law of Gravity. Understand the governing differential equation for an object falling in a non-constant gravitational field. Understand the various length scales involved in setting up a numerical equation. Understand the MKS (meter-kilogram-second) system of units in physics. Using Mathematica®, understand how to numerically solve nonlinear differential equations. How to present simple plots of the kinematic variables: position, speed, and acceleration. Understand that for locations near the surface of the Earth, one can approximate the acceleration as a constant. Understand basic Mathematica® syntax. Possibly enhance the code, by adding in the effects of air friction on the motion of the object or the effects of the Coriolis force.

This material is freely available to registered verified educators.

Login or register as a verified educator for free to access instructor-only material.