{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 }
{CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1
257 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 0 1 0 0
0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 0 0 0 0
0 0 0 1 }{CSTYLE "" -1 260 "" 0 14 0 0 0 0 0 1 1 0 0 0 0 0 0 1 }
{CSTYLE "" -1 261 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1
262 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 263 "" 0 1 0 0
0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 1 0 0 0 0 0
0 0 0 1 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }
{CSTYLE "" -1 266 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1
267 "" 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 268 "" 0 1 0 0
0 0 0 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Tim
es" 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 }}
{SECT 0 {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 3 "" 0 "" {TEXT -1 37 "M
odule 39: Periodic Forcing Functions" }}{PARA 0 "" 0 "" {TEXT -1 0 ""
}}{PARA 0 "" 0 "" {TEXT -1 209 " For a variety of reasons, periodi
c functions arise in natural phenomena, either as forcing functions fo
r systems or as states of systems. They arise so often that their app
earance should be anticipated. " }}{PARA 0 "" 0 "" {TEXT -1 226 " \+
Of course, if you know a periodic function on one period, in a very re
al sense, you know it everywhere. It is no surprise that the Laplace t
ransform can be computed by integrating over only one period. Here is \+
the result." }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 44 "The Laplace transf
orm of a periodic function" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0
15 "with(inttrans):" }}}{PARA 0 "" 0 "" {TEXT -1 12 "Here is the " }
{TEXT 256 7 "Theorem" }}{PARA 0 "" 0 "" {TEXT -1 90 "If F is periodic \+
with period T and sectionally continuous and if f(s) = L[F(t), t, s) t
hen" }}{PARA 0 "" 0 "" {TEXT -1 35 " f(s) = \+
" }{XPPEDIT 18 0 "int(exp(-s*t)*F(t),t=0..T)/(1-exp(-s*T))" "6#*&-%$i
ntG6$*&-%$expG6#,$*&%\"sG\"\"\"%\"tGF.!\"\"F.-%\"FG6#F/F./F/;\"\"!%\"T
GF.,&F.F.-F)6#,$*&F-F.F7F.F0F0F0" }{TEXT -1 2 ".\n" }}{PARA 0 "" 0 ""
{TEXT -1 47 "Proofs for this can be found in standard texts." }}}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 152 "We prese
nt an example. Consider the function with period 1 that is t on the in
terval from 0 to 1. We graph this function and find its Fourier transf
orm." }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 23 "Example 1. t - floor(t)"
}}{PARA 0 "" 0 "" {TEXT -1 82 "To understand how to describe this func
tion to Maple, we need the function called " }{TEXT 264 5 "floor" }
{TEXT -1 1 "." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "?floor" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "plot(t-floor(t),t=-1..3,disc
ont=true);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "
" 0 "" {TEXT -1 281 " We compute the Laplace transform of t - floo
r(t). If you believe the Theorem for computing the Laplace transform f
or a periodic function, then ex1 below will be the Laplace transform. \+
As it turns out, Maple does not know the Laplace transform for t - flo
or(t) as you will see." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 ""
0 "" {TEXT -1 111 "For this example, T = 1, and on the interval [0,1],
F(t) = t. Thus, the Laplace transform could be computed as " }}{PARA
0 "" 0 "" {TEXT -1 54 " Laplace( t - floor(t), t, s) \+
= " }{XPPEDIT 18 0 "int(exp(-s*t)*t,t = 0 .. 1)/(1-exp(-1*s));" "
6#*&-%$intG6$*&-%$expG6#,$*&%\"sG\"\"\"%\"tGF.!\"\"F.F/F./F/;\"\"!F.F.
,&F.F.-F)6#,$*&F.F.F-F.F0F0F0" }{TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0
"" {MPLTEXT 1 0 38 "int(exp(-s*t)*t,t=0..1)/(1-exp(-1*s));" }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "ex1:=combine(simplify(%));" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "with(inttrans):" }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 104 "laplace(t-floor(t),t,s);\nresult:=
simplify(%);\nexpand(numer(result)*exp(s))/expand(denom(result)*exp(s)
);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 ""
{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 41 "The result is \n \+
" }{XPPEDIT 18 0 "(s+1-exp(s))/(s^2*(1-exp(s))" "6#*&
,(%\"sG\"\"\"F&F&-%$expG6#F%!\"\"F&*&F%\"\"#,&F&F&-F(6#F%F*F&F*" }
{TEXT -1 7 ". \n\n\n" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 156 "A
nother example would be a function which has period 2, which is -1 on \+
[ -1, 0] and which is 1 on [0,1]. We compute the Laplace transform for
this function." }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 55 "Example 2: Odd
extension of Heaviside(t) with period 2." }}{PARA 0 "" 0 "" {TEXT -1
0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "with(inttrans):" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 92 "plot(2*Heaviside(t)-2*Heavis
ide(t-1)+2*Heaviside(t-2)-\n 2*Heaviside(t-3)-1,t=-1..3.5);" }}}
{PARA 0 "" 0 "" {TEXT -1 149 "We compute the Laplace transform of the \+
periodic extension of the signum function of period 2 as extended to t
he positive numbers. The result will be" }}{PARA 0 "" 0 "" {TEXT -1 0
"" }}{PARA 0 "" 0 "" {TEXT -1 57 "Laplace of the odd, periodic extensi
on of Heaviside(t): " }{XPPEDIT 18 0 "(int(exp(-s*t)*1,t = 0 .. 1)+in
t(exp(-s*t)*(-1),t = 1 .. 2))/(1-exp(-2*s));" "6#*&,&-%$intG6$*&-%$exp
G6#,$*&%\"sG\"\"\"%\"tGF/!\"\"F/F/F//F0;\"\"!F/F/-F&6$*&-F*6#,$*&F.F/F
0F/F1F/,$F/F1F//F0;F/\"\"#F/F/,&F/F/-F*6#,$*&F?F/F.F/F1F1F1" }{TEXT
-1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 67 "(int(exp(-s*t)*1,t=0..1)+int(exp(-s*t)*(-1),t=1..2))/
(1-exp(-2*s));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "ex2:=comb
ine(simplify(%));" }}}{PARA 0 "" 0 "" {TEXT -1 25 "The result is \+
" }{XPPEDIT 18 0 "(1-exp(-s))/(s*(1+exp(-s)))" "6#*&,&\"\"\"F%-%
$expG6#,$%\"sG!\"\"F+F%*&F*F%,&F%F%-F'6#,$F*F+F%F%F+" }{TEXT -1 1 "."
}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 171 "We had
to work kind of hard to make a graph of the function we wanted above.
If we take the inverse Laplace transform, maybe we will find an easie
r way to make that graph." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26
"invex2:=invlaplace(%,s,t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0
21 "plot(invex2,t=-1..4);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0
"" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 77 "We
illustrate a differential equation with a periodic forcing function a
gain." }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 55 "Differential equations w
ith periodic forcing functions." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 0 "" 0 "" {TEXT -1 62 " We turn again to the equation y ' + \+
y(t) = t - floor(t)." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "deq
:=diff(y(t),t)+ y(t)=t-floor(t);" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 31 "sol:=dsolve(\{deq,y(0)=0\},y(t));" }}}{EXCHG {PARA 0
"> " 0 "" {MPLTEXT 1 0 35 "plot(rhs(sol),t=0..5,discont=true);" }}}
{PARA 0 "" 0 "" {TEXT -1 109 "An observation to make is that the solut
ion rather quickly approaches what appears to be a periodic solution.
" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 ""
{TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA
0 "" 0 "" {TEXT -1 86 "Here is a problem that could be a first underst
anding of problems in Pharmacokinetics." }}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 32 "An Applicati
on from Pharmacology" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "
" {TEXT -1 199 " We consider a problem in pharmacology. The import
ance of this part of the lecture is not pharmacology; it is the method
s to analyze the problem in pharmacology that one should pay attention
to. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 8 "H
ere is " }{TEXT 260 12 "the problem." }}{PARA 0 "" 0 "" {TEXT -1 131 "
A drug is taken every six hours, We keep track of the concentrati
on of the drug in the GI tract and in the circulatory system." }}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0
8 "restart;" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 42 "Describing the do
sage regimen analytically" }}{PARA 0 "" 0 "" {TEXT -1 348 " We thi
nk of the dosage as follows: Think of one cycle as a six hour block. S
uppose the treatment begins at time 0. Every six hours, another dosage
is taken. During the first half hour of that time -- the first 1/12 -
- the dosage comes in at the rate of 2 units per hour, so that a total
of 1 unit is received. Here is our model of that dosage." }}{PARA 0 "
" 0 "" {TEXT -1 21 " Observe that if " }{TEXT 261 1 "t" }{TEXT -1
16 " is a time, then" }{TEXT 262 4 " t/6" }{TEXT -1 63 " falls in [0,1
], and that the first half hour is in [0, 1/12]. " }}{EXCHG {PARA 0 ">
" 0 "" {MPLTEXT 1 0 41 "Dose:=t->piecewise(frac(t/6)<1/12, 2, 0):" }}
}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "plot(Dose(t),t=0..25);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{PARA 0 "" 0 "" {TEXT
-1 0 "" }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 87 "Describing how the drug
moves from the GI tract to the circulatory system analytically." }}
{PARA 0 "" 0 "" {TEXT -1 253 " The drug is now removed from the GI
tract at a rate proportional to the amount present. (It is of interes
t to design an experiment to determine that rate, but we do not sugges
t such a design now.) We suppose that this constant is found; we call \+
it " }{TEXT 263 1 "a" }{TEXT -1 7 " below." }}{PARA 0 "" 0 "" {TEXT
-1 49 " Here is the system of differential equations" }}{PARA 0 "
" 0 "" {TEXT -1 10 " " }{XPPEDIT 18 0 "diff(x(t),t) = -a*x(t)
+D(t)" "6#/-%%diffG6$-%\"xG6#%\"tGF*,&*&%\"aG\"\"\"-F(6#F*F.!\"\"-%\"D
G6#F*F." }{TEXT -1 1 "." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "a
:=ln(2)*2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "eq1:=diff(x(t
),t)+a*x(t)=Dose(t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}
}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 17
"Numerical methods" }}{PARA 0 "" 0 "" {TEXT -1 70 "We now suggest meth
ods for solving this equation by numerical methods." }}{EXCHG {PARA 0
"> " 0 "" {MPLTEXT 1 0 67 "sol:=dsolve(\{eq1,x(0)=0\},\{x(t)\},type=nu
meric,output=listprocedure);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1
0 19 "f1:=subs(sol,x(t));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0
24 "plot('f1(t)','t'=0..10);" }}}{PARA 0 "" 0 "" {TEXT -1 73 "We could
have tried to solve the equation with Laplace transform methods." }}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "dsolve(\{eq1,x(0)=0\},\{x(t)
\},method=laplace);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}
{PARA 0 "" 0 "" {TEXT -1 56 "This solution does not seem so satisfacto
ry. It is that " }{TEXT 265 4 "frac" }{TEXT -1 41 " function that is l
ikely causing trouble." }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1
{PARA 3 "" 0 "" {TEXT -1 16 "Analytic Methods" }}{PARA 0 "" 0 ""
{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 46 " We use the Heaviside
function to rewrite " }{TEXT 258 4 "Dose" }{TEXT -1 112 " so that we \+
can use analytic methods for solving this equation. This will cause a \+
re-thinking for how to define " }{TEXT 257 4 "Dose" }{TEXT -1 1 "." }}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "Dose:=t->sum(2*(Heaviside(t-
6*p)-Heaviside(t-(6*p+1/2))),p=0..3);" }}}{PARA 0 "" 0 "" {TEXT -1 34
"Look carefully for the graph here." }}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 47 "plot(Dose(t),t=0..20,discont=true,color=BLACK);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "eq1:=diff(x(t),t)+a*x(t)=Dos
e(t);" }}}{PARA 0 "" 0 "" {TEXT -1 70 "No one wants to see the output \+
of the next computation. I suppress it." }}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 33 "sol:=dsolve(\{eq1,x(0)=0\},\{x(t)\}):" }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "f2:=unapply(rhs(sol),t):" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "plot('f2(t)','t'=-0.1..19.1,
color=BLACK);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}
{PARA 0 "" 0 "" {TEXT -1 86 "We add one more idea. Let the drug move f
rom the GI tract into the circulatory system." }}{SECT 1 {PARA 3 "" 0
"" {TEXT -1 87 "Describing how the drug moves from the GI tract to the
circulatory system analytically." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 0 "" 0 "" {TEXT -1 483 " There is more to using the drug than
having it move into the GI tract. It also is metabolized from the blo
od stream. The amount of the concentration in the circulatory system d
ecreases proportioned to the amount present. (Again, what is the propo
rtionality can be determined with by series of experiments that we wil
l not explain at this time.) Of course, the concentration increases w
ith movement of the drug from the GI tract. Thus, we have the second e
quation is this system:" }}{PARA 0 "" 0 "" {TEXT -1 5 " " }
{XPPEDIT 18 0 "diff(y(t),t) = a*x(t)-b*y(t)" "6#/-%%diffG6$-%\"yG6#%\"
tGF*,&*&%\"aG\"\"\"-%\"xG6#F*F.F.*&%\"bGF.-F(6#F*F.!\"\"" }{TEXT -1 1
"." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 11 "b:=ln(2)/2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1
0 32 "eq2:=diff(y(t),t)+b*y(t)=a*x(t);" }}}{PARA 0 "" 0 "" {TEXT -1
62 " The following output is too long. We suppress the output." }}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 64 "sys:=dsolve(\{eq1,eq2,x(0)=0
,y(0)=0\},\{x(t),y(t)\},method=laplace):" }}}{PARA 0 "" 0 "" {TEXT -1
54 " We pickout x(t) and y(t). We suppress the output." }}{PARA 0
"" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "x3:=
unapply(eval(x(t),sys),t):\ny3:=unapply(eval(y(t),sys),t):" }}}{PARA
0 "" 0 "" {TEXT -1 46 "Here is a graph of the solutions superimposed.
" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "plot([x3(t),y3(t)],t=0..
20,color=[BLACK,RED]);" }}}{PARA 0 "" 0 "" {TEXT -1 117 "Here is a gra
ph of the solutions plotted parametrically. Note that the solutions ap
proach a periodic stable solution." }}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 28 "plot([x3(t),y3(t),t=0..20]);" }}}{EXCHG {PARA 0 "> "
0 "" {MPLTEXT 1 0 0 "" }}}}{PARA 0 "" 0 "" {TEXT -1 1 " " }}{SECT 1
{PARA 3 "" 0 "" {TEXT -1 18 "Periodic solutions" }}{PARA 0 "" 0 ""
{TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 367 " Looking at this grap
h gives indication that there is likely a periodic solution for the sy
stem. We seek that solution. For such a solution, it will be true that
when t = 6 we are back at the same place: that is, x(0) = x(6) and y(
0) = y(6). We seek such a value for x(0) and y(0). The task at hand is
to find an initial condition that will also be the value t = 6." }}
{PARA 0 "" 0 "" {TEXT -1 27 "Find the initial condition." }}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 64 "sys:=dsolve(\{eq1,eq2,x(0)=c,y(0)=d
\},\{x(t),y(t)\},method=laplace):" }}}{PARA 0 "" 0 "" {TEXT 267 10 "At
tention:" }{TEXT -1 105 " The Heaviside function is not defined at zer
o. I do that here in order that I can solve equations below." }}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "Heaviside(0):=0;" }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "x4:=unapply(eval(x(t),sys),t):\ny4:
=unapply(eval(y(t),sys),t):" }}}{PARA 0 "" 0 "" {TEXT -1 92 "We determ
ine c and d so that the value of x and of y is the same at t = 6 as it
is at t = 0." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "x4(6); y4(6
);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "fsolve(\{x4(0)=x4(6),
y4(0)=y4(6)\},\{c,d\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "
assign(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "c; d;" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "sys:=dsolve(\{eq1,eq2,x(0)=c
,y(0)=d\},\{x(t),y(t)\}):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0
61 "x5:=unapply(eval(x(t),sys),t):\ny5:=unapply(eval(y(t),sys),t):" }}
}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "plot([x5(t),y5(t),t=0..20])
;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 ""
{TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 24 "A Mathematical Principle
" }}{PARA 0 "" 0 "" {TEXT -1 66 " This previous calculation suggest
s a mathematical principle: \n" }{TEXT 259 8 "THEOREM:" }{TEXT -1 133
" Suppose that c is not zero and that f is a piecewise continuous, per
iodic function. There is a number yo such that the solution for " }}
{PARA 0 "" 0 "" {TEXT -1 9 " " }{XPPEDIT 18 0 "diff(y(t),t) + \+
c*y(t) = f(t)" "6#/,&-%%diffG6$-%\"yG6#%\"tGF+\"\"\"*&%\"cGF,-F)6#F+F,
F,-%\"fG6#F+" }{TEXT -1 23 " with y(0) = yo" }}{PARA 0 "" 0 "
" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 85 "is periodic. Moreover, \+
if z is another solution of this equation starting at zo, then" }}
{PARA 0 "" 0 "" {TEXT -1 47 " |y(t) - z(t)| = exp(c t) |yo -
zo|." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 25
"We could provide a proof." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0
"" 0 "" {TEXT -1 44 "There is a corresponding result for systems." }}}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA
0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{PARA 0 ""
0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 266 12 "Assignment: " }
{TEXT -1 71 " Try your hand at finding a periodic solution for the fol
lowing system:" }}{PARA 0 "" 0 "" {TEXT -1 6 " " }{XPPEDIT 18 0 "
diff(x(t),t)+x(t)=sin(t)" "6#/,&-%%diffG6$-%\"xG6#%\"tGF+\"\"\"-F)6#F+
F,-%$sinG6#F+" }{TEXT -1 6 " and " }{XPPEDIT 18 0 "diff(y(t),t)=x(t)-
y(t)+cos(t)" "6#/-%%diffG6$-%\"yG6#%\"tGF*,(-%\"xG6#F*\"\"\"-F(6#F*!\"
\"-%$cosG6#F*F/" }{TEXT -1 2 ".\n" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 0 "" 0 "" {TEXT 268 6 "Answer" }{TEXT -1 20 " for the assignment
." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "eq1:=diff(x(t),t)+x(t)=sin(t);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "eq2:=diff(y(t),t)=x(t)-y(t)+
cos(t);" }}}{PARA 0 "" 0 "" {TEXT -1 51 "Since the periodic driving fu
nctions have period 2 " }{XPPEDIT 18 0 "Pi;" "6#%#PiG" }{TEXT -1 106 "
, I expect the periodic solutions to have the same period. I start the
solutions off at a nominal c and d." }}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 49 "sol:=dsolve(\{eq1,eq2,x(0)=c,y(0)=d\},\{x(t),y(t)\});
" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "xsol:=unapply(eval(x(t)
,sol),t);\nysol:=unapply(eval(y(t),sol),t);" }}}{PARA 0 "" 0 "" {TEXT
-1 60 "I want to have the solutions back to the same place at t =2 " }
{XPPEDIT 18 0 "Pi;" "6#%#PiG" }{TEXT -1 1 "." }}{EXCHG {PARA 0 "> " 0
"" {MPLTEXT 1 0 39 "xsol(0)=xsol(2*Pi);\nysol(0)=ysol(2*Pi);" }}}
{PARA 0 "" 0 "" {TEXT -1 46 "Thus, I solve these two equations for c a
nd d." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "solve(\{xsol(0)=xso
l(2*Pi),ysol(0)=ysol(2*Pi)\},\{c,d\});" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 10 "assign(%);" }}}{PARA 0 "" 0 "" {TEXT -1 43 "Now, we r
edo the problem with this c and d." }}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 49 "sol:=dsolve(\{eq1,eq2,x(0)=c,y(0)=d\},\{x(t),y(t)\}):
" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "xsol:=unapply(eval(x(t)
,sol),t):\nysol:=unapply(eval(y(t),sol),t):" }}}{EXCHG {PARA 0 "> " 0
"" {MPLTEXT 1 0 52 "plot([xsol(t),ysol(t)],t=0..6*Pi,color=[black,red]
);" }}}{PARA 0 "" 0 "" {TEXT -1 68 "Look at the graphs. Do they look l
ike they are periodic with period " }{XPPEDIT 18 0 "2*Pi;" "6#*&\"\"#
\"\"\"%#PiGF%" }{TEXT -1 11 "? They are." }}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;
" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 159 "Her
e is the next important thing to get out of this worksheet: You can ma
ke numerical solutions of differential equations using Maple. Here is \+
code to do this." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "eq1:=dif
f(x(t),t)+x(t)=sin(t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "e
q2:=diff(y(t),t)=x(t)-y(t)+cos(t);" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 94 "sol:=dsolve(\{eq1,eq2,x(0)=0,y(0)=0\},\{x(t),y(t)\},
\n type=numeric,output=listprocedure);" }}}{EXCHG {PARA 0 "> \+
" 0 "" {MPLTEXT 1 0 43 "xsol:=subs(sol,x(t));\nysol:=subs(sol,y(t));"
}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "plot(['xsol(t)','ysol(t)'
],'t'=0..10,color=[blue,red]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT
1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{MARK "1 0" 37 }
{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }