# Chaplygin sleigh problem: plotting the trajectory of the sleigh in the xy-plane

The Chaplygin sleigh problem is very popular in nonholonomic mechanics (more details can be seen in Bloch, Nonholonomic Mechanics and Control, Springer, New York, 2015, section 1.7, pp 29-30),

The Chaplygin sleigh is a rigid body moving on two sliding posts and one knife edge

The equations are:

$\qquad v =\dot{x}\cos\theta+\dot{y}sin\theta,$

$\qquad \ddot{\theta} =\dot{\omega}=-\frac{ma}{1+ma^2}v\omega.$

where $v$ is the velocity in the direction of motion, and

$\qquad \dot{v}=a(\cos^2\theta+\sin^2\theta)\dot{\theta}^2=a\dot{\theta}^2=a\omega^2.$

In Mathematica, I can plot the trajectory in $vω$ space, but how can I plot the Chaplygin sleigh model trajectory in $xy$ space?

My code as follows (maybe something wrong):

Clear["Global*"]
m = 1; a = 1;
sol =
NDSolve[
{w'[t] == -v[t]*w[t]*m*a/(1 + m*a^2),
v'[t] == a*w[t]^2,
w[0] == 0.2, v[0] == 0.1},
{w, v}, {t, -4, 4}]

ParametricPlot[Evaluate[{w[t], v[t]} /. sol], {t, -4, 4}]


The result in the referenced text is:

• Are you missing a minus sign in the equation for w'[t]? Dec 16 '17 at 10:00
• yeah, thank you, there is some mistake.@aardvark2012
– Ben
Dec 16 '17 at 10:11

If you want to plot in $xy$ space, you need to solve for $x$ and $y$ first. It's not obvious to me what parameters and initial conditions are used for the reference figure, so I chose them casually:

m = 1; a = 1;
sol = NDSolve[{w'[t] == -v[t]*w[t]*m*a/(1 + m*a^2), v'[t] == a*w[t]^2, w[0] == 0.2,
v[0] == 0.1,

θ''[t] == w'[t], θ[0] == Pi, θ'[0] == 1,
x'[t] == v[t] Cos[θ@t], y'[t] == v[t] Sin[θ@t],
x[0] == 0, y[0] == 0}, {w, v, θ, x, y}, {t, -10, 6}];
ParametricPlot[Evaluate[{x[t], y[t]} /. sol], {t, -9, 6}]
`

• I appreciate your help, it enriched my knowledge on mathematica, thank you for your kindness and enthusiasm!
– Ben
Dec 16 '17 at 15:35
• 谢谢,才发现咱们都是中国人,向你学习! :) @xzczd
– Ben
Dec 17 '17 at 9:06