Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

UNIVERSITY OF SCIENCE AND TECHNOLOGY OF SOUTHERN PHILIPPINES

College of Science and Mathematics


DEPARTMENT OF APPLIED PHYSICS

PROBLEM SET 1
Computational Physics 2
BSAP 3G1

Directions: (Please read the following directions. Not following directions will be deducted accordingly.)
➢ Answer the following on your Own Effort, so you will learn. It’s okay to explore the internet for your reference
but Do Not explore the answer of your classmates ☺.
➢ Take a photo of your codes and results or you can encode it if you have the resources to do it.
➢ Upload your works to our google classroom or USTEP.
➢ Please write your name and section in the upper left corner of your paper. Also write your signature besides
your name.
➢ Stay SAFE everyone!

1. Graph both of the following functions on a single figure, with a usefully-sized scale.
(a) 𝑥 4 𝑒 −2𝑥
(b) [𝑥 2 𝑒 −𝑥 𝑠𝑖𝑛(𝑥 2 )]2
Make sure your figure has legend, range, title, axis labels, and so on.
2. The data shown in “microphones.txt” is most usefully analyzed by looking at the ratio of the two microphone
signals. Superimpose the plot of these ratios (mic1:mic2 and mic2:mic1), with frequency on the x-axis. Be sure
to clean up the graph with appropriate scales, axes labels, and a title.
3. The data in file Ba137.txt contains two columns. The first is counts from a Geiger counter, the second is time
in seconds.
(a) Make a useful graph of this data.
(b) If this data follows an exponential curve, then plotting the natural log of the data (or plotting the raw data
on a logarithmic scale) will result in a straight line. Determine whether this is the case, and explain your
conclusion with an appropriate graph.
4. The data in file Ba137.txt is actual data from a radioactive decay experiment; the first column is the number
of decays N, the second is the time t in seconds. We'd like to know the half-life 𝑡1 of Ba-137. It should follow
2
−𝜆𝑡 𝑙𝑜𝑔2
the decay equation 𝑁 = 𝑁0 𝑒 where 𝜆 = . Using the techniques you've learned in this chapter, load
𝑡1/2
the data from file Ba137.txt into appropriately-named variables in an iPython session. Let’s estimate 𝑡1/2 =
190 𝑠, the time it takes to get half of the material to decay. Plot the resulting equation on top of the data in
#3.
5. The normal modes and angular frequencies of those modes for a linear system of four coupled oscillators of
mass m, separated by springs of equal strength k, are given by the eigenvectors and eigenvalues of M, shown
below.

𝑘
(The eigenvalues give the angular frequencies ω in units of √ .) Find those angular frequencies.
𝑚

6. Create a single plot that shows separate graphs of position, velocity, and acceleration for an object in free-
fall. Your plot should have a single horizontal time axis and separate stacked graphs showing position,
velocity, and acceleration each on their own vertical axis. (See figure below.) The online matplotlib gallery
will probably be helpful! Print the graph, with your name in the title.

You might also like