Differential equation from an exam Hello there yesterday in my exam I had the following problem: 
Knowing that $y_1=x$ is a solution, solve: $$(x^2 - 1)y''+2xy'-2y=0$$ My try was to use Liouville-Ostrogradski formula (see: https://www.encyclopediaofmath.org/index.php/Liouville-Ostrogradski_formula) So bassically what I have is (I will denote with C the second Wronskian since is just a constant): $$y_1y_2'-y_1'y_2=Ce^{-\int{\frac{2x}{x^2-1}}dx}$$ $$xy_2'-y_2=\frac{C}{x^2-1}\rightarrow \frac{y_2'}{x}-\frac{y_2}{x^2}=\frac{C}{x^2(x^2-1)}$$  $$\left(\frac{y_2}{x}\right)'=\frac{C}{(x^2-1)x^2}=\frac{C}{(x^2-1)}-\frac{C}{x^2}$$ By integrating : $$\frac{y_2}{x}=\left(\frac{C}{2}\ln\left|\frac{x-1}{x+1}\right|+\frac{C}{x}+C_2\right)$$$$y_2=c_1x\ln\left|\frac{x-1}{x+1}\right|+c_2x +c_3$$ Was my solution correct and complete? I am wondering if  I must prove that this differential equation has only those two solutions, but I have no ideea how.
 A: You did a good job. For the last step I got this :
$$\left(\frac{y_2}{x}\right)'=\frac{K_1}{x^2(x^2-1)}$$
$$\left(\frac{y_2}{x}\right)'=K_1 \left (\frac 1x+\int \frac {dx}{(x^2-1)}\right )$$
$$y(x)=K_1+K_1\frac x2 \ln \left|\frac {x-1}{x+1}\right |+K_2x$$
You must have two constants not three it's a second order diff equation
And the $\frac 12$ is missing in your final answer ...
Note that $K_2$ can absorb the constant $\frac 12$ but then you must have a  factor 2 with the other occurence of $K_1$
$$\frac 12 K_1=C \implies K_1=2C$$
$$ \implies y(x)=2C+C x \ln \left|\frac {x-1}{x+1}\right |+K_2x$$
A: Using reduction of order, if one solution is $y=x$ then use $y=ux$ to reduce to a first order equation.
Then $y'=xu'+u$ and $y''=xu''+2u'$ and you substitute to give
$(x^2-1)(xu''+2u')+2x(xu'+u)-2xu=0$ which tidies to
$u''x(x^2-1)+2u'(2x^2-1)=0$
Now let $v=u'$ and you have
$v'x(x^2-1)+2v(2x^2-1)=0$
$\frac{dv}{dx}=\frac{-2(2x^2-1)}{x(x^2-1)}v$
$\int\frac{1}{v}dv=\int\frac{2(1-2x^2)}{x(x-1)(x+1)}dx$
Partial fractions gives
$\int\frac{1}{v}dv=\int-\frac{2}{x}-\frac{1}{x-1}-\frac{1}{x+1}dx$
$ln(v)=-2ln(x)-ln(x-1)-ln(x+1)+ln(c)$ where $c$ is a constant
$v=\frac{c}{x^2(x^2-1)}$
$\frac{du}{dx}=\frac{c}{x^2(x^2-1)}$
Partial fractions again then you will get your second constant when you integrate again. 
A: Concerning completeness, for a linear ODE like this, given any two solutions $f_1$ and $f_2$, any linear combinations of them, $Af_1 + Bf_2$ is also going to be a solution. Therefore the set of all solutions of the ODE form a vector space. 
It is a little harder to show, but if the ODE is of order $n$, then the space of solutions is $n$ dimensional. That is 2-dimensional in your case.
So to find all solutions, you just need to find 2 linearly independent solutions. All the other solutions will be a linear combination of these two.
You are given that one solution is $y_1 = x$. From your work (with the constant correction that has been discussed by others), a second solution is $$y_2 = x\ln\left|\frac{x-1}{x+1}\right| + 2$$
Therefore the general solution is
$$y = Ax + B\left(x\ln\left|\frac{x-1}{x+1}\right| + 2\right)$$
for arbitrary constants $A,B$.
A: It might be worth noting this is a particular example of Legendre's Differential Equation. Solutions should cross pollinate into interesting results. 
http://mathworld.wolfram.com/LegendreDifferentialEquation.html
