[Scrap] How Long Can You Balance a Pencil?



How Long Does It Take for a Pencil to Tip Over?


Henry from Minute Physics has another great video. In this one, he talks about balancing a pencil on it’s point. He makes the claim that if a 10 cm long pencil was pushed at the top a distance of 0.0001 atoms from equilibrium, it would only take 3.1 seconds to fall over.
Someone once said:
Trust, but verify.
I trust Henry, but I should also verify Henry. I will calculate the time it takes for a pencil to fall over.

Falling Pencil Physics

Suppose that there is a pencil with the tip pointing down on a piece of paper and starting just barely leaning to one side. I’ll assume that the pencil can rotate, but the tip can’t slide to the side (but I don’t think this would change the falling time by much).
Here is my starting force diagram.
Summer 14 Sketches key
There are really only three forces on this pencil: the gravitational force, the normal force of the table pushing up and a frictional force to prevent the tip from sliding. Quick quiz question – while the pencil is falling over, how does the normal force compare to the gravitational force? I’m not going to tell you the answer.
Ok, but how do you analyze the motion of this falling pencil? Honestly, it’s not so simple. Since this is a rigid object and not a point mass, we have to take into account both the forces and the torque on the pencil. However, since the pencil is constrained to just move in the θ direction, we can describe this with just one variable (θ).
If I take the pencil point to be the rotation point, I can write the angular momentum principle for the pencil. As a reminder, the angular momentum principle says:
La te xi t 1
In short, this says that the torque on an object changes its angular momentum. The angular momentum depends on the moment of inertia, I. I won’t go into all the details here, but if you want a basic look at this idea I recently added this into a chapter in my ebook – Just Enough Physics. I will say this – angular momentum is actually a vector. But in this case, that vector does not change directions. That means that I can represent the angular momentum as the moment of inertia multiplied by the time derivative of the angle θ.
I can put this stuff together, but I need two things. First, I need the torque. The only force that exerts a torque will be the gravitational force. The gravitational force actually pulls on all parts of the pencil but you get the exact same motion with just one force at the center of mass. This means that I can write the torque (scalar version) as:
La te xi t 1
Second, I need an expression for the moment of inertia for a pencil. If I just assume it’s a uniform rod of length L and mass m, the I can write the moment of inertia for this pencil as it rotates about its tip:
La te xi t 1
Putting all of this together, I get:
La te xi t 1
Of course, I really just want everything in terms of one variable. The angular velocity (ω) is the time derivative of the angle. This means I can write:
La te xi t 1
This is the key right here. I have an expression that gives a relationship between the angle (θ) and the second derivative (with respect to time) of this angle. That’s a differential equation. But wait! This isn’t the same equation in the Minute Physics video. Here is a screenshot from the video.
How Long can you Balance a Pencil    you Tube
Screen shot from Minute Physics youtube video.
The “double dot” on top of the theta is just short hand notation for “second derivative with respect to time”. This equation is the same except for the 3/2 fraction in front of my expression. Why are they different? Well, if you put all of the mass at the end of the pencil instead of evenly distributed, the torque would be mgL sinθ. Also, the moment of inertia would just be mL2. So, this is the equation for an inverted pendulum with all the mass at the end. I’m not sure which version Henry used in his calculation. I will start with the one for the pencil. I suspect he used the 3/2 version but wrote the inverted pendulum expression so that he wouldn’t have to explain where the 3/2 comes from (to keep the video short).
Back to the differential equation. I am going to solve this with a numerical solution. Here is the basic plan.
Start with a known angle and angular velocity (initial conditions). Break this motion into tiny steps of time. During each step:
  • With the given angle, calculate the second derivative (angular acceleration) of the angle from the expression above.
  • Assume a constant angular acceleration and use this to calculate the new angular velocity.
  • Assume a constant angular velocity and use this to calculate the new angle.
  • Update time.
  • Repeat.
Yes. It’s that simple. Here is www.wired.com calculation looks like in Glowscript – yes, you can run it yourself and see the code if you like.
Pencilfall 2
Image: Rhett Allain
It looks like things are working out ok, but this doesn’t really verify the Minute Physics statement. I guess this would be fairly easy to check. Here is are the initial conditions from the video.
How Long can you Balance a Pencil    you Tube
Screen shot from Minute Physics youtube video.
So, how big is an atom? This is a tough question, but I am just going to estimate this at 10-10 m. That means that if the pencil has a length of 10 cm (0.1 m), then the initial angle would be 10-13 radians. Using that angle, I get the following plot of angle vs. time.
Glow Script ide and Amazon Kindle Direct Publishing  get Royalty Reports for Your kdp Books
I included the final time – you can see it there at the bottom: 3.539 seconds. This is more than 3.1 seconds (but close). Oh, if I change it to an inverted pendulum, it gives a time of over 4 seconds.
But is this calculation (mine) legit? Let me move over to python since I don’t really need an animated pencil moving. I just need to calculate the final time. Really, it’s not such a complicated program. Here is the whole thing.
 Pencil Fall Time py    Users Rjallain Projects Python Pencil Fall Time py
Running this as it is, I get a falling time of 2.566 seconds. If I remove the 3/2 and rerun, I get 3.143 seconds. Oh snap. This seems to indicate that Minute Physics used the wrong equation. But why is this different than the time from glowscript? Who knows – but let’s look at this python script and test it.
One of the things that can make a difference is the time step. If I change the time interval between calculations to something large – like 1 second, then the calculation probably won’t give an accurate answer. But how small of a time interval is small enough? Let’s make a plot. This is the falling time for the pencil with different time intervals (yes, I have to make the script a function and run it a bunch of times).
Obviously I went too far. From this graph you can see that once the time step gets down to about 0.01 seconds and smaller, the tip over time doesn’t really change. This suggests that my original choice of 0.001 seconds was more than accurate enough. I think I read somewhere in the Matter and Interactions introductory physics text that you can use the following rule of thumb. If you decrease your time interval by half and you get essentially the same value from your calculation, then your time step is small enough.
Hopefully you have noticed that both of these last plots have a log scale for the horizontal axis. With the log scale, you can see the detail of the smaller horizontal values. Also, it is fairly easy to see that as the starting angle gets smaller and smaller the tip over time seems to go to around 2.6 seconds (for the pencil). For the inverted pendulum, the tip over time goes to somewhere around 3.1 seconds.
It seems it was a wise decision to verify Minute Physics.
Trust, but verify.
A few final points:
  • Henry’s main claim was that a pencil is unstable.  Even if it is ever so slightly off balance, it falls over.  This point is still true even though he used an inverted pendulum instead of a pencil.
  • Your homework is to find out how long it takes the pencil to fall over if the tip can slide along the table.  Assume a coefficient of kinetic friction between the tip and the table with a value of 0.4.
  • Longer pencils take longer to fall over.  Trust this, but verify it.
As a bonus, here is a video of me balancing things for a long time ago.
Really, it’s a pretty simple trick if you just practice a little bit. I like to encourage everyone to learn a few “tricks” – you never know when you need to entertain someone.

댓글

이 블로그의 인기 게시물

환경개선부담금

[DevTip] Windows에서 tail 쓰기...