Project 8
Description
In this project we were learning how to use simpson law to perform an estimation and we compaed that with the quad integrator in the scipy integrate package. In this project, we learnt about using numerical techniques to integrate functions that are not integrable. We will use this idea to investigate the period of a simple pendulum. To do so, we collected data from a real pendulum and we will compare them to the exact theory, obtained using simpson's integration technique, to the small angle approximation, and to the very small angle approximation.
Algorithm and Discussion
Let's say we have a system with a potential energy given by some, possibly complex expression $U(x)$. For any system with position $x$ and a potential energy $U$ we have:
$$ E = {1 \over 2}m\left(\frac{dx}{dt}\right)^2 + U(x$$
If we solve this for $dx/dt$ we get the result we want: $$ \frac{dx}{dt} = \sqrt{2(E - U(x))/m} $$
or, solving for $dt$ we get:
$$ dt = \sqrt{m \over 2 (E-U(x)) } dx $$
If the system is bound we can get the time for one oscillation by integrating the time for one complete period! If the potential is symmetric with respect to $x$ then we only have to do 1/4 of a period and multiply by 4:
$$ T = 4 \int0^{x{\rm max}} \sqrt{m \over 2 (E-U(x)) } dx $$
Let's apply this idea to the simple pendulum. Use this potential (and use polar coordinates!) to study the simple pendulum:
$$ U(\theta) = -mgl {\rm cos}(\theta) $$
Use this idea to show that for small values of $\theta_m$ the result is the same when ($T = 2 \pi \sqrt{l/g}$)
$$ 4 \sqrt {l/g} \int_0^{\pi/2} {d\phi \over {\sqrt{1 - \sin^2\phi \sin^2{\theta_m \over 2}}}} $$
Code and Implementation
Results and Conclusion
We fit the angle vs time to a sinusoidal model with amplitude and freqency. We were able to visualize the good time and bad time.
- Omega : Angular velocity
Amplitude (A): Measure of the change over a single period.
Offset: It depends on the postion of the coordinate system. It may vary, but it should not affect the outcome of the experiment.
alex1.csv:
- Good time
- A = 49.6569+/-0.0853 degrees, omega = 3.4957 +/- 0.0008 rad/sec
dimitris1.csv:
- Good time
- A = 23.9288+/-0.0583 degrees, omega = 3.6381 +/- 0.0011 rad/sec
dimitris2.csv:
- Good time
- A = 36.5456+/-1.6959 degrees, omega = 3.4562 +/- 0.0209 rad/sec
mitchell1.csv:
- Good time
- A = 31.3807+/-0.0897 degrees, omega = 3.6081 +/- 0.0021 rad/sec
soren1.csv:
- Good time
- A = 9.2986+/-0.0468 degrees, omega = 3.6744 +/- 0.0024 rad/sec
soren2.csv:
- Bad time
- A = 3.3849+/-0.7718 degrees, omega = 3.3386 +/- 0.1057 rad/sec
We have just demonstrated that for large angles, the period of oscillations of a simple pendulum $2\pi(\frac{l}{g})^.5$ fails. In order to study how the pendulum behaves over time, at different angles. Being unable to solve such an equation, we used a numerical integration technique,