Solve differential equation with variation of parameters? $$(1-x)y'' +xy' - y = 1-x$$
i) Check if $y_1(x)=e^x$ and $y_2(x) = x$ is a solution to the differential equation (homogeneous).
ii) Use variation of parameters to find a general solution to the inhomogeneous equation.  :)
Any tips/solution on this one? :D
 A: *

*Test $y_1$: $y_1 = e^x, y'_1 = e^x, y''_1 = e^x \rightarrow (1-x) e^x + x e^x - e^x = 0$

*Test $y_2$: $y_2 = x, y'_2 = 1, y''_2 = 0 \rightarrow (1-x)0 + x \times 1 - x = 0$


Thus both $y_1(x)$ and $y_2(x)$ are solutions to the homogeneous equation.
We are asked to solve this using Variation of Parameters (VoP), given:
$$\tag 1 y'' + \dfrac{x}{1-x} y' -\dfrac{1}{1-x} y = 1$$
Note the restrictions on $x$.
Step 1
Find the homogeneous solution to $(1)$, so we have:
$$\tag 2  y'' + \dfrac{x}{1-x} y' -\dfrac{1}{1-x} y = 0$$
This yields (the problem provided this and we verified it above):
$$y_h = c_1 e^x + c_2 x$$
Step 2
We now make use of VoP, so we set: $y_1 = e^x$ and $y_2 = x$ from $y_h$ and $f = 1$ from $(1)$.
We calculate the Wronskian of $y_1$ and $y_2$, yielding $W(e^x, x) = -e^x (x-1)$.
Using VoP, we have:
$\displaystyle u_1 = \int \dfrac{-y_2 f}{W(e^x, x)} dx = \int \dfrac{-x(1)}{-e^x (x-1)} dx = \dfrac{\text{Ei}(1-x)}{e}-e^{-x}$, $~E_i$ is the Elliptic Integral
$\displaystyle u_2 = \int \dfrac{y_1 f}{W(e^x, x)} dx = \int \dfrac{e^x(1)}{-e^x (x-1)} dx = -\ln (1-x)$
Now, $y_p$ is given by:
$$y_p = y_1 u_1 + y_2 u_2 = e^{x-1} \text{Ei}(1-x)-x \ln (x-1)-1$$
Step 3
Our final solution is given by:
$$y(x) = y_h(x) + y_p(x) = c_1e^x + c_2 x + e^{x-1} \text{Ei}(1-x)-x \ln (x-1)-1$$
A: Firstly sub in  $ y_1 $ and $y_2$ into the homogeneous version of (i) and hopefully you'll get zero. Then a general solution for the homogeneous equation would be $A y_1+By_2$
So if we let $ y = e ^ x $, then: $(1-x)y''+xy''-y=(1-x)e ^ x+x e ^ x-e ^ x=0$
Now try the same for $y=x $
edit (not so sure on the in homogenous part)
And the general in homogenous solution would be $y=Ay_1+By_2+Cx+Dx ^ 2 $
