advertisement

Using Maple to find a power series solution of a differential equation. As you have seen, solving a differential equation using power series can be tedious. Now when the purpose is to solve a problem and a suitable device is available, it is often useful to know how to use the device. You can do your own searches, if and when you have time, here are a few examples to get you started. dy y say, using power series you punch in the following commands: To solve dx > with(powseries): > a:=powsolve(diff(y(x),x)=y(x)): tpsform(a, x,8); On hitting enter you would get: 1 1 1 1 1 1 C0C0 x C0 x 2 C0 x 3 C0 x 4 C0 x 5 C0 x 6 C0 x 7O( x 8 ) 2 6 24 120 720 5040 Here C0 is a constant and the above line means that the solution is 1 1 1 y C 0(1 x 12 x 2 16 x 3 241 x 4 120 x 5 720 x 6 5040 x 7 O( x 8 )) (Here O( x 8 ) means 1 x 7 there are terms that involve power 8 or higher of x. that after 5040 If you do not give any number you would get the series truncated at the fifth power. Here is the example: > a:=powsolve(diff(y(x),x)=y(x)): tpsform(a, x); 1 1 1 1 C0C0 x C0 x 2 C0 x 3 C0 x 4 C0 x 5O( x 6 ) 2 6 24 120 Before I let you play with it, I ask you to remember one thing. The software will not give you a general term of the power series. For example the power series solution given dy y is your usual above does not give you the information that the solution of dx y C 0e x . Now here is a somewhat nontrivial example: (Recall that if you already have >with(powseries): on your screen you need not repeat it.) > a:=powsolve(diff(y(x),x$2)-y(x)=0): > tpsform(a,x,8); 1 1 1 1 1 1 C0C1 x C0 x 2 C1 x 3 C0 x 4 C1 x 5 C0 x 6 C1 x 7O( x 8 ) 2 6 24 120 720 5040 Here there are two constants involved that means that there are tow linearly independent solutions. Once you sift though you would find that the solutions are: 1 1 1 y1 1 12 x 2 241 x 4 720 x 6 ... and y 2 x 16 x 3 120 x 5 5040 x 7 ... Now the question is when you are faced with a situation like: Find a series solution of y // xy / y 0, about x0 1 .. In such a case you can use the zsubstitution: Put z=x-1. This gives you x=z+1. You can change the equation to y // ( z 1) y / y 0, about z 0 0 , > a:=powsolve(diff(y(z),z$2)-(z+1)*diff(y(z),z)-y(z)=0): > tpsform(a,z,8); 1 1 1 1 1 1 3 1 C0C1 z C1 C0 z2 C1 C0 z3 C1 C0 z4 C1 C0 2 2 2 6 4 6 20 15 1 7 13 19 z5 C1 C0 z6 C1 C0 z7O( z8 ) 15 180 420 1260 Now sift through and rewrite the two solution by substituting z=x-1. There is the last job of taking care of problems like y // xy / y 0, x0 0, y (0) 2, y / (0) 1 For such problems the command is: > a:=powsolve(diff(y(x),x$2)-x*diff(y(x),x)y(x)=0,y(0)=2,D(y)(0)=1): > tpsform(a,x,8); 1 1 1 1 1 7 2xx 2 x 3 x 4 x 5 x 6 x O( x 8 ) 3 4 15 24 105