 Python Plot (1) A small ball on a smooth semicircle (Animated)

All the python study code can be found in my own repository.

## Purpose

In high school we learned how to use the energy conservation law to get the velocity for a ball slides down a 1/4 circle. However, the time needed in this process is still unknown. The period for a pendulum also uses a approximated expression. In this note, I will try to solve the time evolution for a ball slide down from a smooth semi-circle numerically via python. I will compare the oscillator approximation and accurate result in the same animated figure .

## Theory

According to the energy conservation law

We need a linear differential form and the velocity $v$ should be used. The relation between the angle $\theta$ and the time is

We only consider the simple case that the small ball is initially rest, that is

The x and y coordinate can be expressed as

If $\theta$ is near 0,then $\sin(\theta)\approx \theta$,

This is the equation for a simple harmonic oscillator, when $\theta$ is small enough, this equation works well.

## The Results

I used the function “odeint” to solve the differential equations numerically. I give two examples with the angle $\theta$ is very big or relatively small.

• With the ball initially in the $\theta=\pi/6$, the evolution of oscillator approximations and accurate cases are different but not so big.

• With the ball initially in the $\theta=\pi/2$, the oscillator approximation is not a good approximation now.

Author: Knifelee