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{MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 39 "Solving ODEs with constant coefficients" }}{PARA 0 "" 0 "" {TEXT -1 74 "To solve ODEs with constant coefficients one ca n invoke the Maple command " }{TEXT 0 6 "dsolve" }{TEXT -1 50 " withou t any special instructions. The syntax is " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 265 "" 0 "" {TEXT 0 61 "dsolve( differential equation \+ for unknown , name of unknown);" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 60 "For the differential equation y'' +2y'-6y =0 one would input" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 266 "" 0 "" {TEXT -1 0 "" }{TEXT 0 54 "dsolve(diff(y(x),x,x) +2*diff(y(x),x)-6* y(x)=0 ,y(x));" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 53 "Notice that the first derivative in Maple is denoted " } {TEXT 0 12 "diff(y(x),x)" }{TEXT -1 31 " and the second derivative is " }{TEXT 0 14 "diff(y(x),x,x)" }{TEXT -1 6 " or " }{TEXT 0 14 "diff (y(x),x$2)" }{TEXT -1 23 " . The Maple command " }{TEXT 0 12 "diff(y (x),x)" }{TEXT -1 47 " tells Maple to differentiate the expression \+ " }{TEXT 0 4 "y(x)" }{TEXT -1 43 " with respect to the independent var iable " }{TEXT 0 1 "x" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 222 "To solve Initial Value Problems (IVP ) the syntax is slightly different. Suppose that your equation is a s econd order equation so that there are two initial conditions, say y(x 0) = y0 and y'(x0) = y'0. Then the syntax is:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 262 "" 0 "" {TEXT 0 78 "dsolve(\{,y(x0)=y0 ,D(y)(x0)=y'0\},y(x));" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 58 "Notice that the ODE together with the initial condit ions " }{TEXT 0 21 "y(x0)=y0,D(y)(x0)=y'0" }{TEXT -1 79 " are gro uped together inside curly braces \{ ...... \}. One could also use \+ " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 263 "" 0 "" {TEXT 0 23 "diff (y(x),x)(x_0) = y'0" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 45 "for the second initial condition written as " }{TEXT 0 12 "D(y)(x0)=y'0" }{TEXT -1 46 " above. This notation is so much lo nger than " }{TEXT 0 12 "D(y)(x0)=y'0" }{TEXT -1 27 " , so we will not use it. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 39 "Here a some examples from page 81 - 82." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 55 "Problem #1: Find the general solution of y''-y'-6y=0" }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "dsolve( diff(y(x),x$2)-diff(y(x),x)-6*y(x)=0,y(x));" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 87 " Notice that Maple uses the notation _C1 and _C2 to denote the \+ two arbitrary constants." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 56 "Problem #9: Find the general solution of y''- 6y' +7y=0" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "dsolve(diff(y(x),x,x)-6*diff(y(x),x)+7*y(x)=0,y(x)); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 85 "Problem #23: Find the solution of the IVP: y''-2y' +y=0 , y(1) = 12 , y'(1) = -5" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 75 "dsolve(\{diff(y(x),x,x) - 2* diff(y(x),x) + y(x)=0,y(1)=12,D(y)(1)=-5\},y(x));" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 12 "simplify(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 85 "Problem #25: Find the solution of the IVP: y''-y' +4y=0 , y(-2) = 1 , y'(-2) = 3" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 73 "dsolve(\{diff(y(x),x$2)-diff (y(x),x)+4*y(x) = 0,y(-2)=1,D(y)(-2)=3\},y(x));" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 12 "simplify(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 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 -1 0 "" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 31 "Solving ODEs using power series" }}{PARA 0 "" 0 "" {TEXT -1 336 "Once one passes from constant coefficients to non-consta nt coefficients in linear ODEs, one must in general seek power series \+ solutions of such equations. Maple will do this for you for a large c lass of problems. The first example I'll work is the power #7 on page 170 in the textbook. I worked out this example in class on Feb. 1. \+ " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 53 "To solve ODEs with a power series one use s the syntax" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 260 "" 0 "" {TEXT 0 62 "dsolve( , y(x) , type=seri es);" }{TEXT -1 2 " " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 11 "It is the " }{TEXT 0 11 "type=series" }{TEXT -1 99 " \+ option that tells Maple to seek a power series solution using the re currence formulas method. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 20 "Problem #7, page 170" }}{PARA 0 "" 0 " " {TEXT -1 128 "Here you are to use the power series method to find th e first 5 terms of the Maclaurin series of the general solution of the ODE" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 257 "" 0 "" {TEXT 0 20 " y'' - x^2*y'+2*y = x" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 81 "As discussed above one solves this equation with a powe r series using the syntax" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT 0 62 "dsolve( , y(x) , type=series);" }{TEXT -1 2 " " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "dsolve( diff(y(x),x$2)-x^2*diff(y(x),x)+2*y(x) = x , y(x),type=ser ies);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 95 " dsolve(\{diff(y(x),x$2)-x^2*diff(y(x),x)+2*y(x) = x,y(0)=a[0],D (y)(0)=a[1]\}, y(x),type=series);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 191 "The default \+ number of explicit terms in the series is 5, and the series is said to be of \"Order 6\". You can change the number of terms the Maple prin ts on the screen using the Maple command " }{TEXT 0 5 "Order" }{TEXT -1 111 " as follows. Simply set the Order to any positive integer. \+ For example, if you want 8 explicit terms we set " }{TEXT 0 10 "Order \+ := 9" }{TEXT -1 114 " . The first term is labeled with a zero 0, so \+ the number of explicitly give terms is one less that the order. " }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "Order:=9;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 94 "dsolve(\{diff(y(x),x$2)-x^2*diff(y(x),x)+2* y(x) = x,y(0)=a[0],D(y)(0)=a[1]\}, y(x),type=series);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" }}}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 1 " " }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 20 "Problem #9, page \+ 170" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 84 "Fi nd the first five terms of the Maclaurin series of the general solutio n of the ODE" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 261 "" 0 "" {TEXT 0 29 "y'' +(1 - x)y' + 2y = 1 - x^2" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 0 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{PARA 0 "" 0 "" {TEXT -1 127 "Here we will use a sli ghtly different way to find the solution. We first assign the differe ntial equation to a name, say ode1:" }}{PARA 0 "" 0 "" {TEXT -1 1 " " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "ode1:=diff(y(x),x,x)+(1-x) *diff(y(x),x)+2*y(x) = 1-x^2;\n\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "dsolve(\{ode1,y(0)=c[0],D(y)(0)=c[1]\},y(x),type=seri es);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "Order:=10;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "dsolve(\{ode1,y(0)=c[0],D(y)(0)=c[1]\},y(x),type=seri es);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" } }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {SECT 1 {PARA 4 "" 0 "" {TEXT -1 39 "Converting the solution to a poly nomial" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 14 "The output of " }{TEXT 0 6 "dsolve" }{TEXT -1 17 " with the option " }{TEXT 0 13 "type = series" }{TEXT -1 247 " is an equation that contai ns the big-O statement giving the order of the solution. If you want \+ to, for example, plot the result, then you must get rid of the big-O a nd convert the answer into a polynomial. You do this using the maple \+ statement " }{TEXT 0 32 "convert(what you want to convert" }{TEXT -1 2 ", " }{TEXT 0 8 "polynom)" }{TEXT -1 27 ". Here are some examples. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {SECT 1 {PARA 5 "" 0 "" {TEXT -1 12 "Example 1: " }}{PARA 0 "" 0 "" {TEXT -1 39 "From the first problem in this section:" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 94 "dsolve(\{d iff(y(x),x$2)-x^2*diff(y(x),x)+2*y(x) = x,y(0)=a[0],D(y)(0)=a[1]\}, y( x),type=series);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "convert (%,polynom);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 " subs(a[0]= 1,a[1]=2,%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "\n plot(rhs (%),x=0..5);\n" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 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 -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 10 "Example 2:" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 93 "dsolve(\{diff(y(x),x$2)+x^2*diff(y(x),x)+ y(x) = x,y(0)=a[0],D(y)( 0)=a[1]\}, y(x),type=series);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "convert(%,polynom);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 " subs(a[0]=1,a[1]=2,%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 " plot(rhs(%),x=0..5);" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 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 -1 0 "" }}} {SECT 1 {PARA 4 "" 0 "" {TEXT -1 37 "Solve the ODE y'' + 4y = 0 using \+ (a) " }{TEXT 0 6 "dsolve" }{TEXT -1 10 ", and (b) " }{TEXT 0 6 "dsolve " }{TEXT -1 10 " with the " }{TEXT 0 13 "type = series" }{TEXT -1 8 " \+ option." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 66 "It should be clear to you that the general solution of this ODE is " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 264 "" 0 "" {TEXT -1 30 "y = _C1 sin(2x) + _C2 cos(2x)" }}{PARA 0 "" 0 "" {TEXT -1 37 "Let's use \+ Maple to find the solution." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 43 "Solutio n without the 'type = series' option" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "dsolve(diff(y(x),x,x) + 4* y(x));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 56 "Notice something different here. The ODE was input as " }{TEXT 0 24 "diff(y(x),x,x) + 4*y(x) " }{TEXT -1 266 " without se tting it to zero. This is the default Maple assumes if you do not set the expression equal to something. Also, notice that I did not inclu de the name of the unknown variable here. Maple understood that there was just one unknown in the diff operators." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 41 "Solution using the 'type = series' option" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 76 "dsolve(\{diff(y(x),x,x) + 4*y(x)=0,y(0)=a[0], D(y)(0)=a[1]\},y(x),type=series);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "simplify(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}}{PARA 0 "" 0 "" {TEXT -1 86 " Maple will not recognize this series as a linear combination of cos(2x) and sin(2x). " }}{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 37 "Solving ODEs \+ using a Frobenius series" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 100 "To solve ODEs wit h a Frobenius series one uses the same syntax as for power series solu tions, namely" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 267 "" 0 "" {TEXT 0 62 "dsolve( , y(x) , type=seri es);" }{TEXT -1 2 " " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 11 "It is the " }{TEXT 0 11 "type=series" }{TEXT -1 271 " option that tells Maple to seek a power series solution using the r ecurrence formulas method. Maple will often return answers in terms o f generalized functions (Bessel functions, Legendre polynomials, etc). To see the series form of the solution you can use Maple's " }{TEXT 0 6 "series" }{TEXT -1 166 " command to expand the solution in a gener alized series. In the examples below I will work the examples on page s 176 - 180 that require Frobenius series solutions. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 258 30 "(1) The rhs and lh s commands:" }{TEXT -1 41 " The output of the dsolve command is an " }{TEXT 259 9 "equation " }{TEXT -1 11 "of the form" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 269 "" 0 "" {TEXT -1 34 "y(x) = general solution of the ODE" }}{PARA 0 "" 0 "" {TEXT -1 55 "If you want to work with t his solution you can use the " }{TEXT 0 3 "lhs" }{TEXT -1 22 " (left h and side) and " }{TEXT 0 3 "rhs" }{TEXT -1 43 " (right hand side) Mapl e commands, and the " }{TEXT 0 4 "subs" }{TEXT -1 99 " Maple command. \+ These commands will be used to manipulate the solutions in the follow ing examples." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 256 14 "(2) WARNING: " }{TEXT -1 193 " Maple sometimes returns the generalized series solutions in a form that is exactly opposite of the convention used in your textbook . Thus when Maple provides the general solution in the form " }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 268 "" 0 "" {TEXT -1 4 " " } {XPPEDIT 18 0 "y(x) = _C1*y[1](x)+_C2*y[2](x);" "6#/-%\"yG6#%\"xG,&*&% $_C1G\"\"\"-&F%6#F+6#F'F+F+*&%$_C2GF+-&F%6#\"\"#6#F'F+F+" }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 14 "the solutons " } {XPPEDIT 18 0 "y[1](x);" "6#-&%\"yG6#\"\"\"6#%\"xG" }{TEXT -1 7 " and " }{XPPEDIT 18 0 "y[2](x);" "6#-&%\"yG6#\"\"#6#%\"xG" }{TEXT -1 48 " may be reversed sometimes (but not always). " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 81 "Please read through the s olutions to learn the manipulations you will need to do." }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 57 "Example 4.11 (equal roots of indicial equation) , page 176" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 108 "Find the general solution of the ODE x^2 y'' + 5x y' + (4+x) \+ y = 0 about the regular singular point x = 0." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 0 {PARA 5 "" 0 " " {TEXT -1 8 "Solution" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 11 "We use the " }{TEXT 0 6 "dsolve" }{TEXT -1 17 " comm and and the " }{TEXT 0 11 "type=series" }{TEXT -1 77 " option to find \+ the solutions. I'm going to assign the solution to the name " }{TEXT 0 10 "solutions1" }{TEXT -1 266 " so I can manipulate it. I'm going t o start the calulation with Maple's restart command. If you have been working with Maple for a while, Maple will remember assignments of na mes, etc, so it is a good idea to clear Maple's memory before you star t new calculations." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 87 "solution1:=dsolve(x^2*diff(y(x),x$2) + 5*x*diff(y(x), x) + (x+4)*y(x),y(x),type=series);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 23 "Maple has giv en us the " }{TEXT 257 16 "general solution" }{TEXT -1 178 " of the OD E. We can seperate out the two solutions by setting _C1 and _C2 to ze ro. So to find the first solution substitute _C2 = 0 into the right h and side of this equation. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "y[1]:=subs(_C2=0,r hs(solution1));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 125 "This is the solution given on pag e 174 in your textbook. Similarly, to isolate the second solution we \+ substitute _C1=0 into " }{TEXT 0 9 "solution1" }{TEXT -1 1 ":" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "y[2]:=subs(_C1=0,rhs(solutio n1));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 100 "This is the second solution given on page 177 \+ of your textbook. Notice that ln(x) is multiplied by " }{XPPEDIT 18 0 "y[1];" "6#&%\"yG6#\"\"\"" }{TEXT -1 25 " in the above solution. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 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 -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 46 "Example 4.12 (conclusion (3), k = 0), page 177" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 63 "Find the general solut ion of the ODE x^2 y'' + x^2 y' -2y = 0." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 84 "solution2:=dsolve(x^2*diff(y(x),x$2) + x^2*diff(y(x),x) - 2*y(x ),y(x),type=series);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 46 "Let's change the order to 9 to se e more terms:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "Order:=9;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 86 "solution2:=dsolve(x^2*dif f(y(x),x$2) + x^2*diff(y(x),x) - 2*y(x)=0,y(x),type=series);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 300 "Notice tha t the logarithmic term again appears multiplied by O(x^9). This sugge st that k = 0 and the logarithmic terms infact does not appear in the \+ solution. In your textbook the coefficient k in fact turns out to be \+ zero. Let's change the order to 20 to see what happens to the logarit hmic term." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "Order:=20;" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 86 "solution2:=dsolve(x^2*diff (y(x),x$2) + x^2*diff(y(x),x) - 2*y(x)=0,y(x),type=series);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 165 " We can se perate out the two solutions by setting _C1 and _C2 to zero. So to fi nd the first solution substitute _C2 = 0 into the right hand side of t his equation. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "y[1]:=subs(_C2=0,rhs(solutio n2));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 142 "This is the first solution given at the top of page 178 in your textbook. Similarly, to isolate the second solution we substitute _C1=0 into " }{TEXT 0 9 "solution2" }{TEXT -1 1 ":" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "y[2]:=subs(_C1=0,rhs(solutio n2));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 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 -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 51 "Example 4.13 (c onclusion (3), k not zero), page 179" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 51 "Find the general solution of the ODE \+ x*y''-y = 0." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 5 "" 0 " " {TEXT -1 8 "Solution" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart: " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "solution3:=dsolve(x*dif f(y(x),x$2) - y(x),y(x),type=series);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 68 "This is the g eneral solution. Let's seperate out the two solutions." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "y[1]:=subs(_C2=0,rhs(solution3));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "y[2]:=subs(_C1=0,rhs(solu tion3));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 85 "These are the first and second solutions \+ given on pages 179 and 180 in your textbook." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 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 -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "dsolve(diff(y(x),x,x)- x*y(x)=0 ,y(x),type=serie s); \n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "Order:=12;\n" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "dsolve(diff(y(x),x,x)- x*y(x )=0 ,y(x),type=series);\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 77 "dsolve(\{diff(y(x),x,x)- x*y(x)=0,y(0)=a[0],D(y)(0)=a[1]\} ,y(x),t ype=series);\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 75 "dsolve(\{ diff(y(x),x,x)- y(x)=0,y(0)=a[0],D(y)(0)=a[1]\} ,y(x),type=series);\n " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 70 "dsolve(x*diff(y(x),x,x) + diff(y(x),x) + x*y(x)=0,y(x),type=series);\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "0 0 0" 0 }{VIEWOPTS 1 1 0 3 2 1804 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }