The kinematics of the system are given by
Notation here is incredibly confusing. x is used as a 4D full dimensional state vector in the form of [x, theta, x_dot, theta_dot] while x_1 and x_2 are the position vectors for the cart and pendulum in [x, y]. This isn't explained anywhere and is left to the reader to figure out.