What shape must a bowl be to have a ball rolling in the bowl execute perfect simple harmonic motion? If we imagine a 2d semisphere "bowl" with a ball resting at the bottom. The ball can be slightly displaced and will roll back and forth crossing the bottom of the bowl an infinite number of times over and over. I believe this motion can be approximated to be simple harmonic for small displacements from equilibrium, but it isn't completely.
What shape of bowl would be needed (it looks like $y=x^2$ doesn't work: Ball Rolling in a Parabolic Bowl) in order to have a ball placed at any point in the bowl to execute simple harmonic motion. Is this possible?
Edit: in reality I'm actually curious about a point mass "ball" with no moment of inertia for simplicity
 A: inspired from Mr. @ Phillip Wood
start with cycloidal equation
$$x=a \left( \varphi +\sin \left( \varphi  \right)  \right)\\
y=a \left( 1-\cos \left( \varphi  \right)  \right)$$
from here you obtain
$$x(y)=a \left( \arccos \left( {\frac {-y+a}{a}} \right) +\sqrt {{\frac {y
 \left( -y+2\,a \right) }{{a}^{2}}}} \right) 
$$
with the position vector
$$\mathbf R=\begin{bmatrix}
  \pm\,x(y) \\
  y \\
\end{bmatrix}$$
the kinetic energy :
$$T=\frac m2 \mathbf{\dot{R}}\,\cdot \mathbf{\dot{R}}= \frac{m\,a}{y}\dot y^2$$
the potential energy  :
$$U=-m\,g\,y$$
And the equation of motion
$$\ddot y+\frac{g}{2\,a}\,y-\frac{\dot y^2}{2\,y}=0\tag 2$$
hence
only if $\,\dot y\mapsto 0~$ you obtain SHM

edit
the solution of equation (2) with the initial conditions $~y(0)=y_0~,\dot y(0)=0~$ is
$$y(t)=\frac{y_0}{2}+\frac{y_0}{2}\,\cos(\omega\,t)\quad,\omega^2=\frac{g}{2a}$$
$\Rightarrow\quad y(t)-\frac{y_0}{2}~$ is SHM
A: What shape must a bowl be to have a ball rolling in the bowl execute perfect simple harmonic motion?
starting with the position vector to the mass
\begin{align*}
 &\mathbf{R}=\begin{bmatrix}
               x(y) \\
               y \\
             \end{bmatrix}
\end{align*}
where $~x(y)~$  is arbitrary function and y is the generalized coordinate
from here the kinetic , potential energy
\begin{align*}
 &T=\frac{m}{2}\left(x'^2+1\right)\,\dot y^2\\
 &U=-m\,g\,y\\
\end{align*}
and the total energy
\begin{align*}
 &E_s= \frac{m}{2}\left(x'^2+1\right)\,\dot y^2+m\,g\,y\\
\end{align*}
where $~x'=\frac{dx}{dy}$
for SHM the total energy must be (Ansatz)
\begin{align*}
 &E_{\text{shm}}=\frac{m}{2}\dot{y}^2+\frac k2\,y^2
\end{align*}
\begin{align*}
  &\text{with conservation of the energy }\\ & E_s=\frac{m}{2}\left(x'^2+1\right)\,\dot y^2+m\,g\,y=m\,g\,y_0\quad\Rightarrow\quad \dot y^2=-\frac{2\,g(y-y_0)}{x'^2+1}\\
  & E_{shm}=\frac{m}{2}\dot{y}^2+\frac k2\,y^2=\frac k2\,y_0^2\quad\Rightarrow\quad 
  \dot y^2=-\frac km\,(y^2-y_0^2)  
\end{align*}
and solving for $~x'^2~$ with $~y_0=0$
\begin{align*}
  &\left(\frac{dx}{dy}\right)^2=\frac{2\,a}{y}-1\quad, a=\frac{\,m\,g}{k}
\end{align*}
this differential equation fulfilled the  cycloid equation
\begin{align*}
 &x=a\,(\varphi +\sin(\varphi))\\
 &y=a\,(1 -\cos(\varphi))\\
\end{align*}
hence the shape that create SHM is cycloid

edit
for $~y_0\ne 0~$ you obtain
$$\left( {\frac {d}{dy}}x \left( y \right)  \right) ^{2}=-{\frac {y}{y+
{\it y0}}}+2\,{\frac {mg}{ \left( y+{\it y0} \right) k}}-{\frac {{\it 
y0}}{y+{\it y0}}}
\tag A$$
this differential equation fulfilled also the  cycloid equation. solving Eq. (A) you obtain $~x=x(y)~$ the solution of the equation of motion is now
$$y(t)=y_0\,\cos\left(\omega\,t\right)\\
\omega^2=\frac km=\frac ga$$
A: The shape needed is one 'loop' or 'festoon' of a cycloid (or an upside-down cycloid). Taking the bottom of a loop as origin, the loop's equation may be written as
$$x=a(\theta + \sin \theta),\ \ \ \ y=a(1-\cos\theta)$$
for $-\pi<\theta<\pi$, with $\theta=0$ at the bottom of the loop. We see that the horizontal range of the loop is $-\pi a<x<\pi a$. A bead threaded on this loop will perform SHM (not just approximate SHM) from whatever point on the loop it is released. [We can, of course, envisage a particle sliding in a bowl, vertical sections of which, passing through the lowest point, are cycloidal. A rolling ball will also perform translational SHM – at $\sqrt {\frac 57}$ of the frequency derived below, if the rolling ball is homogeneous.]
We can show that the arc length from the origin is
$$s=4a \sin \frac{\theta}2$$ and this gives us the neat relation
$$s^2 = 8ay$$
If the amplitude of the motion, expressed as a maximum height is $y_0$ (where $y_0<2a$), and as an arc length is $s_0$ (where $s_0<4a$), we can write the energy conservation equation as
$$\tfrac12m \left(\frac{ds}{dt}\right)^2+mgy=mgy_0$$
That is
$$\left(\frac{ds}{dt}\right)^2+\frac g{4a} s^2=\frac g{4a} s_0^2$$
You'll find that this is satisfied by
$$s=s_0 \cos (\omega t + \phi)$$
with $\omega=\sqrt {\frac g{4a}}$. No approximations and a finite amplitude!
Addendum [inspired by dialogue of comments on Eli's answer]
As an alternative to the last step, if you differentiate the energy equation, $\left(\frac{ds}{dt}\right)^2+\frac g{4a} s^2=\frac g{4a} s_0^2\ \ $ wrt time, $t$, and tidy up you get the equation of motion
$$\frac{d^2 s}{dt^2} + \frac g{4a} s = 0.$$
A: Simple Harmonic Motion takes place along a straight line, so the bowl shape leads approximately to SHM only if the displacement is very small.
The acceleration down a slope depends on the angle $\theta$ with the horizontal ($x$ axis), it's $g\sin\theta$.  For small angles that's equal to $g\tan\theta$  as both sin and cos approximate to $\theta$ for small angles.
For SHM the acceleration must be proportional to $x$
so the acceleration is $$g\sin\theta = g\tan\theta = g\frac{dy}{dx} = kx$$
Where $k$ is a constant of proportionality
Solving this gives $$y = \frac{kx^2}{2g}$$
and the ball will do SHM in such a bowl, but only for small displacements.
