{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 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1
257 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{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 }}
{SECT 0 {PARA 0 "" 0 "" {TEXT 257 37 "Module 45: Periodic Forcing Func
tions" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 3 "" 0 ""
{TEXT -1 12 "Introduction" }}{PARA 0 "" 0 "" {TEXT -1 41 "We have stud
ied the diffusion equation as" }}{PARA 0 "" 0 "" {TEXT -1 16 " \+
" }{XPPEDIT 18 0 "diff(u,t);" "6#-%%diffG6$%\"uG%\"tG" }{TEXT
-1 3 " = " }{XPPEDIT 18 0 "diff(u,`$`(x,2));" "6#-%%diffG6$%\"uG-%\"$G
6$%\"xG\"\"#" }{TEXT -1 57 " , with zero boundary conditions u(t, 0)
= 0 = u(t, 1)." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 ""
{TEXT -1 379 "A characteristic of the solution for this equation is th
at the initial values we have used, solutions decay to zero. We now ad
d a source term. The source term is periodic. In the previous lecture,
we found solutions to such equations with a prescribed initial value.
In that case, where there is a periodic solution, solutions decayed t
o what appeared to be a periodic solution. " }}{PARA 0 "" 0 "" {TEXT
-1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 64 "We describe how to find the per
iodic solution in this worksheet." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 0 "" 0 "" {TEXT -1 265 "The method for obtaining periodic soluti
ons presented in this section takes advantage of the uniqueness for th
e representation of a function in terms of a predetermined orthogonal \+
basis and takes advantage of the power of a computer algebra system su
ch as this one." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 ""
{TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 3 "" 0
"" {TEXT -1 24 "The one dimensional case" }}{PARA 0 "" 0 "" {TEXT -1
317 "Here we review the method for obtaining the periodic solution of \+
a one dimensional differential equation. These ideas were also indicat
ed in lecture 39. As suggested in the exercises at the end of the Mapl
e worksheet that goes with Lecture 39, we will solve the differential \+
equation with a symbolic initial value of " }{TEXT 256 1 "c" }{TEXT
-1 78 " and determine what c should be inorder that the solution shoul
d be periodic. " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "eq:=diff(
y(t),t)=-2*y(t)+sin(t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "
sol:=dsolve(\{eq,y(0)=c\},y(t));" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 24 "yc:=unapply(rhs(sol),t);" }}}{EXCHG {PARA 0 "> " 0 "
" {MPLTEXT 1 0 28 "cc:=solve(yc(0)=yc(2*Pi),c);" }}}{EXCHG {PARA 0 "> \+
" 0 "" {MPLTEXT 1 0 32 "yp:=unapply(subs(c=cc,yc(t)),t);" }}}{PARA 0 "
" 0 "" {TEXT -1 113 "This last gave us the periodic solution for this \+
equation. We graph this solution, and two others for comparison." }}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 88 "plot([yp(t),subs(c=1,yc(t)),
subs(c=-1,yc(t))],t=0..2*Pi,\n color=[blue,red,black]);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "
" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 24 "The two d
imensional case" }}{PARA 0 "" 0 "" {TEXT -1 105 "Here we review the me
thod for obtaining the periodic solution of a two dimensional differen
tial equation." }}{PARA 0 "" 0 "" {TEXT -1 1 "\027" }}{EXCHG {PARA 0 "
> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 125 "sol:=dsolve(\{diff(x(t),t)=
-2*x(t)+y(t)+cos(t),\n diff(y(t),t)=x(t)-2*y(t)+sin(t),x(0)=a,
y(0)=b\},\n \{x(t),y(t)\});" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 59 "x:=unapply(eval(x(t),sol),t);\ny:=unapply(eval(y(t),s
ol),t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "x(t);y(t);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "solve(\{x(2*Pi)=x(0),y(2*Pi)
=y(0)\},\{a,b\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "assign
(%):\nr1:=a;r2:=b;\na:='a':b:='b':" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 176 "y1:=subs(\{a=1,b=2\},[x(t),y(t),t=0..2*Pi]):\ny2:=su
bs(\{a=r1,b=r2\},[x(t),y(t),t=0..2*Pi]):\ny3:=subs(\{a=-1,b=-2\},[x(t)
,y(t),t=0..2*Pi]):\ny4:=subs(\{a=-1,b=2\},[x(t),y(t),t=0..2*Pi]):" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "plot([y1,y2,y3,y4],color=[bl
ack,red,green,blue]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }
}}{PARA 0 "" 0 "" {TEXT -1 106 "Is it clear that the red graph is the \+
periodic one and that all others converge to this periodic solution?"
}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0
"" {TEXT -1 18 "Periodic Solutions" }}{PARA 0 "" 0 "" {TEXT -1 528 "We
now return to the problem of finding a periodic solution for this hea
t equation with periodic forcing function. We create the Fourier expan
sion for the forcing function to change the partial differential equat
ion into an infinite collection of ordinary differential equations. Th
ese infinity of ordinary differential equations are one dimensional eq
uations. We solve them with a yet to be determined initial value just \+
as we did for the one dimensional case above. That initial value is ch
osen to create a periodic solution. " }}{PARA 0 "" 0 "" {TEXT -1 0 ""
}}{PARA 0 "" 0 "" {TEXT -1 243 "Here is Maple syntax to make an approx
imation for the solution. Be reminded that we do not need to specify a
n initial distribution in this problem. Indeed, the problem is to find
the initial distribution which generates the periodic solution." }}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 359 "First, w
e decided how many terms N we will use to approximation the solution a
nd we specify the periodic forcing function F(t, x). In this example, \+
the forcing function has period 1 and is defined on the interval from \+
0 to L = 1. Recall that the Sturm Liouville problem for this example h
as eigenfunctions the sine functions. These form the orthogonal family
." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53
"N:=5;\nTPer:=1;\nL:=1;\nF:=(t,x)->sin(2*Pi*t)*x^2*(1-x);" }}}{PARA 0
"" 0 "" {TEXT -1 69 "Next, we solve the N equations 5.1 which generate
periodic solutions." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 290 "for
n from 1 to N do\n denomin:=int(sin(n*Pi*x)^2,x=0..L):\n gn:=t->int
(F(t,x)*sin(n*Pi*x),x=0..L)/denomin:\n eq:=diff(Y(t),t)=-n^2*Pi^2*Y(t
)+gn(t):\n sol:=dsolve(\{eq,Y(0)=c\},Y(t)):\n YY:=unapply(rhs(sol),t
):\n cc:=solve(YY(0)=YY(TPer),c):\n T[n]:=unapply(subs(c=cc,YY(t)),t
):\n od:\nn:='n';" }}}{PARA 0 "" 0 "" {TEXT -1 158 "We plot these N e
quations. They may be so small that we need to amplify them. Here, the
y are amplified by a power of 2 so that they can be seen in the graphs
." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "plot([seq(2^n*T[n](t),n
=1..N)],t=0..TPer);" }}}{PARA 0 "" 0 "" {TEXT -1 32 "We compose the so
lution u(t, x)." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "u:=(t,x)-
>add(T[n](t)*sin(n*Pi*x),n=1..N);" }}}{PARA 0 "" 0 "" {TEXT -1 81 "We \+
draw the graph of the periodic solution for the partial differential e
quation." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "plot3d(u(t,x),x=
0..L,t=0..TPer,axes=normal);" }}}{PARA 0 "" 0 "" {TEXT -1 200 "As a ch
eck, we draw the graph of u(0, x) and u(1, x) to see that they look al
ike. The graphs may be so close that it is of value to off-set the gra
ph of one of these so that they can be distinguished." }}{EXCHG {PARA
0 "> " 0 "" {MPLTEXT 1 0 36 "plot([u(0,x),u(1,x)+0.0001],x=0..L);" }}}
{PARA 0 "" 0 "" {TEXT -1 49 "Finally, we check that we really have a s
olution." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 139 "expand(simplify
(combine(\n diff(u(t,x),t)-diff(u(t,x),x,x)-\n sum(2*int(F(t,x)*si
n(n*Pi*x),x=0..1)*sin(n*Pi*x),\n n=1..N),trig)));" }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }
}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1
0 0 "" }}}}{MARK "0 0" 37 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }
{PAGENUMBERS 0 1 2 33 1 1 }