Reproducing BTM figure 3.1

Define a function

f[x_,y_] = x^2 + 2 x y

Make a ContourPlot like Shankar's:

ContourPlot[f[x,y],{x,-3,3},{y,-3,3}]

Decide to add more contours, axes and labels:

plotC = ContourPlot[f[x,y],{x,-3,3},{y,-3,3},Contours->18,Axes->True, AxesLabel->{"X axis","Y axis"},PlotLabel->"BTM figure 3.1"]

Next draw the parametric plot for a circle of radius 2:

plotP = ParametricPlot[2{Cos[α],Sin[α]},{α,0,2π},PlotStyle->{Thick,Green}]

And assemble:

Show[plotC,plotP]

To do Shankar one better, find the extrema by the Lagrange multiplier method.  We define the constraint function g(x,y) such that our curve is the locus of points where g(x,y)==0, then construct F(x,y,λ):

g[x_,y_] = x^2 + y^2 - 4

F[x_,y_,λ_] = f[x,y] + λ g[x,y]

Then form the equations which say that F is extremized, and solve them:

eqnx = D[F[x,y,λ],x]==0

eqny = D[F[x,y,λ],y]==0

eqnλ = D[F[x,y,λ],λ]==0

solns = Solve[{eqnx,eqny,eqnλ},{x,y,λ}]

Form a list of points from these solutions and then ListPlot those points:

points = {x,y}/. solns

plotL = ListPlot[points,PlotStyle->{Red,PointSize[.02]}]

And assemble in to a final figure:

Show[plotC,plotP,plotL]

Animating the Cycloid

A pebble in a tire execute motion of the form

point[t_] = {v0 t, R} + R { Sin[v0 t/R],Cos[v0 t/R]}

From this we get the velocity

point'[t]

And the acceleration---let's display this result in column vector format:

point''[t]//MatrixForm

Specifically at the top (t=0) the velocity and acceleration are:

point'[0] //MatrixForm

point''[0] // MatrixForm

If we were executing uniform circular motion, from (Subscript[a, r])=(-v^2/r) we'd conclude that radius of the motion (the "radius of curvature" at t=0)  has to be r=-(Subscript[a, r])/(Subscript[v, θ])=4R.
To make a drawing of this, choose some numerical parameters:

pt[t_] = point[t]/.{R->1,v0->1}

cycloid=ParametricPlot[pt[t],{t,-2π,2π}]

And here is a circle of radius 4 translated down by a vector (0,-2) so that it touches the cycloid:

circle = ParametricPlot[4{Cos[α],Sin[α]}-{0,2},{α,0,2π},PlotStyle->Red]

Show[circle,cycloid]

For extra fun, let's animate the motion.
First define our field of view, then define a function to draw our point:

myrange = {{0,7},{-0.5,2.5}}

drawPt[t_] := ListPlot[{pt[t]},PlotRange->myrange,PlotStyle->{PointSize[.02],Red}]

Animate[drawPt[t],{t,0,2π}]

If we want to add the wheel and the cycloid:

cycloid = ParametricPlot[pt[t],{t,0,2π},AspectRatio->3/7,PlotRange->myrange]

drawWheel[t_] := ParametricPlot[{Cos[α],Sin[α]}+{t,1},{α,0,2π}]

Animate[Show[cycloid,drawPt[t],drawWheel[t]],{t,0,2 π}]

And finally let's add in the instantaneous velocity and acceleration vectors.
For that we need to load a package:

Needs["VectorFieldPlots`"]

which defines the function ListVectorFieldPlot among others.
The following incantation asks for the two vectors two be drawn, each with their base at the location pt[t]:

drawVectors[t_] := ListVectorFieldPlot[{{pt[t],pt'[t]},{pt[t],pt''[t]}}]

Animate[Show[cycloid,drawPt[t],drawWheel[t],drawVectors[t]],{t,0,2 π}]

Morin 3.40

We drop a ball from height h, and it hits a redirector at height y0.  From energy conservation we know the speed it has as it hits:

speed = Solve[ m g h == m g y0 + (1/2) m v^2,v]

Let's take the positive one and ask for the motion from there:

ballistic = DSolve[{y''[t]== -g, x''[t]==0,x'[0]== v/.speed[[2]],y'[0]==0,x[0]==0,y[0]==y0},{x[t],y[t]},t]

Next ask for the time when we hit the ground:

time = Solve[(y[t]/.ballistic[[1]])==0,t]

Tell yourself, "oh yeah, I know how long it takes to fall a height y0 starting from rest"
before selecting the 2nd time and forming the distance we go:

d[y0_] = x[t]/.ballistic[[1]] /. time[[2]]

To optimize the distance we ask for:

Solve[d'[y]==0,y]

And now some fun, make a parametric plot of the full motion.  First figure out how long it takes to fall and hit the diverter.

Solve[ h - (1/2) g t^2 == y0,t]

T= t/.%[[2]]

Then form piecewise continuous expressions for x[t] and y[t] by gluing together the two parts of the motion:

x[t_] := Piecewise[{{0,t<T},{v0 (t-T),t>T}}]

To use this expression we of course need to definre the speed at the diverter, using the above:

v0 = v/.speed[[2]]

And we need a similar expression for y[t]:

y[t_] := Piecewise[{{h-(1/2) g t^2,t<T},{y0-(1/2)g (t-T)^2,t>T}}]

Let's recap:

{x[t],y[t]}

To plot this we need to choose numerical values:

p={g->1,h->1}

{x[t],y[t]}/.p

And here is a widget for finding the optimimum diverter height "by hand".

Manipulate[ParametricPlot[{x[t],y[t]}/.p /. y0->q,{t,0,2},PlotRange->{{0,1},{0,1}}],{q,0,1}]

And here is a movie:

drawPath[q_] := ParametricPlot[{x[t],y[t]}/.p /. y0->q,{t,0,2},PlotRange->{{0,1},{0,1}}]

Manipulate[Animate[Show[drawPath[q],ListPlot[{{x[t],y[t]}/.p/.y0->q},PlotStyle->{Red,PointSize[.03]}]],{t,0,2}],{q,0,1}]

Morin 5.45

A spring of length L is compressed to 0 length, so we have energy (1/2) k L^2 to start. 
A mass m is attached and launched around a circle of radius R.  What is the condition
such that we stay in contact with the circle, even at the top?
Energy conservation:

eqnE = (1/2) k L^2 == (1/2) m v^2 + (1/2)k (2 R - L)^2 + 2 m g R

Radial component of F=ma:

eqnR = -m g - k (2 R - L) == - m v^2/R

Solve to find L and finish the assigned problem:

Solve[{eqnE,eqnR},{v,L}]//Simplify