In this example 7.6 from the book "Classical Dynamics of Particles and Systems 5th Edition by Thornton and Marion"
"Find the frequency of small oscillations of a simple pendulum placed in a railroad car that has a constant acceleration $a$ in the $x$-direction."
Then he writes the equations:
But I did not understand why gravity is not considered in the y-axis. It would look like the x-axis.
To find the equation of x I started from the second law:
integrating and putting the initial conditions I found the example equation.
For the coordinate $y$ I started the same way
which resulted in