1. Series

For those that are interested. This problem is from the homework. The problem was made up by the professor. It is not from the differential equations book.I just want to see what you think about this problem and if so, is it correct. The problem has an initial value which is y(0) = 1, and y'(0) = 2. The professor wants at least five terms of the solution.

$
y'' + x^3 y' - x y = 0
$

First, you would assume a solution in the form of:

$
y = \sum_{n = 0}^{ \infty} a_n x^n
$

From here you can find the first and second derivatives of this solution:

$
\Rightarrow y' = \sum_{n = 1}^{ \infty} n a_n x^{n - 1}
$

$
\Rightarrow y'' = \sum_{n = 2}^{ \infty} n(n - 1) a_n x^{n - 2}
$

Once I have found my derivatives I will plug them back to my original equation:

$
\sum_{n = 2}^{ \infty} n(n - 1) a_n x^{n - 2} + x^3 \sum_{n = 1}^{ \infty} n a_n x^{n - 1} - x \sum_{n = 0}^{ \infty} a_n x^n = 0
$

$
\Rightarrow \sum_{n = 2}^{ \infty} n(n - 1) a_n x^{n - 2} + \sum_{n = 1}^{ \infty} n a_n x^{n + 2} - \sum_{n = 0}^{ \infty} a_n x^{n + 1} = 0
$

Now we want all powers to be n.

$
\Rightarrow \sum_{n = 0}^{ \infty} (n + 2) (n + 1) a_{n + 2} x^n + \sum_{n = 3}^{ \infty} (n - 2) a_{n - 2} x^n - \sum_{n = 1}^{ \infty} a_{n - 1} x^n = 0
$

Now we want to get the indexes the same. The starting points for the series have to be same. The only way to do that here is to evaluate the second and third term of the series that start at n = 3 and n = 1 and write the remainder of the series as the summation from n = 3 onward, so we can get all the indexes to 1.

Now combine all the series into one:

$
\Rightarrow 2a_2 + 6a_3 x + 12a_4 x^2 - a_0 x - a_1 x^2 + \sum_{n = 3}^{ \infty} [(n + 2) (n + 1) a_{n + 2} + (n - 2) a_{n - 2} - a_{n - 1})] x^n = 0
$

Now we want all the coefficients to be zero.

$
a_0 = 1, a_1 = 2
$

$
2a_2 = 0 \implies a_2 = 0
$

$
2a_2 + x (6a_3 - a_0) + x^2 (12a_4 - a_1) = 0
$

$
6a_3 = a_0 \implies a_3 = \frac {1}{6}
$

$
12a_4 = a_1 \implies a_4 = \frac {1}{6}
$

$
a_5 = \frac {a_2}{20} - \frac {a_1}{20} = - \frac {1}{10}
$

$
a_6 = \frac {a_3}{30} - \frac {2a_2}{30} = \frac {1}{180}
$

$
y_G = a_0 + a_1 x + a_2 x^2 + a_3 x^3 + a_4 x^4 + a_5 x^5 + a_6 x^6 + ....
$

$
y_G = 1 + 2x + \frac {x^3}{6} + \frac {x^4}{6} - \frac {x^5}{10} + \frac {x^6}{180} + ....
$

My Recursive Formula:

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

I have corrected my mistakes check to see if they are correct.

2. Originally Posted by fudawala
...
$
\Rightarrow 2a_2 + 6a_3 + 12a_4 - a_0 x - a_1 x^2 + \sum_{n = 3}^{ \infty} [(n + 2) (n + 1) a_{n + 2} + (n - 2) a_{n - 2} - a_{n - 1})] x^n = 0
$

...
you made an error in the above line, thus most of your coefficients are wrong.

it's not just $6a_3$ it should be $6a_3 x$

also, $12a_4$ should be $12a_4 x^2$

since those two are incorrect, and these things function on recursive definitions, the error is propagated throughout the whole series and after a while, all your coefficients will be wrong.

fix this

by the way, there is no need to explain everything that you are doing, i explain because i want you to understand my steps, there's no need for you to explain to me, it will save you a lot of typing if you just get to the point

3. Originally Posted by fudawala

My Recursive Formula:

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

I have corrected my mistakes check to see if they are correct.

this recursive formula is incorrect, and hence your coefficients for $a_5$ and $a_6$ are incorrect

the numerator should be: $a_{n - 1} - (n - 2)a_{n - 2}$ you had $(n - 2)a_{n - 1}$ for the second term

4. yeah, everything seems correct now