I have a dynamic model like below:

xddot = u1;

thetaddot=u2;

yddot=u1 tan (theta) + (xdot tan (theta) - ydot)

I want to convert it into the second order chained form as:

y1ddot = v1;

y2ddot = v2;

y3ddot = y2v1 + (additional terms)

hope someone can give an idea how to start to get the derivation in second order chained form pattern.

Thank you very much.