## In Class Problems and Solutions

What happens if you get stuck working on those problems I gave you in class? Should you just give up? No! Never give up. Getting stuck is part of the learning process. So, if you’re stuck just get back to work. You will figure it out.

AFTER you figure it out, you can see how I did it. Don’t cheat and look at the solution first – you will just be cheating yourself. Oh, I know that you THINK you learn better when you see the solution, but you don’t. This is like learning to climb Mt. Everest by starting at the top and sliding down.

## Reassessment for Chapter 4

If you are planning on doing a reassessment for chapter 4, I will allow the following (even though it’s in the book):

– derive the connection between the interatomic spring constant and Young’s modulus.

## VPython Feedback

Most of you have turned in some type of numerical calculation and I think I have returned a score for all of them. However, I don’t always give very detailed feedback. Here are some things I would like to point out after looking at your code (the plural “your” – for the whole class).

- I think I was pretty clear that you should either create a screencast where you go over your code (and run it) or you should show the code to me in person. Some of you instead just sent me the code. I really shouldn’t even count this as a submission, but if you did this you need to turn it in correctly.
- I pointed this out in class, but still there were a couple of problems with it. I want you to create a numerical calculation and not a calculator. What’s the difference? I will describe this below.
- Remember that you have to update the position of the object in order for it to move.
- If you want 5 points for your project, it needs to model something that you couldn’t easily do on paper. Two relatively simple examples are three masses interacting gravitationally and a ball thrown the the air with air resistance.
- If you deal with things like the Earth and the moon, you have to be careful. If you use a time step of 0.01 seconds, you are going to have to wait a month for the code to make the moon orbit the Earth. A 12 hour time step would probably be small enough.
- How do you know if your time step is small enough? One method is to run your code and look a the results. Next, make the time step half as big and run it again. If you get about the same result, then your first time step was probably small enough.
- Collisions are very difficult – but some of you tried to do some type of collision program. Really, there is one type of “collision” that you would be able to model – a proton colliding with another proton. Why is this one easy? Well, there is always a force between the two protons (the Coulomb force) that is relatively simple to calculate. As the two protons get closer, this force gets MUCH stronger. The result is that the two particle will “bounce” off each other without even touching. Hard sphere collisions are way more complicated – maybe we can talk about that later.
- Don’t forget there is a difference between REAL gravity and the gravity on the surface of the Earth. If you are dealing with the moon and the Earth, use the real gravitational formula, not the “mg” one.

Now for an example.

**Projectile Motion Calculator**

Suppose I wanted to calculate where an object would land after being shot at some angle on a flat surface. I could write the following code (this is just pseudo code).

- Start with the initial velocity and the angle (and the initial position). Find the x-velocity and the y-velocity.
- Use the kinematic equations and the y-velocity to calculate the the time the object is in the air.
- Use this time and the kinematic equations to find the final x-position.

This would give you a nice answer, but it’s just a calculation.

**Projectile Motion Numerical Calculation**

If you start with the same initial conditions, here is what the numerical calculation would look like:

- Calculate the force on the object (this would just be the gravitational force)
- Use this force to find the new momentum of the object after some short time interval.
- Use the momentum to find the new position of the object after some short time interval.
- Update time.
- Repeat until the object gets back down to the ground.

It might seem more complicated to do this problem numerically – however, the idea is very useful (especially for more complicated problems).

## Change in momentum for circular motion

Here is a derivation of the change in momentum for an object moving in a circle.

http://scienceblogs.com/dotphysics/2009/07/18/basics-centripetal-acceleration/

## Stuff for chapter 5

If you want to get a head start on chapter 5, here are a couple of videos:

## Headstart on chapter 4

One of the key ideas in chapter 4 is the connection between interatomic “springs” in the ball and spring model and macroscopic features of a material. The book goes through this derivation, but I did it too. It might help if you watch this before we cover it in class.