6.11 Example 11. y+xy=x2

(1)y+xy=x2

Looking first at y+xy=0. Expansion around x=0. This is an ordinary point. Hence standard power series will be used. let y=n=0anxn. Substituting into the ode gives

n=1nanxn1+xn=0anxn=0n=1nanxn1+n=0anxn+1=0

We always want to power on x be the same in each sum and be xn. Adjusting gives

(3A)n=0(n+1)an+1xn+n=1an1xn=0

For n=0 we have

a1x0=x0

Hence a1=1. The recurrence relation is for n>0. From (3A) we have

(n+1)an+1xn+an1xn=0((n+1)an+1+an1)xn=0(n+1)an+1+an1=0

For n=1

2a2+a0=0a2=a02

For n=2

3a3+a1=0a3=0

For n=3

4a4+a2=0a4=a24=a08

And so on. Hence

yh=n=0anxn=a0+a1x+a2x2+a3x3+a4x4+=a0a02x2+a08x4a048x6=a0(112x2+18x4148x6)

Now we find yp. Let

y=yh+yp

Let us start by trying the undetermined coefficients method. We will see this will fail. Let yp=c2x2+c1x+c0. Substituting this into the ode gives

(c2x2+c1x+c0)+x(c2x2+c1x+c0)=x22c2x+c1+c2x3+c1x2+c0x=x2c1+x(2c2+c0)+x2(c1)+x3(c2)=x2

Hence c1=1,c2=0,c1=0. We see this did not work. We get both c1=0 and c1=1. What went wrong? The problem is that we used undetermined coefficients on an ode with non constant coefficients. And this is a no-no. Undetermined coefficients can sometimes work on ode with non constant coefficients but by chance as we see in earlier examples.

In solving an ode not the series method and if the ode have non constant coefficients, we should also not use undetermined coefficient but use the variation of parameters method which works on constant and non constant coefficients. We can not use variation of parameters here, since we are solving using series and do not have basis functions for integration.

So what to do now? How to find yp? We use the same balance equation method as was done in earlier examples for singular point. This example was added here to show that undetermined coefficients can fail when finding yp even on ordinary point. So we should always use balance method in series solution to find yp as was done in all the earlier examples.

Assuming yp is

yp=n=0cnxnyp=n=0ncnxn1

Substituting this into the ode gives

n=0ncnxn1+xn=0cnxn=x2n=0ncnxn1+n=0cnxn+1=x2n=1ncnxn1+n=0cnxn+1=x2n=0(n+1)cn+1xn+n=1cn1xn=x2

And the above is what will be used to obtain the cn and yp. For n=0

c1x0=x2

No balance. Hence c1=0. For n=1

2c2x+c0x=x2(2c2+c0)x=x2

No balance. Hence 2c2+c0=0. Here, we are free to choose c0=0. Therefore c2=0. For n=2

3c3x2+c1x2=x2(3c3+c1)x2=x2

Balance exist. Hence 3c3+c1=1. But c1=0, which gives c3=13.  For n=3

4c4x3+c2x3=x2

No balance. Hence 4c4+c2=0 But c2=0 then c4=0. For n=4

5c5x4+c3x4=x2

No balance. Hence 5c5+c3=0 or c5=115. For n=5

6c6x6+c4x6=x2

No balance. Hence 6c6+c4=0. But c4=0, hence c6=0. For n=6

7c7x6+c5x6=x2

No balance. Hence 7c7+c5=0. But c5=115, therefore c7=1105 and so on. Therefore

yp=n=0cnxn=c0+c1x+c2x2+c3x3+=0+0+0+13x3+0115x5+0+1105x7=13x3115x5+1105x71945x9+

The final solution is

y=yh+yp=a0(112x2+18x4148x6)+(13x3115x5+1105x71945x9+)

In this example, we choose c0=0. This was arbitrary choice.