{VERSION 6 0 "IBM INTEL NT" "6.0" }
{USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0
1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0
0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }
{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2
2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 1" -1 3 1
{CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8
4 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 2" -1 4 1 {CSTYLE "" -1 -1 "Times
" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 2 1 0 1 0 2 2 0 1 }
{PSTYLE "Heading 3" -1 5 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 1 1
2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }}
{SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 35 "MAT2705-01/04 05S Final Ex
am 1-2-3!" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 29 "1. 1 damped driven \+
oscillator" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 67 "deq:=diff(x(t),t,t)+2*diff(x
(t),t)+26*x(t)=82*cos(4*t)-82*sin(4*t);" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 24 "inits:=x(0)=5,D(x)(0)=0;" }}}{SECT 1 {PARA 4 "" 0 ""
{TEXT -1 8 "response" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 55 "by hand o
n paper, not following these steps in maple..." }}{EXCHG {PARA 0 "> "
0 "" {MPLTEXT 1 0 13 "with(linalg):" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 25 "r^2+2*r+26=0;\nsolve(%,r);" }}}{EXCHG {PARA 0 "> " 0
"" {MPLTEXT 1 0 39 "x_h:=exp(-t)*(c1*cos(5*t)+c2*sin(5*t));" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "x_p:=c3*cos(4*t)+c4*sin(4*t)
;\nsubs(x(t)=x_p,deq);\neval(%);" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 84 "10*c3+8*c4=82,-8*c3+10*c4=-82;\nmatrix([[10,8,82],[-8
,10,-82]]);\nrref(%);\nbacksub(%);" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 26 "x_p:=subs(c3=9,c4=-1,x_p);" }}}{EXCHG {PARA 0 "> " 0
"" {MPLTEXT 1 0 24 "x(t)=x_h+x_p;\ndiff(%,t);" }}{PARA 0 "> " 0 ""
{MPLTEXT 1 0 53 "eval(subs(t=0,rhs(%%)))=5;\neval(subs(t=0,rhs(%%)))=0
;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "matrix([[1,0,-4],[-1,5
,4]]);\nrref(%);\n[c1,c2]=backsub(%);" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 79 "x(t)=subs(c1=-4, c2=0, \nexp(-t)*(c1*cos(5*t)+c2*sin(
5*t))+9*cos(4*t)-sin(4*t));" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1
0 25 "dsolve(\{deq,inits\},x(t));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1
100 "The driving function is a sinusoidal function whose amplitude and
phase shift are easily determined:" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 23 "plot([[0,0],[82,-82]]);" }}}{EXCHG {PARA 0 "" 0 ""
{TEXT -1 23 "The coefficient vector " }{XPPEDIT 18 0 "[82, -82];" "6#7
$\"##),$F$!\"\"" }{TEXT -1 12 " has length " }{XPPEDIT 18 0 "sqrt(2)*8
2;" "6#*&-%%sqrtG6#\"\"#\"\"\"\"##)F(" }{TEXT -1 32 " and angle minus \+
45 degrees, or " }{XPPEDIT 18 0 "-Pi;" "6#,$%#PiG!\"\"" }{TEXT -1 7 "/
4, so:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 81 "f:=82*cos(4*t)-82
*sin(4*t);\nf2:=82*sqrt(2)*cos(4*t+Pi/4);\nsimplify(expand(%%-%));" }}
}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "plot(f-f2,t=0..2*Pi/4);" }}
}{EXCHG {PARA 0 "" 0 "" {TEXT -1 180 "Computer numerical truncation er
ror apparently, but the difference is smaller than the number of digit
s we are using, so it is reasonable to expect that they are the same f
unction." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 87 "Next we plot the solu
tion together with the steady state solution showing them merging:" }}
}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 94 "plot([-4*exp(-t)*cos(5*t)-s
in(4*t)+9*cos(4*t),\n-sin(4*t)+9*cos(4*t)],t=0..5,color=[red,blue]);"
}}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1
17 "2. 2 eigenvectors" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "rest
art:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "with(linalg):" }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "A:=matrix([[4,1,-1],[2,5,-2],[1,1,2
]]);" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 8 "response" }}{EXCHG {PARA
0 "" 0 "" {TEXT -1 97 "The smallest eigenvalue is 3 and it is repeated
twice as a root of the characteristic polynomial:" }}}{EXCHG {PARA 0
"> " 0 "" {MPLTEXT 1 0 14 "eigenvects(A);" }}}{EXCHG {PARA 0 "> " 0 "
" {MPLTEXT 1 0 95 "Alambda:=matrix([[4-lambda,1,-1],[2,5-lambda,-2],[1
,1,2-lambda]]);\ndet(%);\nfactor(%);\nsolve(%);" }}}{EXCHG {PARA 0 "> \+
" 0 "" {MPLTEXT 1 0 113 "matrix([[4-3,1,-1],[2,5-3,-2],[1,1,2-3]]);\nr
ref(%);\naugment(%,[0,0,0]);\nbacksub(%);\n_t[1]*[1,0,1]+_t[2]*[-1,1,0
];" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 87 "If we did this by hand we w
ould have assigned the first parameter to the free variable " }
{XPPEDIT 18 0 "x[2];" "6#&%\"xG6#\"\"#" }{TEXT -1 47 " and the second \+
parameter to the free variable " }{XPPEDIT 18 0 "x[3];" "6#&%\"xG6#\"
\"$" }{TEXT -1 46 ", so chose the two eigenvectors in this order:" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "B:=augment([-1,1,0],[1,0,1])
;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 203 "The following shows that th
is vector must be an eigenvector with eigenvalue 3, so it can therefor
e be represented as a linear combination of the two given eigenvectors
of the matrix with that eigenvalue." }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 44 "evalm(A&*[-1,2,1]);\n3*[-1,2,1];\nevalm(%%-%);" }}}
{EXCHG {PARA 0 "" 0 "" {TEXT -1 133 "Expressing the third vector as a \+
linear combination of the columns of B means solving the linear system
for the unknown coefficients:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT
1 0 41 "augment(B,[-1,2,1]);\nrref(%);\nbacksub(%);" }}}{EXCHG {PARA
0 "" 0 "" {TEXT -1 43 "So this is the explicit linear combination:" }}
}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "2*col(B,1)+1*col(B,2);\neva
lm(%);" }}}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 12 "3. 3 springs" }}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "restart:\nwith(linalg):" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 75 "deqs:=\ndiff(x1(t),t,t)=-10*
x1(t)+6*x2(t),\ndiff(x2(t),t,t)=6*x1(t)-10*x2(t);" }}}{EXCHG {PARA 0 "
" 0 "" {TEXT -1 253 "On the first version of this test, I had inadvert
ently specified the initial conditions with x1 and x2 interchanged not
corresponding to my sketch of the stretched (first) and compressed (s
econd) springs; this is the correct initial data for the figure:" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "inits:=x1(0)=1,x2(0)=0,\nD(x
1)(0)=0,D(x2)(0)=0;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 306 "However, \+
since the equations are symmetric under switching the two variables, s
witching the initial conditions leads to a simple switching of the two
solutions so what were the solutions for x1 and x2 for one set of ini
tial conditions become the solutions for x2 and x1 for the switched in
itial conditions." }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 8 "response" }}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "A:=matrix([[-10,6],[6,-10]])
;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "eigenvects(A);" }}}
{EXCHG {PARA 0 "" 0 "" {TEXT -1 159 "The decoupled equations have the \+
matrix replaced by the eigenvalues for each new coordinate and have si
nusoidal solutions since those eigenvalues are negative:" }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "deqs_new:=\ndiff(y1(t),t,t)=-4*y1(t
),\ndiff(y2(t),t,t)=-16*y2(t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT
1 0 42 "sol_new:=dsolve(\{deqs_new\},\{y1(t),y2(t)\});" }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "sol_inits:=dsolve(\{deqs,inits\},\{
x1(t),x2(t)\});" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 102 "One can easil
y go backwards by identifying the separate frequency contributions to \+
the total solution:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "[x1(
t),x2(t)]=1/2*cos(2*t)*[1,1]-1/2*cos(4*t)*[-1,1];\nevalm(%);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 69 "plot(subs(sol_inits,[x1(t),x
2(t)]),t=0..2*Pi,color=[red,blue,green]);" }}}{EXCHG {PARA 0 "> " 0 "
" {MPLTEXT 1 0 67 "plot(subs(sol_inits,[x1(t),x2(t)]),t=0..Pi,color=[r
ed,blue,green]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 502 "The first sp
ring is intially stretched so will pull back on the first mass, decrea
sing its displacement to the right, moving back towards the left, whil
e the middle spring is compressed, so it will push the first mass back
wards acting in concert with the first spring, but it will push the se
cond mass to the right, while the last spring initially exerts no forc
e on the second mass. So the first mass will start moving to the left \+
[down in the plot], and the second mass to the right [up in the plot].
" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1
81 "For fun, here is the plot of the solution in the plane of the two \+
displacements, " }{XPPEDIT 18 0 "x1;" "6#%#x1G" }{TEXT -1 8 " versus \+
" }{XPPEDIT 18 0 "x2;" "6#%#x2G" }{TEXT -1 172 ". Notice that this sol
ution never enters the 2nd quadrant where the first spring is displace
d to the left and the second spring to the right of their equilibrium \+
positions:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 75 "plot([op(subs
(sol_inits,[x1(t),x2(t)])),t=0..2*Pi],color=[red,blue,green]);" }}}}}}
{MARK "0 0 0" 35 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1
2 33 1 1 }