(*^
::[ Information =
"This is a Mathematica Notebook file. It contains ASCII text, and can be
transferred by email, ftp, or other text-file transfer utility. It should
be read or edited using a copy of Mathematica or MathReader. If you
received this as email, use your mail application or copy/paste to save
everything from the line containing (*^ down to the line containing ^*)
into a plain text file. On some systems you may have to give the file a
name ending with ".ma" to allow Mathematica to recognize it as a Notebook.
The line below identifies what version of Mathematica created this file,
but it can be opened using any other version as well.";
FrontEndVersion = "Macintosh Mathematica Notebook Front End Version 2.2";
MacintoshStandardFontEncoding;
fontset = title, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, e8, 24, "Times";
fontset = subtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, e6, 18, "Times";
fontset = subsubtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, italic, e6, 14, "Times";
fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, bold, a20, 18, "Times";
fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, bold, a15, 14, "Times";
fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, bold, a12, 12, "Times";
fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times";
fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 10, "Times";
fontset = input, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L-5, 12, "Courier";
fontset = output, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier";
fontset = message, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, R65535, L-5, 12, "Courier";
fontset = print, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier";
fontset = info, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, B65535, L-5, 12, "Courier";
fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakInGroup, nowordwrap, groupLikeGraphics, M7, l36, o74, w336, h151, 12, "Courier";
fontset = name, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, 10, "Geneva";
fontset = header, inactive, noKeepOnOnePage, preserveAspect, M7, 12, "Times";
fontset = leftheader, inactive, L2, 12, "Times";
fontset = footer, inactive, noKeepOnOnePage, preserveAspect, center, M7, 12, "Times";
fontset = leftfooter, inactive, L2, 12, "Times";
fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 10, "Times";
fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times";
fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times";
fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times";
fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times";
fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times";
fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times";
fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times";
paletteColors = 128; currentKernel;
]
:[font = section; inactive; preserveAspect; cellOutline; backColorRed = 58981; backColorGreen = 58981; backColorBlue = 58981]
Your Assignment:
1) Execute the entire notebook. Experiment if you like.
2) Do Problem 24x as best you can.
The assignment is at the end of this problem.
3) Hand in Prob.24x . (Just 3 plots is all I need.)
;[s]
2:0,0;16,1;212,-1;
2:1,19,14,Times,1,18,0,0,0;1,16,12,Times,1,14,0,0,0;
:[font = section; inactive; preserveAspect; cellOutline; backColorRed = 58981; backColorGreen = 58981; backColorBlue = 58981; startGroup]
Ch 4: Problem 9
:[font = input; preserveAspect]
Clear["Global`*"];
:[font = text; inactive; preserveAspect]
Define the position vector.
(Note how we use the "t_" notation to make t a dummy variable. )
:[font = input; preserveAspect]
r[t_]= {3 t, -4 t^2, 2}
:[font = text; inactive; preserveAspect]
Now, compute the velocity vector.
We do this in two ways. The usual way we take derivatives is:
:[font = input; preserveAspect]
v[t_]= D[ r[t] ,t]
:[font = text; inactive; preserveAspect]
There is also a fancy notation that gives the same result:
:[font = input; preserveAspect]
r'[t]
:[font = text; inactive; preserveAspect]
At time t=2, we have
:[font = input; preserveAspect]
r[2]
:[font = text; inactive; preserveAspect]
and
:[font = input; preserveAspect; endGroup]
v[2]
:[font = section; inactive; preserveAspect; cellOutline; backColorRed = 58981; backColorGreen = 58981; backColorBlue = 58981; startGroup]
Ch 4: Problem 10
:[font = input; preserveAspect]
Clear["Global`*"];
:[font = text; inactive; preserveAspect]
First, we define the initial and final velocity vectors.
:[font = input; preserveAspect; startGroup]
v0= {4,-2,3}
:[font = input; preserveAspect; endGroup]
v1= {-2,-2,5}
:[font = text; inactive; preserveAspect]
Acceleration is just dv/dt.
:[font = input; preserveAspect]
dt=4
:[font = input; preserveAspect; endGroup]
a = (v1-v0)/dt
:[font = section; inactive; preserveAspect; cellOutline; backColorRed = 58981; backColorGreen = 58981; backColorBlue = 58981; startGroup]
Ch 4: Problem 24
:[font = input; preserveAspect]
Clear["Global`*"];
:[font = text; inactive; preserveAspect]
First, we define the horizontal and vertical position vectors.
:[font = input; preserveAspect]
x[t_]= x0 + v0x t + (1/2) ax t^2;
y[t_]= y0 + v0y t + (1/2) ay t^2;
:[font = text; inactive; preserveAspect]
Now we must compute the necessary constants. First, we assume:
:[font = input; preserveAspect]
x0=0;
y0=0;
:[font = text; inactive; preserveAspect]
Since gravity only acts in the negative y direction,
:[font = input; preserveAspect]
ax=0;
ay= -10;
:[font = text; inactive; preserveAspect]
Now we only need the velocity components.
:[font = input; preserveAspect]
{v0x,v0y}= { v0 Cos[theta], v0 Sin[theta] }
:[font = text; inactive; preserveAspect]
We know the initial velocity, and the angle.
:[font = input; preserveAspect]
v0=30;
theta=60 Degree //N
:[font = text; inactive; preserveAspect]
Don't forget to convert the angle to Degrees since Mathematica only works with Radians. Now we are ready to compute x and y.
;[s]
3:0,0;51,1;62,0;126,-1;
2:2,13,9,Times,0,12,0,0,0;1,13,9,Times,2,12,0,0,0;
:[font = input; preserveAspect]
{x[2], y[2]}
:[font = text; inactive; preserveAspect]
We can plot this with a ParametricPlot.
:[font = input; preserveAspect]
?ParametricPlot
:[font = input; preserveAspect]
ParametricPlot[{x[t],y[t]} ,{t,0,6}];
:[font = text; inactive; preserveAspect]
We can find the time the object hits the ground by finding when the height equals zero.
:[font = input; preserveAspect]
solution1 = Solve[ y[t]==0 ,t]
:[font = text; inactive; preserveAspect]
Let's get fancy. I can substitute the solution back in to prove y=0 at these times.
:[font = input; preserveAspect]
y[t] /.solution1
:[font = text; inactive; preserveAspect]
Now let's look at the velocity. (I will use the fancy notation, but D[ x[t] ,t] is the same as x'[t])
:[font = input; preserveAspect]
vx[t_]= x'[t]
:[font = text; inactive; preserveAspect]
Note that the horizontal velocity is a dull and boring constant.
:[font = input; preserveAspect]
vy[t_]= y'[t]
:[font = text; inactive; preserveAspect]
The vertical velocity is more interesting. Let us plot this.
:[font = input; preserveAspect]
Plot[ vy[t] ,{t,0,6}];
:[font = text; inactive; preserveAspect]
We can find the time when the ball is at the peak by asking when vy[t]==0
:[font = input; preserveAspect]
solution2= Solve[ vy[t]==0 ,t]
:[font = text; inactive; preserveAspect]
To find the position at the peak,
:[font = input; preserveAspect]
{x[t],y[t]} //. solution2
:[font = text; inactive; preserveAspect]
The first number is the x position, and the second number is the height.
The velocity at the peak is
:[font = input; preserveAspect]
{vx[t],vy[t]} //. solution2
:[font = text; inactive; preserveAspect]
The first number is the x velcoity, and the second number is the y velocity. The y velcoity is zero as it should be.
:[font = text; inactive; preserveAspect]
Another way to find the height is with 2 ay y = vy^2 - v0y^2 where we take the final y velocity (vy) to be zero at the peak.
:[font = input; preserveAspect]
solution3= Solve[ 2 ay y == 0^2 - v0y^2 ,y]
:[font = text; inactive; preserveAspect; endGroup]
We get the same answer as above. Just as a check, let us make sure that the vertical velcoity does vanish
:[font = section; inactive; preserveAspect; cellOutline; backColorRed = 58981; backColorGreen = 58981; backColorBlue = 58981; startGroup]
Ch 4: Problem 24x
:[font = text; inactive; preserveAspect]
Let us do problem 24 over again, but this time we will let the value of theta vary.
:[font = input; preserveAspect]
Clear["Global`*"];
:[font = text; inactive; preserveAspect]
First, we define the horizontal and vertical position vectors.
:[font = input; preserveAspect]
x[t_]= x0 + v0x t + (1/2) ax t^2;
y[t_]= y0 + v0y t + (1/2) ay t^2;
:[font = text; inactive; preserveAspect]
Now we must compute the necessary constants. First, we assume:
:[font = input; preserveAspect]
x0=0;
y0=0;
:[font = text; inactive; preserveAspect]
Since gravity only acts in the negative y direction,
:[font = input; preserveAspect]
ax=0;
ay= -10;
:[font = text; inactive; preserveAspect]
Now we only need the velocity components.
:[font = input; preserveAspect]
{v0x,v0y}= { v0 Cos[theta], v0 Sin[theta] }
:[font = text; inactive; preserveAspect]
We know the initial velocity, and the angle.
:[font = input; preserveAspect]
v0=30;
theta=60 Degree //N
:[font = text; inactive; preserveAspect]
Don't forget to convert the angle to Degrees since Mathematica only works with Radians. Now we are ready to compute x and y.
;[s]
3:0,0;51,1;62,0;126,-1;
2:2,13,9,Times,0,12,0,0,0;1,13,9,Times,2,12,0,0,0;
:[font = input; preserveAspect]
{x[2], y[2]}
:[font = text; inactive; preserveAspect]
We can plot this with a ParametricPlot.
:[font = section; inactive; preserveAspect; cellOutline; backColorRed = 58981; backColorGreen = 58981; backColorBlue = 58981]
********************************************
Your Assignment:
1) By trial and error, find the angle that sends the projectile EXACTLY 60 meters. Just use hit and miss, and look at the plot.
2) Hand in your best shot at 60 meters, as well as two other plots that are very different from 60 meters.
(I've gotten you started below.)
********************************************
;[s]
3:0,0;61,1;332,0;377,-1;
2:2,19,14,Times,1,18,0,0,0;1,16,12,Times,1,14,0,0,0;
:[font = input; preserveAspect]
theta=45 Degree;
ParametricPlot[{x[t],y[t]} ,{t,0,6}];
:[font = input; preserveAspect; endGroup]
theta=50 Degree;
ParametricPlot[{x[t],y[t]} ,{t,0,6}];
^*)