## Physics 222 Assignment 3

### Directions

Please turn in this assignment (and all future assignments for this course) by emailing them to me . Please use the subject of "Physics 222 HW3" for these assignments (if you use the link above, the subject will be added automatically). Please attach the source code to any programs that you write for this assignment. If you write more than one program, attach each separately. When answering the questions themselves feel free to answer directly in the body of your message (or attach your answers). I may take off points for assignments that are not sent to me in the correct form.

1. #### Relativistic half-life

Write a program that plots the relativistic half-life of particles based on their velocities. The relativistic half-life has the form:

` thm = γ th =  th / sqrt(1 - (v/c)2) `
where thm is the half-life of the moving particle according to a stationary observer, th is the half-life of the particle when it is not moving, γ is the relativisitic gamma factor, v is the speed of the particle, and c is the speed of light. Your program should give the user the option of plotting the relativistic half-life for the following particles: neutron, pion (π0), muon, tauon, and lambda (Λ0).

Your program should hold in a structure the following data for each particle: name, mass in kg, electric charge in fundamental charges, rest half-life in seconds , and whether the particle is a Boson or Fermion.

When the user chooses a particle your program will print out the data it has stored about that particle, and then plot the observed half-life versus speed for the following speeds: 0.0, 0.4c, 0.7c, 0.9c, 0.99c, 0.999c, and 0.9999c. The plotting portion of your portion should use PLPlot and it should use the plsdev function to pick the plot type. The final plot that send in with your homework should be created using plsdev("ps");

Turn in the output and plots that your program returns when you pick pions and lambdas.

2. #### Prime Numbers

Write a program that finds and counts all the prime numbers between a given range of numbers. The program should have a separate function which checks to see if a given number is a prime. Include an example run of this program in your results finding the prime numbers between 2 and 1000.

1. How many total prime numbers are there between 2 and 10000?
2. How many prime numbers are there between 13000 and 13100?
3. #### Review Questions from textbook

4.10, 5.1, 5.3
4. #### Project Proposal

Write a one to two paragraph proposal of your project for this class, if you are taking this class as Physics 322. Include a detailed description of the problem that you are going to try to solve. Also mention any cases of this problem that you will use to check your results, especially any cases that can be solved analytically. Feel free to come talk to me if you need help finding a topic. In fact, you may want to talk to me about your topic, even if you know what you want to do.