2nd order differential equation which not in general form

I'm having a really hard time solving this problem.

$(1-x^2)y^{\prime \prime} - xy^{\prime} + y = 6x$

I basically tried the

Power series

method and

Frobenius method

to solve this. But in both cases the general equation doesn't include any constant like $-6x$ in this case.. But I'm pretty sure there must be a tricky way for solving this. I'm running out of time and any kind of help will be very grateful.

Thanks in advance

-
If you find that the homogeneous DE $(1-x^2)y^{\prime \prime} - xy^{\prime} + y = 0$ has one solution $y=x$, can you then find a second linearly independent solution? And then can you apply variation of parameters to get the solution to the original DE? –  GEdgar Nov 24 '12 at 21:28
Let assume the solution of the above equation is y = a + ax1 + ax2 ... . Then how can I find a second linear independent solution. Please explain your method bit more... –  Thusitha Nov 24 '12 at 21:44
The method should be in all DE textbooks. If we know solution $y=x$ we try to find another solution of the form $xu$; substitute $y=xu$ in the homogeneous DE to get a first-order DE for $u'$. –  GEdgar Nov 24 '12 at 21:52

1 Answer

Just as for a homogeneous differential equation take the ansatz $$y_p = \sum_{k=0}^\infty a_k x^k.$$ Plug this into the inhomogeneous differential equation and collect terms in powers of $x$, $$\begin{equation*} (a_0+2 a_2) +\left(6 a_3-6\right) x +\left(12 a_4-3 a_2\right) x^2 +\left(20 a_5-8 a_3\right) x^3 +\ldots = 0.\tag{1} \end{equation*}$$ To find the particular solution we can set $a_0 = a_1 = 0$. This amounts to casting out linear combinations of the homogeneous solutions. Thus, $$y_p = x^3 + \frac{2}{5}x^5 + \ldots.$$ We can also read off the homogeneous solutions from (1), $$\begin{eqnarray*} y_1 &=& a_0\left(1 - \frac{1}{2}x^2 - \frac{1}{8} x^4 + \ldots\right) \\ y_2 &=& a_1 x. \end{eqnarray*}$$ The solutions $y_1$, $y_2$, and $y_p$ can be found exactly following the steps laid out by @GEdgar in the comments. I recommend finding them and verifying that their Taylor expansions yield the series solutions given above.

-