PROBLEM: The figure above shows an accelerometer, a device for measuring the horizontal acceleration of cars and airplanes. A ball is free to roll on a parabolic track described by the equation $y=x^2$, where both x and y are in meters. A scale along the bottom is used to measure the ball’s horizontal position x. Find an expression that allows you to use a measured position x (in m) to compute the acceleration $a_x$ (in $m/s^2$). (For example, $a_x = 3x$ is a possible expression.)
PROFESSOR'S EXPLANATION: By looking at a small portion of the parabola, the balls motion can be approximated to a ramp, with a base of dx, a height of dy, and an angle of $\theta$. The two forces acting on the ball are $F_g$ and the normal force, n. The normal force can be split into a horizontal component parallel to the base of the ramp, and a vertical component parallel to the height of the ramp. The horizontal component equals $n*sin(\theta)$, and the vertical component equals $n*cos(\theta)$.
The next step is what confuses me. He says that $F_g = n*cos(\theta)$. Thus $mg = n*cos(\theta)$ and $n = \frac{mg}{cos(\theta)}$. This implies the sum of the forces vertically is 0, which is confusing because the ball is accelerating down the ramp. This also conflicts with what I've learned before about motion down a ramp, where the normal force is usually $mg * cos(\theta)$
If you continue with his explanation however, everything else makes sense and you reach the correct answer. By substituting what you got for n into the horizontal component of the normal force, you get $F_{x net} = \frac{mgsin(\theta)}{cos(\theta)} = mgtan(\theta)$. This leads to $ma_x = mgtan(\theta)$ which leads to $a_x = gtan(\theta) = g\frac{dy}{dx}$. Looking at the original problem and our theoretical ramp, $\frac{dy}{dx} = 2x$. Thus $a_x = g2x$.
Why is the normal force in this problem $\frac{mg}{cos(\theta)}$ and not $mg * cos(\theta)$ like it normally is? How can you set $F_g$ equal to $n*cos(\theta)$ when the ball is accelerating down the ramp? Any help is appreciated.