Find the form of a second linear independent solution when the two roots of indicial equation are different by a integer Consider the differential equation
$$x^2y''+3(x-x^2)y'-3y=0$$
$(a)$ Find the recurrence equation and first three nonzero terms of the series solution in powers of $$ corresponding to the larger root of the indicial equation.
$(b)$ What would be the form of a second linearly independent solution of this differential equation?
I found the indicial equation to be $r(r-1)+3r-3 = 0$, so the two roots are $r_1=-3$ and $r_2=1$.
And the recurrence relation is $a_n = \dfrac{3(n-1+r)a_{n-1}}{(n+r)(n+r-1)+3(n+r)-3}$
set $r=1$, then $a_n = \dfrac{3na_{n-1}}{(n+3)(n+1)-3}$. And I can figure out first linearly independent solution.
But for $r=-3$,then $a_n = \dfrac{3(n-4)a_{n-1}}{(n-3)(n-1)-3}$, if let $a_0$ be an arbitrary constant, then $a_1 =\dfrac{3(-3)a_0}{(-2)(0)}$, which doesn't work.
Then how do I figure out the second linearly independent solution?
 A: Here is the procedure.
Denote the two roots by $r_1$ and $r_2$, with $r_1 \gt r_2$.
The Method of Frobenius will always generate a solution corresponding to $r_1$, but may  generate a solution for the smaller second root $r_2$ of the indicial equation.
If the method fails for $r_2$, then an approach is to keep the recursion solution in terms of $r$ and use it to find the coefficients $a_n$ (for $n \ge 1$),  in terms of both $r$ and $a_0$, where $a_0 \ne 0$. For ease, $a_0$ is typically chose to be one.
Using this more general form and the coefficients, the two independent solutions can be written as:
$$y_1(r, x) = x^r \sum_{n=0}^\infty ~ a_n(r)x^n = \sum_{n=0}^\infty ~ a_n(r)x^{n+r} \\y_2(r,x) = \dfrac{\partial}{\partial r}[(r - r_2)y_1(r, x)]~\Bigr|_{r=r_2}$$
You should be able to use this approach and show:
$$y(x) = y_1(x) + y_2(x) = \dfrac{c_1(3x(3x^2 + 3x+ 2) + 2)}{x^3} + \dfrac{c_2e^{3x}}{x^3}$$
A: Let me rewrite your ODE as follows:
$$L[y] = p_0 y'' + p_1 y' + p_2 y = 0,$$ where $p_i(x)$ are the coefficients of the equation. If you know one of the two linear indepent solutions of the homogenous part (indeed the whole ode is homogenouse), say $y_1$, you can obtain $y_2$ ($y = A y_1+B y_2$) by using the method of variation of parameters.
Let me show you.
Set $y = A(x)y_1$ and substitute back into the original ode:
$$p_0 (A''y_1 + 2A'y_1' + A y_1'') + p_1 (A'y_1 + A y_1') + p_2 A y_1 = 0,$$
arrange terms in order to get a ODE-1 for $A(x)$:
$$ A'' + \left(\frac{2y'_1}{y_1} + \frac{p_1 y_1}{p_0} \right) A'  +  \frac{1}{p_0} L[y_1] A= 0,$$
since $L[y_1]=0$, $A$ can be obtained by solving this equation in terms of an integrating factor as follows:
$$\frac{d}{dx} (u A') = u \cdot 0 = 0,$$
where $u = e^{\int \left(\frac{2y'_1}{y_1} + \frac{p_1 y_1}{p_0} \right) \, dx}$. It yields:
$$uA' = a_2 \Rightarrow A = a_1 + a_2 \int \frac{dx}{u},$$
and hence the solution, $y = a_1 y_1 + a_2 y_1 \int \frac{dx}{u}$, being $a_i$ constants of integration.
I hope this is useful to you.
Cheers! 
A: Let $y=\sum\limits_{n=0}^\infty a_nx^{n+r}$ ,
Then $y'=\sum\limits_{n=0}^\infty(n+r)a_nx^{n+r-1}$
$y''=\sum\limits_{n=0}^\infty(n+r)(n+r-1)a_nx^{n+r-2}$
$\therefore x^2\sum\limits_{n=0}^\infty(n+r)(n+r-1)a_nx^{n+r-2}+3(x-x^2)\sum\limits_{n=0}^\infty(n+r)a_nx^{n+r-1}-3\sum\limits_{n=0}^\infty a_nx^{n+r}=0$
$\sum\limits_{n=0}^\infty(n+r)(n+r-1)a_nx^{n+r}+\sum\limits_{n=0}^\infty3(n+r)a_nx^{n+r}-\sum\limits_{n=0}^\infty3(n+r)a_nx^{n+r+1}-\sum\limits_{n=0}^\infty 3a_nx^{n+r}=0$
$\sum\limits_{n=0}^\infty(n+r+3)(n+r-1)a_nx^{n+r}-\sum\limits_{n=1}^\infty3(n+r-1)a_{n-1}x^{n+r}=0$
$(r+3)(r-1)a_0x^r+\sum\limits_{n=1}^\infty((n+r+3)(n+r-1)a_n-3(n+r-1)a_{n-1})x^{n+r}=0$
The indicial equation is $(r+3)(r-1)=0$ , the two roots are $r_1=-3$ and $r_2=1$ .
The recurrence relation is $(n+r+3)(n+r-1)a_n-3(n+r-1)a_{n-1}=0$ , i.e. $(n+r+3)(n+r-1)a_n=3(n+r-1)a_{n-1}$
Each root from the indical equations may not always only find one group of the linearly independent solutions, sometimes we can find more than one group of the linearly independent solutions at the same time.
When we choose $r=-3$ , the recurrence relation becomes $n(n-4)a_n=3(n-4)a_{n-1}$ , which has a value of $n$ at $n=4$ so that it is independent to the recurrence relation. Besides $a_0$ can chooes arbitrary, $a_4$ can also chooes arbitrary. This makes the effect that we can find two groups of the linearly independent solutions that basing on $n=0$ to $n=3$ and $n=4$ to $n=+\infty$ respectively.
