Day 30: Brute Force Computations vs. Calculus

Work by gravity Glowscript

AP Physics C: We talked about work done by a non-constant force, using an example of a 1000-kg space rock falling to the surface of the Earth from a distance of 10 earth radii from the center of the earth. Without telling them how to approach the problem, I wanted to see what they would do on whiteboards first. A couple groups incorrectly assumed the force was constant the whole time. Other groups realized the force wasn’t constant and tried to figure out some kind of “average force” to use — one group used the force at the halfway point as the average force while another group averaged together the forces at the initial separation and final separation. Neither approach works well, so we talked about breaking the problem up into many small steps. That’s when wrote a program in VPython/Glowscript to automate that brute force method (program above, output below). We also played around with the step size to see the effect on the accuracy of the answer. How big could the step size be and still have an acceptable answer?

Work by gravity OUTPUT Glowscript

Then we solved the same problem using calculus. Answer below.

Work by gravity OUTPUT WolframAlpha


And we get the same answer … hooray!

I really like using VPython for these kind of problems because it really helps kids think about integration as sum of very tiny parts


About Frank Noschese

HS Physics Teacher constantly questioning my teaching.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: