## Double pendulum roller coaster FIXED

My last post was wrong. I’m to blame. But in thinking about it and talking about it with with lots of helpful friends I ended up learning a ton. Here’s the upshot: There were kinks in the roller coaster loop that led to integration mistakes on the part of Mathematica. Thanks to a great suggestion from my friend Craig I smoothed those out:

The blue track is the one with kinks in it. The orange one is the used for the simulation in this post

And now the simulation animation looks like this (there’s some extra annotation that I’ll talk about below):

The green dot is the center of mass of the system. The orange arrow is the normal force. The purple arrow is the direction that the center of mass is traveling.

Note first that the system never gets above the dotted green line, which was my (mistaken) idea from the last post. This post will try to talk about what I learned about whether the normal force does any work (which was my mistaken explanation in the last post).

The track exerts a force on the red ball to keep it on the track. Gravity and the connection to the first black ball are yanking on that ball and the track does whatever it has to in order to ensure that the red ball stays on the track. My argument from the last post boils down to this: The normal force is an external force to the system of three balls. That system has a center of mass that I can pretend the external force acts on. If the center of mass is moving perpendicularly to the normal force (as would happen with just the red bead), there would be no work. But if the center of mass is moving at times slightly parallel to the normal force, then there would be some work. It turns out there’s really nothing wrong with that description. However, assuming that changes the kinetic energy of the system is wrong. What it does (as again my friend Craig suggested) is it changes the translational kinetic energy of the system (basically the kinetic energy of the system if you replaced it with all the mass being at the center of mass). However, the total kinetic energy of the system is both the translational and rotational kinetic energy. What I intend to discuss here is that the effect on the rotational kinetic energy due to the normal force is exactly the opposite of the effect on the translational kinetic energy.

First a quick plot. This shows in blue the time derivative of the translational kinetic energy of the system (subtracting out the effects of gravity) and in orange the work per unit time that the normal force does on the system:

The comparison of the rates of change of the translational kinetic energy (without gravity effects) and the work that the normal force does on the system.

Actually, you don’t see the orange because, to the accuracy of the thickness of the lines, the orange is completely underneath the blue.

Let’s try to understand what’s going on. Consider first the time rate of change of the kinetic energy of the system:

$\frac{d}{dt}\left(\frac{1}{2}\sum_i m_i v_i^2\right)=\frac{d}{dt}\left(\frac{1}{2}\sum_i m_i \vec{v}_i\cdot \vec{v}_i\right)$

The derivative can come right into the sum, and the vector product rule gives us:

$\frac{d\text{KE}}{dt}=\sum_i m_i \vec{a}_i \cdot \vec{v}_i=\sum_i \vec{F}_i\cdot \vec{v}_i$

where I’ve used Newton’s second law in the last step. Now the normal force is only “attached” to the red bead, but that’s the one bead that’s guaranteed to be moving perpendicular to the normal force. So the contribution to the time change of kinetic energy due to the normal force is indeed zero! Hence my last post is wrong.

But what about this business with the translational kinetic energy? We tell our students all the time that they can think of all forces as acting on the center of mass. In other words, the change of momentum of the center of mass is due to the collection of all external forces. Those forces will do work if they act, at least partially, in the direction that the center of mass is traveling. In the animation above the purple arrow shows the direction that the center of mass is traveling. You can see that it doesn’t always point along the track. That means that it’s not always perpendicular to the normal force. Hence work is done on the center of mass. But that just affects the translation of that center of mass, not any rotation about it. To see the whole story, let’s redo the last calculation using a coordinate system centered on the center of mass. For those variables, I’ll use primes. First I’ll start with an expression for the kinetic energy:

$\text{KE}=\frac{1}{2}\sum_i m_i (\vec{v}_\text{cm}+\vec{v}_i')\cdot(\vec{v}_\text{cm}+\vec{v}_i')$

Now when you do the FOIL of that dot product, two of the terms go to zero (that’s the beauty of using the center of mass, by the way) and you’re left with:

$\text{KE}=\frac{1}{2} M V^2+\frac{1}{2}\sum_i m_i \vec{v}_i'\cdot \vec{v}_i'$

where M is the total mass of the system and V is the velocity of the center of mass. Now, let’s consider doing a time derivative of that. For the first term you’ll get exactly what I was talking about above. In other words you’ll get the dot product of the total external forces and the velocity of the center of mass.

$\frac{d}{dt}\text{KE}=\sum_i \vec{F}_i\cdot \vec{v}_\text{cm}+\sum_i m_i \vec{a}_i\cdot \vec{v}_i'$

Now here’s a trick. Let’s re-express the velocity back into the normal frame (and use Newton’s second law again) for the second term above:

Here’s where the magic happens. The normal force is only applied to the particle on the track. But it’s velocity is perpendicular to the normal force by definition. So the first term in the parenthesis yields a zero. What we’re left with is:

$-\sum_i \vec{F}_i\cdot \vec{v}_\text{cm}$

which is exactly the opposite of the change to the translational energy. In other words, you can either say that, yes, the normal force does some work, but it changes the translational kinetic energy by exactly an amount that is the opposite of how it changes the rotational kinetic energy, or you can just say that the normal force does no work. You decide.

Thoughts? Here are some starters for you:

• Thanks for this, I was totally at a loss for figuring out the mistakes in the last post.
• I’m glad you figured this out for yourself, just know that the rest of us knew this all along and have been laughing at you for your last post for a few days now.
• Wait, it doesn’t work!? I’ve already starting building it in my backyard!
• How did you figure out the normal force? Did you determine the accelerations of all the particles and subtract all known forces, starting with the last black dot and moving up to the red dot. Or did you use Lagrange multipliers to figure out the normal force more directly, and, if so, how did you figure out the constraint equations for the track? (yes, yes, and it’s a long but interesting story involving me jumping out of bed this morning and trying something that worked!)
• So how would you say it? Does the track do work on the system?
• How is it that you were willing to believe that the track could help you violate energy conservation? What, are you some sort of “momentum is king” kind of guy or something?
Posted in mathematica, physics | 6 Comments

## Double pendulum roller coaster

I’ve been doing a lot of modeling of beads on wires lately, but today I discovered something that really surprised me. The surprise came when I found a bead/wire system that seemed to violate conservation of energy. Now, it turns out that I was just thinking about it wrong, but still, it’s interesting.

Here’s the animation that got me thinking:

Double pendulum on a roller coaster

Take a look at how high the whole system gets compared with the original height. It sure looks like it ends up a little higher. Where does that energy come from?

Why I was wrong: I think I had it in my head that the track which provides the constraint force never does any work. That’s certainly true for the case of a single bead on a wire as the normal force is always perpendicular to the direction of travel, hence no work. But in this case that’s not true! Instead, the normal force is at times not perfectly perpendicular to the direction of travel of the center of mass of the system. You can see that in this annotated version of the animation where I track the center of mass in green and show the initial height as a dotted line:

Annotated version with the center of mass in green. The green dotted line is at the original height of the center of mass.

Cool, huh?

Your thoughts? Here are some starters for you:

• Thanks, this is very cool. Can you find the same thing with a single pendulum on a track?
• This is old news. Designers of hang-under coasters take this into account all the time.
• Can you post the Mathematica code? (yes: here you go)
• Can you figure out the normal force of the track using Lagrange multipliers? (note: I can’t figure out a way to parametrize the loop as a constraint that looks like g(x,y)=0)
• Why do you always post animated gifs. Don’t you know people hate those?
• I think your code is wrong. There’s no way the center of mass can get up higher than it starts.
Posted in mathematica, physics | 6 Comments

## Lagrange multipliers revisited

I spent the last few days trying to decide whether to teach Lagrange multipliers in my Theoretical Mechanics course. Ultimately I decided to go ahead and do it and I wanted to get down my thoughts on why and what we ended up doing in class today.

I made a lot of progress on how to teach Lagrange multipliers the last time I taught this class, and I have to say that it was great being able to read my old thoughts when prepping this class. In that post I break down how to derive the needed result, so I won’t repeat that here (though I did find a slightly better approach for one of the steps that I’ll talk about below).

So why was I waffling? Every time I come around to this topic, I begin to realize that if my students are predominantly going to numerically integrate the ultimate equations of motion (or equation of motions as I usually pluralize the acronym – eoms) they can get the same information that Lagrange multipliers provide (typically the constraint forces) by simply plotting the total acceleration of the relevant particles minus the known forces. In fact that’s one of the beauties of the Lagrangian approach — you can ignore the constraint forces when figuring out the equations of motion. At the end of the day, you have access to the full accelerations which come about due to both the known external forces AND the constraint forces. What Lagrangian multipliers do is help you explicitly calculate those constraint forces, but sometimes I don’t really see the value of that.

So what tipped the scales towards teaching them this year? Well, I realized that actually doing what I suggest above is kind of a hassle. Consider the prototypical problem of when a sled will lose contact with the ground as it goes down a hill. If you have the equation of the hill, you can then reduce the problem to a one-dimensional one, typically the horizontal variable. Then you can do the Lagrangian approach where you force the sled to stay on the curve. When you’re done you can look at the total acceleration and subtract gravity from that vector. Then you have the normal force vector and you can investigate when that switches from a vector pointing out of the ground to a vector pointing into the ground. When that happens the sled will lose contact with the ground. Now, that all sounds great, but actually determining which way the vector points involves dotting it with a vector that’s normal to the curve. To get that you have to do some derivatives on the function that defines the curve in the first place. In other words, there’s a little bit of a hassle.

Contrast that with learning about Lagrange multipliers and applying them. Now, there’s no question that learning about them (the whole separation of variables thing in my other post) is not a cake walk. However, there’s some very cool calculus of variations in there and it helps me reinforce the original derivation of the Euler equation (which I always choose to teach). So teaching it isn’t really the big deal. What is the big deal is whether what you get after implementing it makes your life easier. And guess what? It does! For the sled problem, if you have access to the Lagrange multiplier as a function of time (which you will after implementing the approach) you just have to plot it and look for when it changes sign. That doesn’t require the multivariable calculus that’s necessary to define the normal direction that you need for the other way.

Here’s the screencasts that I made for my students today. We were tackling whether a sled would ever lose contact with the ground on a parabolic hill. I did it once without Lagrange multipliers and once with them. It’s my contention that the second way is a more clear way of finding when the sled leaves the ground (too long, didn’t watch: it never does for a parabolic hill). But I recognize it’s not a slam dunk case.

I was talking with a math professor buddy of mine today and he suggested that it might be a slam dunk case if you have a constraint that is hard to solve for one variable in terms of the other. I get what he was saying, but I don’t immediately have an idea of a sled/hill constraint where that would be the case.

Quick note about a change to the derivation: There’s a point in my other post where I say that the constraint should not be a function of the perturbation variable, $\alpha$. I then take a derivative and find a relationship between the two perturbation functions, $\eta_1$ and $\eta_2$. I realized this time around that there’s a different way to approach that. Basically we know that the constraint, g, has to be obeyed whether you’re on the best paths (x(t) and y(t)) or on nearby paths ($x_\text{best}+\alpha \eta_1$ and $y_\text{best}+\alpha \eta_2$):

$g(x_b, y_b)=g(x_b+\alpha \eta_1, y_b+\alpha \eta_2)$

$latex g(x_b+\alpha \eta_1, y_b+\alpha \eta_2) \approx g(x_b, y_b)+\frac{\partial g}{\partial x}(\alpha \eta_1)+\frac{\partial g}{\partial y}(\alpha \eta_1)$

or

$latex \frac{\partial g}{\partial x}(\alpha \eta_1)+\frac{\partial g}{\partial x}(\alpha \eta_1)=0&s=2$

which leads directly to the same result I have in the last page.

Update on how to do this in Mathematica: In the screencasts above you might notice that I deviate from what I suggest in my other post. The reason is that Mathematica has a new method for NDSolve that saves the day. Now you can simply tell NDSolve about the constraint and go, without having to do the differentiation that was my work around. The key is to use Method->{“IndexReduction”->Automatic} which Mathematica kindly suggests if you try to do NDSolve without it. It’s great, you even only have to give initial conditions for one of the variables. Mathematica will figure out the initial conditions for the other variable(s) by using the constraint. Awesome!

Your thoughts? Here are some starters for you:

• I like this, I’ve been looking for better motivation and I’m going to use this to . . .
• I’m in this class and I found today very useful. Here’s why . . .
• I’m in this class and I thought today was a waste of time. Here’s why . . .
• Of course you don’t leave the ground on a parabolic hill, everyone knows that.
• Why didn’t you type up all the stuff you said in the screencasts? I hate watching videos.
• Thanks for the screencasts, do your students find them useful?
• Mathematica had that new method two years ago, I just decided not to tell you about it
• Here’s a suggestion for a sled/hill problem with a constraint that’s hard to solve for one of the variables . . .

## Setting up oral exams

I’m teaching Theoretical Mechanics this term and next week we have the first set of oral exams. Each student will take 9 oral exams, but each will only be five minutes long. With only 13 students in the course, each set only takes just over an hour. We’ll devote 9 days of class to this exercise, and I think they’ll be worth every minute.

I was thinking about the oral exams today as I was grading some of the screencast submissions from my students on the “I can derive the Euler/Lagrange equation” standard. A few of them had pretty good derivations, but there were tiny issues that I was disappointed to see that they didn’t nail. My first inclination was to give a “3 improvable” meaning that they could just try to figure out the tiny thing I care about to turn that into a 4 (the highest score on my Frank Noschese rubric). But then I remembered the oral exams and realized that I could give them 4s now but lay into whoever gets that standard for the oral exams next week. Every standard will be done roughly four times next week, so the whole class will be able to hear my tiny issues discussed.

I want to be clear here. I’m not saying that I’m giving them a good score now only to blast them next week. Instead I’m trying to really reflect on my rubric. If I’d brag about it, or it seems they could teach it well, that means they get a four. That’s not the same as saying they can do every single tiny detail that I have learned to watch for after teaching this course six times.

I also thought about the role oral exams play in some of the resource screencasts I make for the students. Today we were talking about applying the Euler/Lagrange approach to multi-dimensional problems and I offered up that I could fill in the details of the derivation if they weren’t super comfortable with just saying “ah, ok, I could believe that you’d get the same equation for every variable.” At the end of the day our “I can” statement was “I can do an interesting multi-dimensional Lagrangian problem” so when I sat down to do the screencast, I realized that it really was only needed if the standard had ended up being “I can derive . . .” But that’s when it hit me that the students who watch study that screencast are going to be much better off if they get that standard in the oral exam. They’ll have a “interesting” problem worked out, but I might just ask why they can use that differential equation in the first place. Is it fair? You bet! They need to know this stuff. They need to know where it comes from and why it matters, not just how to turn the crank.

• I like this approach. I think for my oral exams next time I’ll . . .
• I’m in this class and I think this is great. I think it especially makes sense for the standard on . . .
• I’m in this class and I think this is dumb. It’s a double standard! If you want us to know the tiny details, you should lay them all out for us so that we can just read them back for you.
• Five minutes! That’s awesome and here’s why . . .
• Five minutes! That’s ridiculous and here’s why . . .
Posted in oral exams, syllabus creation | 5 Comments

## music vs physics

Don’t be alarmed, I’m not trying to start a war. I’m really just getting down some thoughts I’ve had about teaching and learning music and physics. Recently I’ve started teaching music to high school students and I’ve started to learn the piano. Both of those have taught me some interesting lessons and I’m looking for help in finding useful analogies for teaching physics.

First the piano. I play the trombone and the guitar (chords only, really) and I sing quite a bit. I play in my school’s jazz band so I’ve been trying to get a little more music theory under my belt over the last few years to help my improvisational skills. However, I’ve never learned how to play the piano. I never had lessons and I’ve never had a piano in the house to get me to start taking it more seriously. That changed this past Christmas when we decided to buy our son a keyboard since he desperately wants to learn how to play. So now we have a keyboard in the house and I figured I could try to teach myself.

I started with the books that he’s using, but a lot of it is basic musicianship that I don’t need. So I looked at the book that came with the keyboard and have been slowly working through it for the last month. It uses the basic 5-finger approach with an occasional cross-over. Here’s me butchering the piece I’ve been working on for a couple weeks:

As you can tell, I suck. But that’s to be expected here at the beginning, right? And the piece is boring, but I can’t ask for more at this point, can I?

I was getting a little bored with those pieces, so I asked youtube for other things to work on. I found some pretty cool videos about boogie woogie piano and realized that getting the chords under my fingers could really help out. After a few days I can now reliably play basic triad chords in every key with either hand.

Jump to today. I talk below about the jazz teaching I’ve been doing, but I needed a song to work on with them today and Watermelon Man was playing on the radio as I was driving and I figured that would be a good one. It’s a 16-bar blues form which is a little different than the standard 12-bar blues stuff we’ve been doing, and it has a pretty easy head to teach. So I came home and asked the internet what the chords were. I found a version of the score and sat down at the keyboard. Within a half-hour I could do this (adding in the built in rhythm tracks that the Casio keyboard provides and changing the voicing to “jazz organ”):

I’m pretty proud of myself, and I’ve been going back to play it all day since it’s so much fun. It’s complicated, using both hands with different rhythms, but it’s repetitive and it’s easy to get myself back on track. It’s also pretty catchy given that my whole family is humming it tonight.

On to teaching jazz. My son’s school has a jazz program that isn’t big enough to let everyone who’s interested to play so I thought it would be fun to have some of his friends over once a week to work on simple jazz ideas. No sheet music, just basic forms like 12-bar blues in the ubiquitous B-flat key (though a few non-C-instruments show up so I have to really concentrate to tell them what notes to play). Not too many come over, but we have fun no matter who shows up.

Today was pretty typical. I told them about Watermelon man, played the keyboard backgrounds, and then taught them the head. The caught on pretty quickly and we just kept playing it with a little improv thrown in. I had the sheet music, but I didn’t show it to them. I wanted them to get it by ear. I think the sheet music would have helped them find the notes, but my suspicion is that they got the rhythm down better by just listening than by looking at it.

Ok, so on to some potential analogies and questions. I’ve numbered them to help with any help/comments/questions you might have:

1. Learning a 5-finger song is like doing a textbook problem that no one cares about
1. practicing it will get me better, but I don’t have any fun
2. Learning Watermelon Man was like . . . I’m not sure. It was fun, and I did it fast. I used sheet music, but only to get the chords in the first place, from then on it was because I knew the song.
3. Being able to skip the beginners books due to my other music knowledge is like a student being able to skip general physics in college thanks to her high school physics class.
4. Teaching things like 12-bar blues without sheet music is like asking students to explain everyday phenomena with their own vocabulary.
1. Often I’d just play notes and they’d have to noodle around to find what I was doing.
5. Helping students develop improvisational skills is like . . . I’m not sure. There’s a structure they have to know (here are the “safe” notes you can fall back on) but there’s tons of freedom and no “wrong answers”

Here are some comment starters for you:

• Man, you really suck. Why would you post recordings of your bad playing?
• I like analogies X and Y because . . .
• I don’t like analogies Q and Z because . . .
• Here’s a way to finish your analogies . . .
• What time is “Jazz at the Rundquists”? I’d like to come over with my . . .
• The differences you mention between the 5-finger stuff and the chord stuff doesn’t make any sense. They’re completely different types of playing and they don’t support each other at all. Here’s what you should do instead . . .
• We’ve got a gig coming up, are you free?
Posted in teaching | 3 Comments

## Making it meaningful

Towards the end of my second semester general physics course last semester, a few students told me (separately) that they liked this semester better than last semester. I did my usual “oh really” face while secretly smiling inside because THEY LIKED ME! But then they said why, and I’ve been trying to figure out whether it means anything. They were saying that they liked how the material was more connected to their lives. My first thought was it was weird that they didn’t feel that way about the first semester – you know, forces, momentum, spinning, stuff like that. It made me think that perhaps I was inadvertently on to something.

They mentioned that they liked the sound unit because we constantly were using examples from their lives to explain things. One example that comes to mind was when I asked them when in their lives they realized that sound didn’t travel infinitely fast. For me it was walking my dog in the outfield of a softball team practice. For others it’s thunder, or a professional baseball game, or whatever. Given the comments from those few students above, I think I want to make sure that I keep doing that kind of thing in class.

I don’t teach the first semester, but I certainly know that my own experience in general physics 1 was not overly related to my life. I remember not being convinced of forces because they didn’t explain pillows to me.

Anyways, I just wanted to get this thought down to remind myself in the future. Your thoughts? Here are some starters for you:

• I was one of those students and you totally misunderstood me. What I meant was . . .
• I was one of those students and what you forgot to mention was . . .
• My students always like the 2nd term material better. I think it’s because . . .
• Weird, my students always like the 1st term material better. I think you’re doing it all wrong by . . .
• This is a woefully short post. Try getting your thoughts together better before firing up WordPress. Here’s a few starters for you . . .
• I jump into modern physics topics right away. You’re a fool not to. Everything you’re teaching is centuries old! Here’s how to fix it. . .
• Great, another batch of students who think that the circuits in their house are DC and other big problems like . . .
Posted in syllabus creation, teaching | 5 Comments

## Labs to explore

We decided to do a pedagogical experiment this week in my general physics 2 course.  I wanted to see if I could have the lab be more like the ones in my sound and music course, where students used lab to further explore ideas in order to shore up their understanding of the topics. The idea was to introduce and work with topics in class on Monday and Wednesday and then tell them that the quiz on Friday would be about that material (that’s not new) and that they could use whatever notes and observations they made in lab (on Thursday) during the quiz (the new thing).

DISCLAIMER: I’m writing this post on the day after the quiz, but two days before I grade the quiz. I’m doing that because I’m still excited about this experiment now, and I might not be so much after grading the quiz.

The topic was diffraction and resolution. We explored ways to add phasors, who all have the same phase relationship, to achieve a dark spot. For example, for 4 phasors you have a clockwise square, a counter-clockwise square, and what we called “back and forth and back and forth.” There’s only 3 ways to add to zero with four phasors and that helps explain why a quadruple slit has two sub-peaks between the main peaks in the diffraction pattern. For resolution we talked about how far apart things have to be for us to discern that there’s actually two things there. I felt that both classes went pretty well. We talked about finite numbers of phasors and infinite numbers (like in a single slit) and multiple infinities (like in realistic multiple slits). I was especially happy with using the infinite phasor argument to explain why a single slit would lead to dark spots.

In lab my colleagues made available a plate with 25 different slit configurations and two different color laser pointers. There were also boards to act as screens. I told the students that they should definitely investigate all 25 with both colors and record whatever they thought would help them on the quiz.  One thing I specifically encouraged was to look for “missing orders” where the single slit dark prediction coincides with the multiple slit bright prediction.

The quiz consisted of these three prompts:

1. Describe your hunt for “missing orders.”
2. What logistical challenges were there in lab?
3. Considering the theory we developed in class this week, what other investigations would you like to do in lab if logistical/financial/temporal concerns could be ignored?

The standards that were going to be assessed on the quiz were:

• I can calculate the location of peaks for multiple slits and zeros for single slits using phasor ideas.
• I can find where missing orders would be and discuss imaging resolution.

When I started the quiz I said “hopefully your answers to the prompts will help me identify whether you’ve mastered these standards.” I did that because I was a little worried that they’d talk about things that happened in lab that wouldn’t really have much to do with the standards. For the logistical one I was hoping for issues that could be connected to the theory of diffraction. For example something like “we realized that putting the screen further away would have helped identify the spacing of bright spots, but we could only move it so far away on our table.” I also hoped that the last prompt would solicit comments about resolution, since the lab was really mostly about the multiple slit diffraction standard.

So, we’ll see. I’ll grade them Monday and maybe I’ll augment this post at that point. For the moment I think it went pretty well. I talked with some students after lab and asked what they thought. The comments ranged from “it was easier than most labs because I didn’t have to do every single measurement” to “I didn’t really know what to do in lab.” I think I’m ok with both of those extremes.

Your thoughts? Here are some prompts for you:

• I’m in this class and I thought this was a good lab experience. What I really liked was . . .
• I’m in this class and I didn’t like this at all. It would have been better if we had . . .
• Why didn’t you give them some 2D diffraction targets?
• Here’s a great lab setup to get at the resolution standard . . .
• What would the lab have been like if you hadn’t made this change?
• Here’s what I predict will make you crabby when you grade the quizzes . . .
• Here’s what I predict will make you laugh when you grade the quizzes . . .
• Here’s what I predict will make you not update this post after you grade the quizzes . . .
• I like your phasor approach. Can you use it to explain how bright the sub-peaks will be?
Posted in lab, syllabus creation, teaching | 2 Comments