{VERSION 2 3 "DEC ALPHA UNIX" "2.3" }
{USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0
1 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0
0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 1"
0 3 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 }1 0 0 0 6 6
0 0 0 0 0 0 -1 0 }{PSTYLE "Title" 0 18 1 {CSTYLE "" -1 -1 "" 1 18 0 0
0 0 0 1 1 0 0 0 0 0 0 }3 0 0 -1 12 12 0 0 0 0 0 0 19 0 }}
{SECT 0 {PARA 18 "" 0 "" {TEXT -1 40 "Examples with Undetermined Coeff
icients\n" }}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 8 "Abstract" }}{PARA 0 "
" 0 "" {TEXT -1 104 "A couple of examples to show how Maple can save y
our sanity when it comes to undetermined coefficients. " }}}{SECT 0
{PARA 3 "" 0 "" {TEXT -1 16 "Simple Examples " }}{PARA 0 "" 0 ""
{TEXT -1 110 "Run through a couple of homework problems. Notice that \+
be basic Maple commands can be used again and again. " }}{PARA 0 ""
0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 124 "Here is the basic b
lock of commands. They do exactly what you would do by hand if you we
re doing undetermined coefficients:" }}{PARA 0 "" 0 "" {TEXT -1 131 "D
efine the ODE, make a guess for the particular solution, plut it in, p
ull out the equations for the coefficients, and solve them. " }}{PARA
0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "OD
E0 := diff( y(x),x,x ) - 9*y(x) = x^2 - 1;" }}}{EXCHG {PARA 0 "> " 0 "
" {MPLTEXT 1 0 25 "guess := A*x^2 + B*x + C;" }}}{EXCHG {PARA 0 "> "
0 "" {MPLTEXT 1 0 45 "GOAL := simplify( subs( y(x)=guess, ODE0 ) );" }
}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "EQNS := \{ -9*A = 1, -9*B
= 0, 2*A - 9*C = -1 \};" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0
37 "COEFFS := solve( EQNS, \{ A, B, C \} );" }}}{EXCHG {PARA 0 "> " 0
"" {MPLTEXT 1 0 31 "pSOLN := subs( COEFFS, guess );" }}}{PARA 0 "" 0 "
" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 201 "The equations for the \+
undetermined coefficients are currently pulled out \"by hand.\" (I \+
don't know a way to pull the equations out except by hand... waiting f
or a Maple wizard to find an easier way!)" }}{PARA 0 "" 0 "" {TEXT -1
0 "" }}{PARA 0 "" 0 "" {TEXT -1 38 "You can check your answer with dso
lve:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "dsolve(ODE0,y(x));"
}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 0 "" 0 "" {TEXT -1 20 "Try another example." }}{EXCHG {PARA 0 ">
" 0 "" {MPLTEXT 1 0 46 "ODE1 := diff( x(t), t,t ) + 9*x(t) = sin(2*t)
;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "guess := A*cos(2*t) + \+
B*sin(2*t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "GOAL := simp
lify( subs( x(t)=guess, ODE1 ) );" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 29 "EQNS := \{ 5*A = 0, 5*B = 1 \};" }}}{EXCHG {PARA 0 ">
" 0 "" {MPLTEXT 1 0 34 "COEFFS := solve( EQNS, \{ A, B \} );" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "pSOLN := subs( COEFFS, guess
);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "dsolve(ODE1, x(t));
" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "combine(\",trig);" }}}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 22 "And anoth
er example. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> "
0 "" {MPLTEXT 1 0 68 "ODE2 := diff( x(t), t,t ) + 2*diff( x(t), t ) + \+
5*x(t) = 3*cos(2*t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "gue
ss := A*cos(2*t) + B*sin(2*t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT
1 0 45 "GOAL := simplify( subs( x(t)=guess, ODE2 ) );" }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "EQNS := \{ A + 4*B = 3, B - 4*A = \+
0 \};" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "COEFFS := solve( E
QNS, \{ A, B \} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "pSOLN
:= subs( COEFFS, guess );" }}}{PARA 0 "" 0 "" {TEXT -1 9 "Check it:"
}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1
0 18 "dsolve(ODE2,x(t));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11
"combine(\");" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 ""
{TEXT -1 22 "Try a third example. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }
}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "ODE3 := 4*diff( x(t), t,t )
+ 8*diff( x(t), t ) + 5*x(t) = exp(t)*(sin(t/2)-6);" }}}{EXCHG {PARA
0 "> " 0 "" {MPLTEXT 1 0 58 "guess := A*exp(t)*sin(t/2) + B*exp(t)*cos
(t/2) + C*exp(t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "GOAL :
= simplify( subs( x(t)=guess, ODE3 ) );" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 52 "EQNS := \{ 16*A -8*B = 1, 8*A + 16*B = 0,17*C = -6 \}
;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "COEFFS := solve( EQNS,
\{ A, B, C \} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "pSOLN \+
:= subs( COEFFS, guess );" }}}{PARA 0 "" 0 "" {TEXT -1 31 "Check your \+
answer with dsolve: " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA
0 "> " 0 "" {MPLTEXT 1 0 20 "dsolve(ODE3,\{x(t)\});" }}}{EXCHG {PARA
0 "> " 0 "" {MPLTEXT 1 0 11 "combine(\");" }}}{PARA 0 "" 0 "" {TEXT
-1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 0 {PARA 3 "" 0 ""
{TEXT -1 19 "One Strange Example" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 0 "" 0 "" {TEXT -1 71 "You expect \"trouble\" when the forcing t
erm is a homogeneous solution. " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT
1 0 45 "ODE5 := diff( y(x),x,x ) + 9*y(x) = sin(3*x);" }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "guess := A*sin(3*x) + B*cos(3*x);"
}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "GOAL := simplify( subs( y
(x)=guess, ODE5 ) );" }}{PARA 0 "" 0 "" {TEXT -1 83 "You have an obvio
us problem! The undetermined coefficients cannot be determined. " }}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1
0 38 "guess2 := A*x*sin(3*x) + B*x*cos(3*x);" }}}{EXCHG {PARA 0 "> "
0 "" {MPLTEXT 1 0 46 "GOAL := simplify( subs( y(x)=guess2, ODE5 ) );"
}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "EQNS := \{ 6*A = 0, -6*B
= 1 \};" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "COEFFS := solve
( EQNS, \{ A, B \} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "pS
OLN := subs( COEFFS, guess2 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT
1 0 18 "dsolve(ODE5,y(x));" }}}{PARA 0 "" 0 "" {TEXT -1 18 "Life is ve
ry good." }{TEXT -1 0 "" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 23 "Playi
ng with Parameters" }}{PARA 0 "" 0 "" {TEXT -1 72 "You can do exactly \+
the same thing with parameters instead of constants. " }}{PARA 0 "" 0
"" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> \+
" 0 "" {MPLTEXT 1 0 72 "ODE4 := m*diff(x(t),t,t) + p*diff(x(t),t) + k*
x(t) = alpha*sin(omega*t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0
41 "guess := A*sin(omega*t) + B*cos(omega*t);" }}}{EXCHG {PARA 0 "> "
0 "" {MPLTEXT 1 0 45 "GOAL := simplify( subs( x(t)=guess, ODE4 ) );" }
}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 87 "EQNS := \{ -m*A*omega^2 - \+
p*B*omega + k*A = alpha, -m*B*omega^2 + p*A*omega + k*B = 0 \};" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "COEFFS := solve( EQNS, \{ A,
B \} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "pSOLN := subs( \+
COEFFS, guess );" }}}{PARA 0 "" 0 "" {TEXT -1 28 "You can simplify thi
s a bit." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "simplify(pSOLN);
" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{MARK "2 18 0" 0
}{VIEWOPTS 1 1 0 1 1 1803 }