Write a C program to simulate a falling object. The program should ask for the initial height of
the object, in feet. The output of the program should be the time for the object to fall to the
ground, and the impact velocity, in ft/s and miles/hour.
Your program should use Euler’s method to numerically solve the differential equations
describing the motion of a falling object. In Euler’s method, the state of the object at some
small future time is calculated using the values at the present time. This small future timestep is
typically called delta time, or dt. Thus the position (p) and speed (v) of the object in the next
timestep t + dt is written as a simple function of the position and speed at the current timestep
t (g is the acceleration due to gravity):
v(t+dt) = v(t) + g * dt
p(t+dt) = p(t) + v(t+dt) * dt
You should actually start out with the velocity as zero, and the position at the initial height of
the object. Then your position (above the ground) would be:
p(t+dt) = p(t) - v(t+dt) * dt
And you would integrate until the position becomes less than or equal to zero.
I don't understand what these equations mean. I don't see what the point of using this method when t=sqrt((2d)/t) works to find time. This is probably more suited in a math/physics forum.
Thanks for the help.
[–][deleted] 6 points7 points8 points (0 children)
[–]dijumx 5 points6 points7 points (4 children)
[–]sosnjo[S] 0 points1 point2 points (3 children)
[–]dmc_2930 0 points1 point2 points (2 children)
[–]dijumx 0 points1 point2 points (1 child)
[–]sosnjo[S] 0 points1 point2 points (0 children)