{VERSION 4 0 "SUN SPARC SOLARIS" "4.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 0 1 0 0 0 0 0 0 0 1 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }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 }1 0 0 0 8 4 0 0 0 0 0 0 -1 0 }{PSTYLE "" 3 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {PARA 256 "" 0 "" {TEXT -1 51 "Section 4.3-The Method of Undet ermined Coefficients" }{MPLTEXT 1 0 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 350 "Here we use the method of undetermi ned coefficients to solve an ODE of order 5. The first step is to sol ve the homogeneous equation. We call the differential operator L. We \+ begin by having Maple go through all the steps we would do if we did t he problem by hand. At the end, we will see what happens if we ask Ma ple to solve the original equation." }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" }}}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 87 " L := diff (y(x),x$5)-3*diff(y(x),x$4)+3*diff(y(x),x$3)-3*diff(y(x),x$2)+2*diff(y (x),x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 55 "To obtain the characte ristic polynomial, we substitute " }{XPPEDIT 18 0 "exp(r*x);" "6#-%$ex pG6#*&%\"rG\"\"\"%\"xGF(" }{TEXT -1 6 " into " }{XPPEDIT 18 0 "L;" "6# %\"LG" }{TEXT -1 31 " and set the result equal to 0." }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "subs(y(x)=exp(r*x),L)= 0;" }}}{PARA 0 "" 0 "" {TEXT -1 58 "We use expand to get Maple to perf orm the differentiation." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 " expand(%);" }}}{PARA 0 "" 0 "" {TEXT -1 59 "To obtain the characterist ic polynomial, we divide this by " }{XPPEDIT 18 0 "exp(r*x);" "6#-%$ex pG6#*&%\"rG\"\"\"%\"xGF(" }{TEXT -1 1 "." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "%/exp(r*x);" }}}{PARA 0 "" 0 "" {TEXT -1 61 "Again, w e have to use expand to get Maple to do the division." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "expand(%);" }}}{PARA 0 "" 0 "" {TEXT -1 69 "This is the characteristic polynomial. We factor the left hand si de." }{TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "factor (lhs(%));" }}}{PARA 0 "" 0 "" {TEXT -1 143 "Notice that it has been fa ctored over the reals, but not the complexes. To facotr it over the c omplexes, we have to give an optional parameter" }{TEXT -1 0 "" } {TEXT -1 1 " " }{TEXT 256 9 "sqrt(-1) " }{TEXT -1 2 "or" }{TEXT 257 1 "I" }{TEXT -1 1 " " }{TEXT -1 22 "in the factor command." }{TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "factor(%,I);" }}}{PARA 0 "" 0 "" {TEXT -1 65 "We know know that the roots of the characterist ic polynomial are " }{XPPEDIT 18 0 "r = 0,r = 1,r = 2,r = -I,r = I;" " 6'/%\"rG\"\"!/F$\"\"\"/F$\"\"#/F$,$%\"IG!\"\"/F$F," }{TEXT -1 19 ", so the functions " }{XPPEDIT 18 0 "1,exp(x),exp(2*x),sin(x);" "6&\"\"\"- %$expG6#%\"xG-F%6#*&\"\"#F#F'F#-%$sinG6#F'" }{TEXT -1 6 ", and " } {XPPEDIT 18 0 "cos(x);" "6#-%$cosG6#%\"xG" }{TEXT -1 86 " form a funda mental set of solutions. Now we want to solve the inhomogeneous equat ion" }{TEXT -1 0 "" }{TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "eq := L = x^5 + 6*exp(7*x) -2*exp(-x)*cos(3*x) + 9*si n(7*x);" }}}{PARA 0 "" 0 "" {TEXT -1 46 "We break the problem into 4 s eparate problems." }{TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "eq1 := L - x^5;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 " eq2 := L - 6*exp(7*x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "e q3 := L + 2*exp(-x)*cos(3*x);\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "eq4 := L - 9*sin(7*x);\n" }}}{PARA 0 "" 0 "" {TEXT -1 65 "For \+ the first one, we look for a particular solution of the form:" }{TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 " y_1 := x*(A_0*x^5 +A_1*x^4+A_2*x^3+A_3*x^2+A_4*x+A_5);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "subs(y(x)=y_1,eq1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "Eq1 := expand(%);\n" }}}{PARA 0 "" 0 "" {TEXT -1 50 " We need to find the coefficient of each power of " }{XPPEDIT 18 0 "x; " "6#%\"xG" }{TEXT -1 129 ", set it equal to 0, and solve the resultin g system of linear equations to determine the \"undetermined coefficie nts\" A_0,...,A_5." }{TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "e0 := coeff(Eq1,x,5);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "e1 := coeff(Eq1,x,4);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "e2 := coeff(Eq1,x,3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "e3 := coeff(Eq1,x,2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "e4 := coeff(Eq1,x,1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 " e5 := coeff(Eq1,x,0);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "sol1 := solve(\{e0,e1,e2,e3,e4,e5\},\{A_0,A_1,A_2,A_3 ,A_4,A_5\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "y_1 := subs (sol1, y_1);" }}}{PARA 0 "" 0 "" {TEXT -1 40 "What happens if we forge t the factor of " }{XPPEDIT 18 0 "x;" "6#%\"xG" }{TEXT -1 26 " in fron t and instead take" }{TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "Y_1 := A_0*x^5+A_1*x^4+A_2*x^3+A_3*x^2+A_4*x+A_5;" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "subs(y(x)=Y_1,eq1);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "expand(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "coeff(%,x^5);" }}}{PARA 0 "" 0 "" {TEXT -1 58 "When we set this equal to 0, we get the equation -1 = 0 !!" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 18 "Next we s olve eq2." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "y_2 := A_0*exp( 7*x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "subs(y(x) = y_2, e q2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "expand(%);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "sol := solve(%,A_0);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "y_2 := subs(A_0=sol,y_2);" } }}{PARA 0 "" 0 "" {TEXT -1 18 "Next we solve eq3." }{TEXT -1 0 "" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "y_3 := A_0 * exp(-x)*cos(3*x ) + B_0 * exp(-x)*sin(3*x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "subs(y(x)=y_3, eq3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "e := expand(%);" }}}{PARA 0 "" 0 "" {TEXT -1 103 "This is not a polyn omial, so we have to work a bit harder get the system of equations we \+ need to solve." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "e1 := subs (x=0,e);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "simplify(%);" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "e2 := subs(x=0,diff(e,x)); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "simplify(%);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "sol := solve(\{e1,e2\},\{A_0 ,B_0\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "y_3 := subs(sol ,y_3);" }}}{PARA 0 "" 0 "" {TEXT -1 18 "Next we solve eq4." }{TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "y_4 := A_0 * cos(7*x) + B_0 * sin(7*x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "subs( y(x)=y_4, eq4);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "e := exp and(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "e1 := subs(x=0, \+ e);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "expand(%);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "e2 := subs(x=0, diff(e,x)); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "expand(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "sol := solve(\{e1,e2\},\{A_0,B_0\}) ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "y_4 := subs(sol, y_4); " }}}{PARA 0 "" 0 "" {TEXT -1 54 "Now we obtain out particular solutio n by adding the 4:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "y_p := y_1+y_2+y_3+y_4;" }}}{PARA 0 "" 0 "" {TEXT -1 25 "We check by substit uting:" }{TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "sub s(y(x) = y_p,eq);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "expand (%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "lhs(%)-rhs(%);" }}} {PARA 0 "" 0 "" {TEXT -1 45 "What happens if we let Maple do all the w ork?" }{TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "dsolv e(eq,y(x));" }}}{PARA 0 "" 0 "" {TEXT -1 31 "How does this compare wit h y_p?" }{TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "y : = rhs(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "y-y_p;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "simplify(%);" }}}}{MARK "85 " 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }