{VERSION 1 0 "X11/Motif" "1.0"}{GLOBALS 3 1}{FONT 0 "-adobe-times
-medium-r-normal--*-180-*-*-*-*-*-*" "times" "Times-Roman" 4 18 
64 "Times-Roman" 18}{FONT 1 "-adobe-times-medium-r-normal--*-180-
*-*-*-*-*-*" "times" "Times-Roman" 4 18 64 "Times-Roman" 18}{FONT
 2 "-adobe-times-medium-r-normal--*-100-*-*-*-*-*-*" "times" "Tim
es-Roman" 4 10 64 "Times-Roman" 10}{SCP_R 1 0 76{COM_R 2 0{TEXT 1
 163 "Dr. Kirschner, MATH 308-506, March 1.\015\015This is a help
 sheet for Undetermined coefficients. BDP (means Boyce and DiPrim
a)\015\015\015BDP, p 162 #10.\012\012A NON_HOMOGENEOUS DE:\015\01
5"}}{INP_R 3 0 "> "{TEXT 0 51 "diffeq_h:=diff(u(x),x$2)+omega^2*u
(x)=cos(omega*x);"}}{OUT_R 4 0 3{DAG :3n5\`diffeq_h`=3+5(3n4\`dif
f`,3(3p8,3(3n3\`u`,2n3\`x`p13p13j2x0001*5n3\`Pi`j2x0002pFp17p17(3
n3\`cos`,2*5p1Ap17p13p17}}{COM_R 5 0{TEXT 1 52 "\015\015THE FIRST
 STEP IS TO SOLVE THE HOMOGENEOUS PROBLEM"}}{INP_R 6 0 "> "{TEXT 
0 40 "diffeq_h:=diff(u(x),x$2)+omega^2*u(x)=0;"}}{OUT_R 7 0 6{DAG
 :3n5\`diffeq_h`=3+5(3n4\`diff`,3(3p8,3(3n3\`u`,2n3\`x`p13p13j2x0
001*5n3\`Pi`j2x0002pFp17p17j2x0000}}{INP_R 8 0 "> "{TEXT 0 35 "ch
ar_eq:=r^2+omega^2=0; solve(\",r);"}}{OUT_R 9 0 8{DAG :3n4\`char_
eq`=3+5*3n3\`r`j2x0002j2x0001*3n3\`Pi`p9pBj2x0000}}{OUT_R 10 0 8
{DAG ,3*5n3\`I`j2x0001n3\`Pi`p4+3p1i2x0001}}{COM_R 11 0{TEXT 1 52
 "The general solution to the homogeneous equation is\012"}}
{INP_R 12 0 "> "{TEXT 0 40 "u_h(x):=c1*cos(omega*x)+c2*sin(omega*
x);"}}{OUT_R 13 0 12{DAG :3(3n3\`u_h`,2n3\`x`+5*5n3\`c1`j2x0001(3
n3\`cos`,2*5n3\`Pi`pBp5pBpBpB*5n3\`c2`pB(3n3\`sin`p10pBpB}}{COM_R
 14 0{TEXT 1 280 "The particular solution will be a polynomial of
 degree zero times cos(omega*x)+a polynomial of degree zero times
 sin(omega*x), all times x to avoid a conflict with the homogeneo
us equation. (Notice that if you have not gotten the homogeneous \+
solution, you cannot see collisions!)\012"}}{INP_R 15 0 "> "{TEXT
 0 49 "diffeq:=diff(u(x),x$2)+omega^2*u(x)=cos(omega*x);"}}{OUT_R
 16 0 15{DAG :3n4\`diffeq`=3+5(3n4\`diff`,3(3p7,3(3n3\`u`,2n3\`x`
p12p12j2x0001*5n3\`Pi`j2x0002pEp16p16(3n3\`cos`,2*5p19p16p12p16}}
{INP_R 17 0 "> "{TEXT 0 44 "u_p(x):=(c1*cos(omega*x)+c2*sin(omega
*x))*x;"}}{OUT_R 18 0 17{DAG :3(3n3\`u_p`,2n3\`x`*5+5*5n3\`c1`j2x
0001(3n3\`cos`,2*5n3\`Pi`pCp5pCpCpC*5n3\`c2`pC(3n3\`sin`p11pCpCpC
p5pC}}{COM_R 19 0{TEXT 1 255 "Now substitute the particular solut
ion into the nonhomogeneous equation, and treat the result as an \+
identity in x. (Note that this is one of the few cases in Maple w
here a word in the output does not mean that Maple doesn't unders
tand what is happening.) "}}{INP_R 20 0 "> "{TEXT 0 40 "subs(u(x)
=u_p(x),diffeq): identity(\",x);"}}{OUT_R 21 0 20{DAG (3n5\`ident
ity`,3=3+9*5+5*7n3\`c1`j2x0001(3n3\`cos`,2*5n3\`Pi`pDn3\`x`pDpDp1
4j2x0002i2x0001*7n3\`c2`pD(3n3\`sin`p12pDp14p1Cp1EpDp17pDpD*7pBpD
p24pDp14pDi2x0002*7p21pDpFpDp14pDp1C*7p14p1C+5*5pBpDpFpDpD*5p21pD
p24pDpDpDp17pDpDpFp17}}{COM_R 22 0{TEXT 1 42 "\012Solve for the u
ndetermined coefficients.\012"}}{INP_R 23 0 "> "{TEXT 0 23 "csol:
=solve(\",\{c1,c2\});"}}{OUT_R 24 0 23{DAG :3n4\`csol`%2,3=3n3\`c
1`j2x0000=3n3\`c2`+3*3n3\`Pi`i2x0001/3j2x0001j2x0002}}{COM_R 25 0
{TEXT 1 101 "Substitute the values for the coefficients into the \+
sum of the homogeneous and particular solutions.\012"}}{INP_R 26 
0 "> "{TEXT 0 35 "sol:=u(x)=subs(csol,u_h(x)+u_p(x));"}}{OUT_R 27
 0 26{DAG :3n3\`sol`=3(3n3\`u`,2n3\`x`+5*5n3\`Pi`i2x0001(3n3\`sin
`,2*5pCj2x0001p8p16p16/3p16j2x0002*7pCpEp10p16p8p16p1B}}{COM_R 28
 0{TEXT 1 19 "Check your result.\012"}}{INP_R 29 0 "> "{TEXT 0 26
 "subs(\",diffeq): expand(\");"}}{OUT_R 30 0 29{DAG =3(3n3\`cos`,
2*5n3\`Pi`j2x0001n3\`x`p8p1}}{INP_R 31 0 "> "{TEXT 0 51 "omega:=P
i; sol;with(plots): plot(rhs(sol),x=0..10);"}}{OUT_R 32 0 31{DAG 
:3n4\`omega`n3\`Pi`}}{OUT_R 33 0 31{DAG =3(3n3\`u`,2n3\`x`+5*5n3\
`Pi`i2x0001(3n3\`sin`,2*5p9j2x0001p5p13p13/3p13j2x0002*7p9pBpDp13
p5p13p18}}{INP_R 34 0 "> "{TEXT 0 8 "restart;"}}{COM_R 35 0{TEXT 
1 17 "\012BDP, p 162 #13.\012"}}{INP_R 36 0 "> "{TEXT 0 47 "diffe
q_h:=diff(y(x),x$2)+diff(y(x),x)-2*y(x)=0;"}}{OUT_R 37 0 36{DAG :
3n5\`diffeq_h`=3+7(3n4\`diff`,3(3p8,3(3n3\`y`,2n3\`x`p13p13j2x000
1pCp17pFi2x0002j2x0000}}{INP_R 38 0 "> "{TEXT 0 35 "char_eq:=r^2+
r-2=0; ev:=solve(\",r);"}}{OUT_R 39 0 38{DAG :3n4\`char_eq`=3+7*3
n3\`r`j2x0002j2x0001p7pBi2x0002pBj2x0000}}{OUT_R 40 0 38{DAG :3n3
\`ev`,3j2x0001i2x0002}}{INP_R 41 0 "> "{TEXT 0 34 "y_h(x):=c1*exp
(1*x)+c2*exp( -2*x);"}}{OUT_R 42 0 41{DAG :3(3n3\`y_h`,2n3\`x`+5*
5n3\`c1`j2x0001(3n3\`exp`p4pBpB*5n3\`c2`pB(3pE,2+3p5i2x0002pBpB}}
{INP_R 43 0 "> "{TEXT 0 72 "diffeq:=diff(y(x),x$2)+diff(y(x),x)-2
*y(x)=2*x; inits:=y(0)=0,D(y)(0)=1;"}}{OUT_R 44 0 43{DAG :3n4\`di
ffeq`=3+7(3n4\`diff`,3(3p7,3(3n3\`y`,2n3\`x`p12p12j2x0001pBp16pEi
2x0002+3p12j2x0002}}{OUT_R 45 0 43{DAG :3n4\`inits`,3=3(3n3\`y`,2
j2x0000pA=3(3(3n3\`D`,2p7p9j2x0001}}{COM_R 46 0{TEXT 1 175 "Since
 the rhs is a polynomial of degree 1, the particular solution is \+
the most general solution of degree 1. (Note that there are no co
nflicts with the homogeneous solution.)\012"}}{INP_R 47 0 "> "
{TEXT 0 55 "y_p(x):=a*x+b; subs(y(x)=y_p(x),diffeq); identity(\",
x);"}}{OUT_R 48 0 47{DAG :3(3n3\`y_p`,2n3\`x`+5*5n3\`a`j2x0001p5p
BpBn3\`b`pB}}{OUT_R 49 0 47{DAG =3+9(3n4\`diff`,3(3p3,3+5*5n3\`a`
j2x0001n3\`x`pEpEn3\`b`pEp10p10pEp7pEpBi2x0002p14p1D+3p10j2x0002}
}{OUT_R 50 0 47{DAG (3n5\`identity`,3=3+7n3\`a`j2x0001*5p8pAn3\`x
`pAi2x0002n3\`b`p12+3pFj2x0002pF}}{INP_R 51 0 "> "{TEXT 0 21 "cso
l:=solve(\",\{a,b\});"}}{OUT_R 52 0 51{DAG :3n4\`csol`%2,3=3n3\`b
`/3i2x0001j2x0002=3n3\`a`pA}}{INP_R 53 0 "> "{TEXT 0 36 "sol:=y(x
)=subs(csol,y_h(x)+y_p(x)); "}}{OUT_R 54 0 53{DAG :3n3\`sol`=3(3n
3\`y`,2n3\`x`+9*5n3\`c1`j2x0001(3n3\`exp`p7pEpE*5n3\`c2`pE(3p11,2
+3p8i2x0002pEpEp8i2x0001/3p24j2x0002pE}}{COM_R 55 0{TEXT 1 7 "Che
ck.\012"}}{INP_R 56 0 "> "{TEXT 0 26 "subs(\",diffeq): expand(\")
;"}}{OUT_R 57 0 56{DAG =3+3n3\`x`j2x0002p1}}{COM_R 58 0{TEXT 1 39
 "Now solve for the constants c1 and c2.\012"}}{INP_R 59 0 "> "
{TEXT 0 39 "subs(x=0,rhs(sol))=0: eq1:=simplify(\");"}}{OUT_R 60 
0 59{DAG :3n3\`eq1`=3+7n3\`c1`j2x0001n3\`c2`p7/3i2x0001j2x0002p7j
2x0000}}{INP_R 61 0 "> "{TEXT 0 47 "subs(x=0,diff(rhs(sol),x))=1:
 eq2:=simplify(\");"}}{OUT_R 62 0 61{DAG :3n3\`eq2`=3+7n3\`c1`j2x
0001n3\`c2`i2x0002i2x0001p7p7}}{INP_R 63 0 "> "{TEXT 0 32 "csol2:
=solve(\{eq1,eq2\},\{c1,c2\});"}}{OUT_R 64 0 63{DAG :3n4\`csol2`%
2,3=3n3\`c1`j2x0001=3n3\`c2`/3i2x0001j2x0002}}{INP_R 65 0 "> "
{TEXT 0 22 "sol3:=subs(csol2,sol);"}}{OUT_R 66 0 65{DAG :3n4\`sol
3`=3(3n3\`y`,2n3\`x`+9(3n3\`exp`p8j2x0001(3pD,2+3p9i2x0002/3i2x00
01j2x0002p9p1Ap19p10}}{COM_R 67 0{TEXT 1 10 "PLotting.\015"}}
{INP_R 68 0 "> "{TEXT 0 25 "plot(rhs(sol3), x=0..10);"}}{COM_R 69
 0{TEXT 1 10 "VERIFYING:"}}{INP_R 70 0 "> "{TEXT 0 33 "subs(x=0,r
hs(sol3)): simplify(\");"}}{OUT_R 71 0 70{DAG j2x0000}}{INP_R 72 
0 "> "{TEXT 0 41 "subs(x=0,diff(rhs(sol3),x)): simplify(\");"}}
{OUT_R 73 0 72{DAG j2x0001}}{INP_R 74 0 "> "{TEXT 0 29 "subs(sol3
,diffeq): expand(\");"}}{OUT_R 75 0 74{DAG =3+3n3\`x`j2x0002p1}}
{INP_R 76 0 "> "{TEXT 0 0 ""}}{INP_R 77 0 "> "{TEXT 0 0 ""}}}{END
}
