## Set standards ahead of time

For several courses now I’ve been letting the students weigh in on what the standard for each day should be at the end of the class period. Here’s my post about it. Usually this entails a debate among “I can calculate …”, “I can derive …”, “I can use Mathematica to …”, and “I can discuss the foundations of, usefulness of, and ramifications of …” However, for this semester’s general physics 2 I’ve decided not to do that and to instead set them all myself before the beginning of the semester.

I really like letting the students weigh in, and to really debate those choices in the previous paragraph. It works really well in an upper division course when there can be some great debate over what’s interesting. In such a course we spend the day grappling with weird/deep ideas, and we end the class recognizing that we’ve only used broad strokes in class and that the details will come from further resources (the text, my screencasts, etc). The students have taken a bunch of physics courses so they get the subtleties involved in when they should study a derivation vs studying applications.

However, I don’t think this works as well in an intro course. Physics majors are a minority in my general physics 2 course, with the majority being students who really feel like they’re supposed to learn calculations and applications. I don’t actually fully agree with this, but it’s what they think they should do and so that’s what they always vote on at the end of each class period.

What’s even worse, though, is that we’ll spend the day doing the broad strokes and students will vote that the standard should only cover those. I get a lot less of that in the advanced courses, but I found myself quite frustrated with that last year in this intro course.

I don’t think setting up the standards ahead of time is really that bad, even in the advanced courses. I think I’ll do it for intro and play it by ear in the advanced courses as I move forward. One really nice thing about doing it ahead of time is that the day spent in class is very focussed. The students know what they’re going to be assessed on so they can help nominate further resources that they think they’ll need.

Thoughts? Here’s some starters for you:

• I’m going to be in this class and I think this is a cool idea. Here’s why . . .
• I’m going to be in this class and I think this is a dumb idea. Here’s why . . .
• What are some examples of standards that made you frustrated in the past?
• How has this worked in your non-science-major courses?
• If you set all the standards up ahead of time, what happens if you fall behind?
• I think having intro students doing derivations is a waste of time. I hope you don’t ask them to do any for your standards.
• I think having students do derivations is the only important thing. I hope that’s all you ask them to do.
• All students should be in the class because they love physics. If they don’t you should force them out.

## Finite Elements Methods in Mathematica

In Mathematica 10 there’s now the ability to solve differential equations using finite element methods (FEM). I’ve spent some time this summer playing around with the tools and I thought I’d write this to help me remember some stuff.

The typical problem to be solved with FEM involves trying to find a function on a 2D surface that obeys a (typically) second order differential equation. A few examples include

• The voltage electric potential inside a region where the voltage potential on the walls is known
• The shape of a rubber sheet hung from a frame
• The possible standing waves on a surface
• In quantum mechanics this could be possible eigenfunctions
• In acoustics this represents the possible resonance modes

Normally you divide the surface into lots of triangles and then turn the continuous differential equation into a finite number of linear equations, solving for the value of the unknown function on the nodes. Here’s a great (though long) description of how it works.

For years I’ve been jealous of my friends who are facile with software that can do this sort of computation, because if you try any of those examples above with Mathematica 9 or below it laughs at you and gives up. But now, in Mathematica 10, it’s built into my favorite command for doing differential equations: NDSolve.

The first thing you have to do is define the surface you’re interested in. There are a ton of built in shapes like Disk[] that you can use, but you can also define them using commands like ImplicitRegion and RegionUnion and RegionDifference. You can also make regions out of graphics and a lot of the built-in data in Mathematica like the shape of countries, states, counties, and cities.

Once you have the region specified, you can do a command like this:

NDSolve[{Laplacian[u[x,y], {x,y}]==0, Boundary conditions ...}, u, {x,y}\Element region]

where I’ll discuss the boundary conditions below (and “region” has already been defined). The Laplacian command is equivalent to:

$\frac{\partial^2 u}{\partial x^2}+\frac{\partial^2 u}{\partial y^2}$

Alright, here are some examples:

Solves the hanging rubber sheet problem with constantly changing frame.

For this example I set the Lagrangian equal to a nonzero value and set the frame (borders) to be interesting shapes (every frame in the gif is a different solution). You set the border using a Dirichlet boundary condition like this: DirichletCondition[u[x,y]==some cool function, border you’re interested in]. In this example I did a different condition for the inner and outer borders.

Treating Minnesota like a drum head and thumping it.

Here I solved the following equation on the region in the shape of Minnesota (obtained using DiscretizeGraphics[EntityValue[ctrl-=Minnesota, “Polygon”]])

$\frac{\partial^2 u}{\partial x^2}+\frac{\partial^2 u}{\partial y^2}==\frac{\partial^2 u}{\partial t^2}$

Another way to do the same thing is to find the resonant modes of Minnesota and combining them to start as a thump:

Similar to the last one but using the eigenmodes of Minnesota to approximate a “thump”

By playing with Neumann boundary conditions (where you can set the value of the slope at the boundary) I tried to simulate flapping flags:

The city of St. Paul, MN (colored with the MN flag) “waving”

I didn’t like the edges very much, so I tried again with a square US flag, adjusting the boundary conditions a little more:

US flag flapping

Note that you can get the flag image using flag=EntityValue[ctrl=United States, “Flag”] and you can put it on 3D graphics using PlotStyle->Texture[flag].

Finally I’ve played quite a bit with various drum heads and the sounds they’d make. You solve this equation:

$\frac{\partial^2 u}{\partial x^2}+\frac{\partial^2 u}{\partial y^2}==\omega^2 u$

But you do it with an awesome brand new command in 10.2: NDEigensystem. It takes just the left hand side of the equation (with an odd negative sign that took me a while to get), along with appropriate boundary conditions. It returns the values of $\omega^2$ and interpolation functions for the resonant functions. Here’s the 25th resonance of a Texas-shaped drum:

25th resonance of a Texas-shaped drum head

You can use the $\omega$ ‘s to figure out what a drum head will sound like, and you can figure out how much of each resonance you’ll hear based on where you thump the drum by expanding your “thump” function into the resonant functions. I cheat and use a delta function thump so I just need to know the value of the resonant function at the location that I want the thump. By the way, the functions returned by NDEigensystem are orthonormal, which makes my last sentence somewhat more palatable to my mathematician friends.

Here’s a movie I made combining Mathematica’s ability to do all the calculations, image generation, Minnesota data look up, Traveling Salesman solutions, and sound generation with FFMpeg’s ability to combine images and sound into a movie. It shows what it would sound like if you thumped a Minnesota-shaped drum head in the center of all 89 counties in an order determined by the shortest tour through those points.

Fun times, huh? I’ve certainly enjoyed learning a ton about FEM and what you can do with it, and I’ve gotten decently facile with Mathematica’s implementation.

Thoughts? Here are some starters for you:

• Why did you strike out voltage in the early examples?
• You said it was typically second order problems. What about the beam equation, huh? That’s fourth order, can you handle that? I bet you’d have to use something like COMSOL to do that, not wimpy Mathematica (you’re right).
• Hey, I’ve done some of this stuff with Mathematica (x<10), you’re a liar.
• What’s up with the negative sign you have to use in NDEigensystem?
• Your description of a delta function thump has tons of problems, not least of which is that you have to calculate all the resonances, and I have a sneaky suspicion you only do, oh, I don’t know, 20.
• How did you decide to put dampening in the sound? It’s clear you’re not just playing those frequencies combined.
• Why didn’t you do this in python, that seems the obvious choice for anything computer related?
• How could you utilize this when teaching Laplacian solutions in a electricity and magnetism class?
• I tried your flapping flag simulation and I got some negative eigenvalues. What the heck? (Yeah, I get that too when I set the Neumann boundary condition equal to the function itself, which is what I thought a flapping flag would look like. My mathematician friend tells me that then I can’t trust any of this.)
• Why do you only do Minnesota examples? What, you think you’re too good for the rest of the country?
Posted in mathematica | 2 Comments

## Daily quiz for practice in SBG

Yesterday I wrote about a hare-brained scheme designed to get students to do more practice/homework in my Standards-Based Grading (SBG) implementation. Today here’s another one.

Back when I graded homework/practice I felt that I was bad at holding the line in my office hours. What I mean is that students seemed to be pretty good at tricking me into doing their homework for them. I was also getting pretty crabby about trying to figure out if the students were doing their own work. So my solution was to have daily 10 minute quizzes. I would assign four problems per class with the promise that in the next class I would roll a 4-sided die to pick one of the four to use as the quiz. This had a lot of benefits/features/odd-side-effects:

1. I was perfectly happy to help students in my office hours
2. I would “turn the problem inside out” in the quiz by asking for a different unknown, so the students understood that to study they should solve the problem and make sure they understood all the connections among the various variables.
3. I would randomly change the numbers involved by asking the class to shout some out. Before letting them take the quiz I would let them discuss whether they expected a weird answer based on the random numbers they’d thrown out. For example, if they said that a capacitor had 100 Farads, they guessed that the rest of the problem would have answers very different than other problems they’d worked.
4. Nearly every class day someone would groan after the die was rolled. Sometimes it was me if I felt it had rolled to one of the easy ones. But I liked that it was truly random so they didn’t spend time the night before trying to guess which problem I was going to pick.
5. I liked how they had to work on a problem long enough to have the confidence to pull it off in class in 10 minutes. Often their first pass at the problem the night/day before took much longer than that. Combined with point 2 above, this led to some decent problem solving skills

I felt it worked quite well. Plus it dramatically reduced my grading from 4 problems every day from each student to one.

So I was wondering if this would work in my new SBG implementation where I’m trying to hold the line against giving points for homework. I think it might. Here’s what I’m thinking:

1. Assign 4 problems per day just as above. Design them to measure students understanding/mastery of recent standards, not necessarily just the one covered on that day.
2. Do the 10 minutes on Monday, Wednesday, and Friday even though Friday will still be a review day (there will still only be two standards per week).
3. Grade the quiz with standard scores (my 1-4 rubric)
4. Continue to allow students to do video reassessments

Content days (Mondays and Wednesdays) would now have 10-15 minutes less per day. I handled that in the past pretty well, but I’ll definitely have to tighten up the activities that we’ll do. I had several sloppy days last year where directions weren’t clear and students spun their wheels quite a bit. I think much better preparation on my part for things like clicker (ok colored cards) questions and white board/group work will pay off huge for this.

Review day will now only have a 10 minute quiz so the rest of the day I can use the awesome nb site from MIT. That’s like google moderator on steroids, as students can ask questions about daily notes and vote each others questions up and down.

I really like point 5 above about students needing to practice enough to get fast at the inside-out problems. That seems to be a good indicator of mastery.

I’m worried that, due to my reassessment policy, students won’t take these quizzes seriously. I’d appreciate any thoughts you might have about that.

Thoughts? Here are some potential comments I’d appreciate:

• I’m going to be in this class and this sounds intriguing. How will ______ work?
• I’m going to be in this class and this sounds terrible. Instead why don’t you . . .
• Why 4? Is it just because you have a 4-sided die?
• Do you like this better than the ticket idea from the last post? What would you miss from that if you didn’t do it?
• Can you give some examples of turning a problem inside out?
• Why do you let them suggest numbers that clearly wouldn’t be physically reasonable?
• Can you say more about how your office hours changed when you switched to this in the past?
• How exactly do you plan to use the nb MIT site?
Posted in syllabus creation | 9 Comments

One of my biggest struggles last year teaching general physics 2 (calc-based) using Standards-Based Grading was my inability to convince students to practice problem solving. On the first day when I was laying out my philosophy someone said “so there’s not any homework then?” I replied that they should do homework to develop the skills and content necessary to do well on the assessments but that I wouldn’t collect it and I wouldn’t grade it. That policy has worked decently well with my upper division (think: smaller) courses, but it didn’t work as well with that bigger class. So this summer I’m trying to think of ways to get more students to do more practice/homework. Here’s my current hare-brained scheme:

It’s a Monday, Wednesday, Friday course and I still really like the idea of only 2 standards per week and so therefore a review/assessment day on Fridays. Last year we spent ~30 minutes reviewing material based on their submissions to Google Moderator and then ~30 minutes on a quiz that tended to assess the two new standards of the week (though often hitting earlier standards as well). My thought for this year is that their work on practice problems would drive the discussion/work during the first 30 minutes, but that they could only take the quiz if they submitted some practice work.

Because it’s standards-based grading, missing the quiz isn’t the end of the world. My students are (nearly) always allowed to resubmit video assessments for any active standard. Last year the quiz was always the first assessment on that week’s standards and some students turned in reassessments later. So if they demonstrated that they’ve practiced, they get to take the quiz. If they do well, the only reason they’d ever have to do some reassessment is if I force them to during one of the two oral exams.

I’d actually like to say that submitting evidence of practice is the ticket for even the first 30 minutes (when the review happens) but I feel a little weird about barring students from class.

What does evidence mean?

At first I was thinking that students could come with some sheets of paper where they’ve worked on some problems. They’d bring them and turn them in so that they could get the quiz. They’d also use their successes and failures of their practice to focus our conversation during the 30 minute review part. But then I had a different idea:

What if the students did some practice and submitted photographic evidence. This does a number of nice things for me:

1. The students tackle the logistical problem of photographing and submitting their work, both of which are necessary (though not sufficient) for figuring out how to do the video reassessments.
1. Often students would not do any video assessments because they said they couldn’t figure out all the logistics.
2. It gives me an organized way to present students (anonymized) work to the class during the review session.
1. I like it being anonymous because we can all just look at work done to find common errors or cool tricks/solutions.
3. Let’s me take a look at some of the work prior to the 30 minute review time.

Other possible options

I could of course just give points for homework. I tend to not like that option due mostly to cheating but also because homework should be practice, not a demonstration of mastery. I realize, though, that I’m likely being too stubborn about this, so we’ll see.

What do you think? Here are some starters:

1. I was in the class last fall and I loved not doing homework. I don’t think it affected my learning at all.
2. I was in this class last fall and I wish I had done more homework. Getting points for it would have motivated me.
3. Not letting a student take a quiz seems harsh. Why not make it so that if they don’t do homework they tend to fail the quiz?
4. Just grade the homework! Yes some might cheat, but it’ll ensure most will get the practice they need. Stop clinging so hard to your misguided principles!
5. Why not do what Evan does, having a system of credits that students can earn to have a chance at a reassessment?
Posted in syllabus creation | 9 Comments

## Rugby ball bouncing

A friend of mine was telling me that when you play rugby, you can count on the ball bouncing up nice and high for you every third bounce. He showed me in the gym how that’s basically true and I’ve been wondering about it ever since. This post is one way I was thinking of modeling it.

For this first pass, I thought I’d look at a bouncing ellipse (in 2D). I figured it would sometimes bounce low (and spin fast) and sometimes high (and spin slow). I thought I could look to see if it “bounces high” in any particular pattern.

Here’s an animation of what I did:

bouncing ellipse with a non-zero initial rotation but with no initial rotational velocity

You can see that the height of the bounce does change. Here’s a plot of the height of the center as a function of time:

Height of the center of the ellipse for the animation above

There’s definitely some variability, but not as much as you can see in some rugby matches:

Here’s a plot showing several height plots for several different initial orientations

Height vs time for several initial angles

It’s clear that there can be quite a bit of variability of heights. Here’s an animation showing that:

bouncing ellipse with more of a height difference.

So I don’t think this really shows a “every third bounce” pattern, but I think it’s a good start.

How I did it

I tried three different approaches to get these calculations. Only the last one worked, but I learned a lot.

First I thought I’d use the new support in Mathematica for regions. You can define a region (the ellipse) and the region for the ground (half plane) and then look for the intersection to see if they’ve hit each other. Then you can calculate the area of the intersection to use in calculating a potential energy. Good in principle, but super slow and the derivatives needed to do on the potential energy didn’t work. Oh well.

Next I thought I’d try to learn how to use the new mesh/Finite Element procedures. I thought I could find the best triangular mesh for the ellipse and treat all the lines between nodes as springs. Here’s the (very slow!) result:

A mesh ellipse executing a bounce.

As you can see, the “ball” gets severely distorted upon the bounce. Also, I think treating all the mesh lines as springs doesn’t correctly represent the stiffness of the internal structure of the ball.

Finally I just decided to say that the ground was a giant one-way spring (it only pushes, it doesn’t pull) and then identify when (and where) the ellipse pokes into the ground. It took me a while to figure out the lowest point of an ellipse, but it was really just differentiating the parametric equation to find a minimum in y. So then I could say that my potential energy is just proportional to y^2 where y is the distance that the lowest point gets below the ground plane. That’s the form of a spring and lets the ground push the ellipse back up. In my experience, this is a useful way to do bounces because it tends to conserve energy and correctly model the time it takes to collide.

What’s cool about doing it using a Lagrange approach (with a potential energy) is that I don’t have to do things like “when it hits, reverse the momentum” and “when it hits, figure out the impulse torque to figure out the change to angular momentum.” Instead I just put the potential energy in as a function of y and theta and the Euler-Lagrange equation takes care of all the rest. Specifically it gets the angular momentum just right without every calculating an impulse torque.

So, the upshot is, I think that high bounces are possible using this mechanism, though a predictable “once every three bounces” doesn’t seem to be happening. This was fun modeling though, and I look forward to adding other approaches based on your comments below (hint hint).

Your thoughts? Here are some starters for you:

• I’m in this class and, wait, never mind, it’s summer
• I think this is cool, but I think you can make it better by . . .
• I think this is dumb, what you forgot about was . . .
• Why don’t you add friction?
• Why don’t you add some x velocity?
• Here’s a better way to deal with that mesh . . .
• Mathematica does Finite Element Analysis now? Cool, can it do . . .
• What is Finite Element analysis?
• Why was finding the bottom of the ellipse so hard? Seems easy to me!
• Please let me know when you redo this in Python, then I’ll read it.
Posted in mathematica, physics | 1 Comment

## How to drill a well

In one of my courses this semester students were learning about the coriolis and centrifugal forces that things seem to experience on the earth. There’s a problem at the back of the chapter that asks when a dropped rock would hit the side of a well. A couple of students attempted it, but I noticed that they assumed the well was drilled straight toward the center of the earth. I encouraged them to think about that and figured I’d get a resubmission before the end of the term. I haven’t yet, and I started to realize today that it’s a pretty interesting problem. Namely, how do you drill a straight well?

I came up with three ways (four if you count straight to the center of the earth) and all of them give a different shape for the well:

1. Slowly reel out a heavy plumb bob on a line. When you stop reeling, it’ll point out away from the axis of rotation of the earth due to the centrifugal force. As long as you do it slow enough, you can ignore the coriolis force. Have the well shape match the path the plumb bob  takes during its (slow) descent.
2. Slowly reel out a chain or rope that doesn’t have negligible weight but also doesn’t have a heavy plumb bob at the bottom. Have the well shape match the shape of the rope when you’ve got it as deep as you like it.
3. Drop a rock and see which way it goes. Have the shape of the well match the trajectory. This one has the benefit that future rocks won’t hit the side!

So I set about trying to figure out each of those shapes. For those that don’t want the details, here’s a plot showing all three. Well 1 is in blue, well 2 is in red, well 3 is in green.

Blue: well type 1. Red: well type 2. Green: well type 3

The easiest one is the green one. I just do a pretty straightforward integration of the equations of motion where:

$\vec{F}=\{0,0,-m g\}-m\vec{\omega}\times(\vec{\omega}\times\vec{r})-2 m \vec{\omega}\times\vec{v}$

Where the first term is gravity (note that g changes like a spring as you go deeper), the second is the centrifugal force, and the third is the coriolis force. Once you know the form of the force, doing an NDSolve command in Mathematica is pretty easy.

The other two wells were a little harder to calculate. For well 2 I modeled several (19) masses connected by inextensible strings. I started with them all anchored at the top and hanging straight toward the center of the earth. Then I turn on time with a lot of friction to see where they all settle down to. Here’s an animated gif of that process:

Evolution of well 2

I actually used Lagrange multipliers for all the strings and simply solved for x,y, and z of every particle along with the tension forces necessary to keep their spacing correct.

For well 1 I only used one particle but I changed the constraint to be time dependent. Basically I just had the length between the ball and the anchor grow linearly.

Cool, huh? I wonder which is the better way to do it. What do you think? Here’s some starters for you:

• I’m in this class and I love this. I’ll redo that standard using all of these just so you’ll brag about me.
• I’m in this class and I’m pissed. Why couldn’t you post this a long time ago?
• This is cool. What happens with well 3 if you add air resistance?
• I’m confused. What do you mean when you say “g” changes like a spring as you go deeper?
• This is cool, but I don’t think you did _____ correctly. Here’s a post of mine that does it correctly.
• This is dumb. I build wells for a living and we don’t do this at all. Instead we . . .
• This is cool, but as usual you haven’t bothered to post your code, jerk.
• Having just redone all your work, I’m now convinced that you used a huge omega value (0.5) and a tiny earth (10 m radius) with g=9.8 at the surface, all at 45 degrees N latitude. You could have just put that in your post, you know. Jerk.
Posted in mathematica, physics, teaching | 7 Comments

## In class versus screencast

Something happened in class on Friday that I wanted to get down before I forgot about it. It’s a good follow up to my last post about the value of class time.

On Fridays we do a review of the two new standards for the week. This time it was about tops/gyroscopes and simple normal mode systems. I set up two problems and two groups to work on them:

1. Consider a spinning top balanced perfectly. What happens when a ball hits it from the side?
2. Consider two weakly coupled mass/spring systems. Describe how the energy seems to go back and forth between them.

The groups worked hard. Their first assignment, due 5 minutes into the work, was to report any questions they had. Those ranged from “What’s the mass of the top? (whatever you want)” and “Are the two main springs identical? (if you want)” to “Will it tip? (good question)” and “Is this the same math we developed on Wednesday? (What do you think).” They then worked hard trying to figure out what was relevant and what they could do to spice it up (to make it 4-worthy in my system).

But then the inevitable happened. Both groups developed enough that they wanted to see what would happen if we modeled it in Mathematica. Group 1 wanted to see if the top truly would tip at a 90 degree angle to the trajectory of the ball and group 2 wanted to see a Fourier transform of the motion of the masses for various settings of the springs. And both of those sounded like a lot of fun to set up and to play with. However, there wasn’t time left in class for both. How to decide? That’s what I wanted to get down in this post. Not an answer, mind you, but how our discussion went.

At first we tried to figure out which project was harder. The Fourier transform stuff had them a little worried, as we hadn’t done that in this class at all. But figuring out how to the ball impact was difficult too. The problem was, there wasn’t consensus on whether “hard” meant that it should be done in class where they could ask questions, or done in a screencast (by me) outside of class where they could watch it and rewind etc.

One student really liked the latter argument, saying that they were worried that the subtle details would come too fast if I did it in class. I said that maybe I should do the hard one in class to make sure we figured out what was hard for them.

In the end we did what I thought would be the easiest one in class, though it’s finny that even that one proved too difficult to do in class. Here’s the two scasts I made for them after class if you’re interested.

So what do you think. What should be done in class and what should be an out-of-class resource? Here’s some starters for you:

• I’m in this class and I like that you ask us our opinions about this. I like tailoring my learning that way.
• I’m in this class and I hate the way you waste time asking us what we should do. You’re the expert, so teach!
• This is cool. Do they change what types of things they ask for as the class goes on?
• This is dumb. You shouldn’t put them in two groups if both of the problems are things they should learn.
• This is cool. What happens when you do what they ask for but you don’t quite finish?
• This is dumb. You should promise to do both as scasts and then just spend class time having them predict what’ll happen. That way they’re motivated to watch the vids.
• This is cool. Do you just have the vote be democratic or do you always wait for consensus?
• This is dumb. The whole class should work this way, not just the end.
• This is cool. I’m really surprised at how the top moves. Maybe doing the impact as a temporary gravity adjustment is wrong.
• This is dumb. Doing everything in Mathematica is stunting their growth, stop it.
Posted in syllabus creation, teaching | 1 Comment