We define the general term of the power series solution together with a few terms either side.
Next we evaluate the derivative of the series
and the second derivative
Now we substitute these into the left hand side of the differential equation.
Next we expand this to examine the coefficient of .
We try and pull out the coefficient of , but the result is not quite correct.
There are still some explicit powers of x, so we remove these with the next command.
This gives the recurrence relation for a[s+2] in terms of a[s]. We solve for a[s+2]:
and use cut and paste to describe the recurrence relation.
This factorises/simplifies as
We want to define the function for the coefficients.
We use cut and paste to define a[p]
Since the series starts at a[0] the coefficients of any "lower" powers of x are zero. Thus we set:
We pull out the factor of ; in other words we set the constant term to unity
We may assemble the coefficients of the even powers of x into a table:
and these combine to give the even power series expansion.
The odd power terms build up from the x term. We pull out the factor of ; in other words we set the constant term to unity
We may assemble the coefficients of the odd powers of x into a table:
and these combine to give the odd power series expansion.
(not conventionally normalised)
(not conventionally normalised)