# Homework Help: Power series solution to a second order o.d.e.

1. Dec 1, 2008

### Vuldoraq

1. The problem statement, all variables and given/known data

Find the terms up to x^5 in the power series solution of the following equation

$$y''=(1+x^{2})y$$

2. Relevant equations

Power series, sum from 0 to infinity

$$y=\sum a_{n}x^{n}$$

3. The attempt at a solution

At first I just differentiated each term separately and then equated coefficients,

$$y=a_{0}+a_{1}x+a_{2}x^{2}+a_{3}x^{3}+a_{4}x^{4}+a_{5}x^{5}+...$$
$$y'=a_{1}+2a_{2}x+3a_{3}x^{2}+4a_{4}x^{3}+5a_{5}x^{4}+...$$
$$y''=2a_{2}+6a_{3}x+12a_{4}x^{2}+20a_{5}x^{3}+...$$

After equating and rearranging i ended up with,

$$y=a_{0}(1+\frac{x^{2}}{2}+\frac{x^{3}}{6}+\frac{x^{4}}{12}+\frac{x^{5}}{40}+...)+a_{1}(x+\frac{x^{2}}{2}+\frac{x^{3}}{3}+\frac{x^{4}}{8}+\frac{x^{5}}{24}+...)$$

Is this correct?

Also I was wondering how I would go about doing this for the general case, using complete sums and then equating coefficients,

$$y=\sum a_{n}x^{n}$$

$$y'=\sum na_{n}x^{n-1}$$

$$y''=\sum n(n-1)a_{n}x^{n-2}$$

$$x^{2}y=\sum a_{n}x^{n+2}$$

Subbing back into the original,

$$\sum n(n-1)a_{n}x^{n-2}=\sum a_{n}x^{n}+\sum a_{n}x^{n+2}$$

Equating coefficients,

$$n(n-1)a_{n}=a_{n-2}+a_{n-4}$$

But no matter what I do with this relation I can't get it into a helpful form that agrees with my above result???

Last edited: Dec 1, 2008
2. Dec 1, 2008

### Staff: Mentor

I don't see that you multiplied your series for y by (1 + x^2). After you do that, equate your series for y'' with the series for (1 + x^2)y, and compare like powers of x to get a relationship involving your series coefficients a_0, a_1, etc.

3. Dec 1, 2008

### Vuldoraq

That was a silly mistake to make , thankyou for pointing it out

$$2a_{2}+6a_{3}x+12a_{4}x^{2}+20a_{5}x^{3}+...=(a_{0}+a_{1}x+a_{2}x^{2}+a_{3}x^{3}+a_{4}x^{4}+a_ {5}x^{5}+...)+(a_{0}x^{2}+a_{1}x^{3}+a_{2}x^{4}+a_{3}x^{5}+a_{4}x^{6}+a_ {5}x^{7}+...)$$

Equating,

$$12a_{4}=a_{2}+a_{0}$$
$$20a_{5}=a_{3}+a_{1}$$
$$30a_{6}=a_{4}+a_{2}$$

and so on which leads to the relation,

$$a_{n+1}=(n+2)(n+3)a_{n+3}-a_{n-1}$$

which agrees with my other relation (with some rearranging).

Now I'm confused as to how this is helpful. What am I supposed to with this relation now that I have found it?

4. Dec 1, 2008

### Staff: Mentor

Use the relation you found plus the others you showed to get the coefficients a_0 through a_5. You're not given any initial conditions, so that means that a_0 and a_1 will be arbitrary and the other coefficients will be in terms of those two.

5. Dec 1, 2008

### Vuldoraq

I'm completley at a loss as to how to get the coefficients in terms of a_0 and a_1. Sorry if I'm being dumb, but I all I've got so far is,

Using these relations

$$a_{n+1}=(n+2)(n+3)a_{n+3}-a_{n-1}$$

$$a_{2}=12a_{3}-a_{0}$$ 1
$$a_{3}=20a_{4}-a_{1}$$ 2
$$a_{4}=30a_{5}-a_{2}$$ 3
$$a_{5}=42a_{6}-a_{3}$$ 4

And,

$$a_{n}=\frac{a_{n-2}+a_{n-4}}{n(n-1)}$$

$$a_{4}=\frac{a_{2}+a_{0}}{12}$$ 5
$$a_{5}=\frac{a_{3}+a_{1}}{20}$$ 6

By substituting 2 into 1 and then the result of that into 5 I got,

$$a_{4}=a_{1}/19$$

But this seems to be a circular way of doing it and sure enough I get, upon subs,

$$a_{3}=a_{1}/19$$

I think I'm going the wrong way about this...please could you guide me as to how I can find the coefficients in terms of a_0 and a_1?

6. Dec 1, 2008

### Staff: Mentor

Equating the series for y'' with x^2 * y + y, I got:
2a_2 = a_0
6a_3 = a_1
12a_4 = a_0 + a_2
20a_5 = a_1 + a_3
and so on.
You always want to solve for the higher-index coefficients in terms of those with lower indexes. In this problem, you'll eventually get back to a_0 and a_1. For example, a_4 is in terms of a_0 and a_2, but a previous equation relates a_2 and a_0.

All you need are a_0 through a_5.

7. Dec 3, 2008

### Vuldoraq

With your assistance I now get,

$$y=a_{0}(1+\frac{x^{2}}{2}+\frac{x^{4}}{8}+...)+a_{1}(x+\frac{x^{3} }{6}+\frac{7x^{5}}{120}+...)$$

Which seems more reasonable and my realtions all agree. Does this look okay to you?

Thanks a million for your help, I would still be stuck without it!