Mechanics
Mathematica Documentation
Mathematica Source Code
Page 4
(Tennis.ma)
A tennis player during her service throws a 59-g tennis ball straight
up and at the peak of its trajectory hits it with her racket which exerts
a horizontal force given by F = at + bt^2, where a= 1200 N/ms, and b=400
N-ms^(-2). The ball separates from the racket after t=3.0 ms, where t is
measured from the time the racket first contacts the ball.
a) Sketch the impulse as a function of the time using a spreadsheet and
determine i) the impulse and ii) the average impulsive force
b) Using maple or mathematica or other means, determine the impulse and
the average impulsive force.
Solution
Enter constants
m = 59/1000
a = 1200
b = 400
Equation for force on tennis ball
F = a*t - b*t^2
Plot[F, {t,0,3}, PlotLabel -> "Force vs. time"]
Find the impulse on the ball
impulse = Integrate[F,{t,0,3}]
Find the average impulse
avgimpulse = impulse/(3-0)
A stud wall has been built by construction workers and carelessly left
standing upright unsupported. It has a mass of 11.5 kg and a height of
2.66 m. The wall CM is 1.33 m from either end, and its moment of inertia
with respect to an axis running through the side on the ground is 36.7
kg-m^2. The wall is accidentally brushed by a worker as he goes by, giving
it an initial angular velocity of 0.05 radians/sec.
a) Determine the angular velocity when the wall hits the ground.
b) Find the time for the wall to hit the ground, using a numerical integration
technique.
Solution
Generate a total energy equation. (Uo + Ko = Uf + Kf)
Uo := m*g*L/2
Ko := inertia*omega0^2/2
Uf := m*g*L*Cos[theta]/2
Kf := inertia*omega^2/2
toteng = Uo + Ko == Uf + Kf
Solve the equation for omega.
omegaexp = Solve[toteng, omega]
Assign the positive solution.
omegaexp = (g*L*m + inertia*omega0^2 - g*L*m*Cos[theta])^(1/2)/inertia^(1/2)
To find the angular velocity when the wall hits the ground, set
theta to be Pi/2. But first, define the constants given.
m := 11.5
g := 9.8
L := 2.66
inertia := 36.7
omega0 := .05
omega_ground = omegaexp/.theta -> Pi/2
Now since omega = d(theta)/dt, 1/omega would equal dt/d(theta)
dtexp = 1/omegaexp
Numerically integrating this expression in terms of theta will give
us t, the time for the wall to fall over.
time_fall = NIntegrate[dtexp, {theta, 0, Pi/2}]

A mass M hangs from a fixed support by a thin thread. An identical thread is connected to the bottom of mass M. By grasping the bottom thread, a person can make either the top thread bread or the bottom thread break. Discuss how this would be done. [1-2 min TPS; yank sharply on lower thread to break it first.]
We will model the 'inertial' effect of the mass M when we pull suddenly on the lower thread by treating the threads as springs. Each thread has the same spring constant k, the same unstretched length Lo, and the same breaking strength B. The threads (springs) will break when the force exceeds B and the extension of the spring exceeds D= B/k. D is then the maximum extension of the spring before the string breaks.
Before we pull on the lower spring, (t<=0) mass M is at equilibrium. The upper spring is stretched by an amount Mg/k, and exerts an upward force of Mg, opposite to the mass's weight. All distances are measured positive downward from the fixed support. Pulling on the bottom thread means that the free end of the lower spring travels at a constant velocity V.
h(t) is the upper spring length, from the support to mass M. At t=0, h(0) =Lo + Mg/k. x(t) is the distance downward from h(0) to mass M. At t=0, x(0)=0. After t=0, h(t) = Lo + Mg/k + x(t).
s(t) is the lower spring length from mass M to the free end. At t=0, s(0) = Lo. After t=0, s(t) = Lo+Vt -x(t).
The net force on the mass M is then Fnet = +Mg -k( h(t) - Lo ) + k( s(t) - Lo ).
a) Collect the information above, and write Fnet in terms of x(t), M,
g, k, V and t.
b) If the yank on the lower thread is violent enough, the mass will hardly
move before the lower thread snaps. This means that x(t) is practically
zero, so the force in the lower spring is only due to the rapid stretching
from Vt. Write down the net force on the mass in terms of t, assuming that
x(t) is nearly zero.
c) Solve Fnet = Ma for the displacement x(t), assuming that in Fnet x can
be set to zero. (The second time derivative of x(t) won't be close to zero,
even though x is nearly zero.). [Use dsolve, or integrate by hand].
d) Now let M = 1.15 kg, k = 100 N/m, Lo = 0.18 m and V = 14.0 m/s. Assume
either thread will break when the force is 12.00 N. [The upper thread is
quite close to breaking before the lower thread is pulled at all.] Calculate
the time for the lower thread to break. [Recall that s(t) is the length
of the lower spring.]
e) From the displacement of the mass M from the time in part d), calculate
the force on the upper thread, and find out if it broke before the lower
thread broke. [Don't forget that the upper thread has over 11 N on it to
begin with!]
Solution
Part A
Enter in equations for h[t] and s[t]
ht = Lo + m*g/k + xt
st = Lo + V*t - xt
Equation for Fnet
Fnet = m*g-k*(ht - Lo) + k*(st - Lo)
Part B
Equation for Fnet assuming that x[t] is practically
0
Fnet2 = Fnet/.xt -> 0
Part C
Put equation in differential form.
FnetDE = D[x[t],{t,2}] == Fnet2
Solve for x[t] using initial conditions.
sol = DSolve[{FnetDE,x[0] == 0, x'[0] == 0},x[t],t]
Set xt equal to the "right hand side" of sol.
xt = k*t^3*V/6
Problem can also be solved using integration.
Integrate once to find the velocity of the mass.
[NOTE: Mathematica does not add the constant of integration, but it is
not needed in this case.]
vt = Integrate[Fnet2,t]
Integrate a second time to find position of the mass. This is
the same result obtained from the differential equation.
xt = Integrate[vt,t]
Part D
Enter in values given in the problem.
g := 98/10
m := 115/100
k := 100
Lo := 18/100
V := 14
Fbreak := 12
Force on lower spring.
Flower = k*(st - Lo)
Find the time for the lower spring to break by solving for t when
Flower = Fbreak.
sol2 = NSolve[Flower == Fbreak,t]
Pick the smallest positive solution for the time that the spring
will break.
Timebreak = .00858196
Part E
Equation for the position of the mass with constants.
xt
Find the position of the mass when t = Timebreak
[NOTE: the mass has moved very little, so our assumption is correct]
xtBreak = xt/.t -> Timebreak
Find the force on the upper spring by multiplying k by the distance
the spring is stretched from its free length.
Fupper = k*(xtBreak + m*g/k)
Answer can also be found by substituting in t = Timebreak into the
equation below.
Fupper = k*(ht - Lo)
Force on the upper string when the lower string breaks.
Fupper/.t -> Timebreak
In the yank.ma problem, don't assume that x(t) is nearly zero in the
force equation. Solve the full Fnet = Ma equation for x(t) using dsolve.
a) Obtain the solution x(t) in terms of two arbitrary constants. Then use
the condition that x(0) = 0 and dx/dt(0) = 0 to evaluate the two arbitrary
constants.
b) Use the dsolve command again, but this time include the boundary conditions
right in the command, so that the solution automatically fits the two boundary
conditions.
c) Now let M = 1.15 kg, k = 100 N/m, Lo = 0.18 m and V = 14.0 m/s. Assume
either thread will break when the force is 12.00 N. [The upper thread is
quite close to breaking before the lower thread is pulled at all.] Calculate
the time for the lower thread to break.
d) Determine the force on the upper thread when the lower one breaks. Which
thread broke first?
Going Further: Solve for the velocity V which breaks both strings at once.
Velocities faster than this should break the lower spring first, and slower
velocities will break the upper one first. [Answer: both break @ 2.13 m/s]
Solution
Part A
Enter in equations for h[t] and s[t]
ht = Lo + m*g/k + x[t]
st = Lo + V*t - x[t]
Equation for Fnet
Fnet = m*g - k*(ht - Lo) + k*(st - Lo)
Put equation in differential form.
FnetDE = D[x[t], {t,2}] == Fnet
Solve for x[t] using the dsolve command.
sol = DSolve[FnetDE, x[t],t]
Convert the solution using Euler's identities.
xt = (t*V)/2 + C[1]*Cos[2^(1/2)*k^(1/2)*t] + C[2]*Sin[2^(1/2)*k^(1/2)*t]
v[t] is the derivative of x[t]
vt = D[xt,t]
Write two independent equations that satisify the initial conditions
of the problem.
x[0] = 0
v[0] = 0
eq1 = (xt/.t -> 0) == 0
eq2 = (vt/.t -> 0) == 0
Solve the two equations for the two unknowns: C[1] and C[2]
constants = Solve[{eq1,eq2},{C[1],C[2]}]
Display the current contents of xt.
xt = xt/.{C[1] -> 0, C[2] -> -V/(2*2^(1/2)*k^(1/2))}
Part B
Solve for x[t] using initial conditions.
sol = DSolve[{FnetDE,x[0] == 0, x'[0] == 0}, x[t],
t]
Convert the solution using Euler's identities.
Needs["Algebra`Trigonometry`"]
sol/.{Rule->Equal}//ComplexToTrig//ExpandAll
Solution is the same as above.
Part C
Force on lower spring.
Flower = k*(st-Lo)
Substitute in the solution for x[t] into the above equation.
Flower1 = Flower/.x[t] -> xt
Substitute in the values given in part C.
Flowersub = Flower1/.{k -> 100, V -> 14}
Find the time for the lower spring to break by solving for t when
Flowersub = 12N.
TimeBreak = FindRoot[Flowersub == 12, {t,0}]
Assign the solution.
TimeBreak = .00858196
Part E
Equation for the position of the mass with constants.
xtsub = xt/.{V -> 14, k -> 100}
Force on the upper spring
Fupper = k*(ht - Lo)
Substitute in known values into the above equation.
Fuppersub = Fupper/.{k -> 100, m -> 115/100,
g -> 98/10, x[t] -> xtsub}
Force on the upper string when the lower string breaks
Fuppersub/.t -> TimeBreak//N
The lower thread breaks first because the force on the upper thread is less than 12N.
Going Further.
Find the position of the mass in terms of V.
xtsub2 = xt/.k -> 100
The force on the upper spring in terms of V is:
Fuppersub2 = Fupper/.{k -> 100, m -> 115/100,
g -> 98/10, x[t] -> xtsub2}
Force on the lower spring in terms of V.
Flowersub2 = Flower/.{k -> 100, m -> 115/100,
g -> 98/10, x[t] -> xtsub2}
Draw an animation of the force on the upper and lower springs as
V increases. The horizontal line on the graph is the 12N breaking point
of the spring.
Do[Plot[{Fuppersub2, Flowersub2,12},{t,0,.2}, PlotRange
-> {{0,.2},{0,50}}],{V,0,4,.5}]
We want both springs to break under a 12N force at the same time.
eq1 = Fuppersub2 == 12
eq2 = Flowersub2 == 12
Solve the above system of equations for V and t.
sol = FindRoot[{eq1,eq2},{V,3},{t,.05}] {V ->
2.13185, t -> 0.0597134}
Both springs will break at the same time when V = 2.13185 m/s.
Substitute in the value obtained for V into the spring force equations.
sub2 = {Fuppersub2//N,Flowersub2//N,12}/.{sol[[1]]}
Plot[{sub2[[1]],sub2[[2]],sub2[[3]]},{t,0,.2}, PlotLabel -> "Graph
of forces on springs when V = 2.13185 m/s", PlotStyle -> {{RGBColor[1,0,0]},{RGBColor[0,1,0]},
{RGBColor[0,0,1]}}]