I want to solve $$y''+\frac{x}{1-x}y'-\frac{1}{1-x}y=(x-1)e^{x}$$ using variation of parameters. Now, I could guess a solution to the inhomogeneous, i.e. $y_1 = x$. Then I used the formula of reduction of order $$y_2 = x\int\frac{e^{-\int \frac{x}{1-x}dx}}{x^2}dx =x\int \frac{e^{x+\ln(1-x)}}{x^2} = x\int\frac{(1-x)e^x}{x^2} = x\left[\int \frac{e^{x}}{x^2}-\int\frac{e^{x}}{x}\right] = x\left[-x^{-1}e^x+\int\frac{e^{x}}{x}-\int\frac{e^{x}}{x} \right] = -e^{x}$$ to find $y_2 =-e^x$.
However Mathematica says e solution is $y_2 = e^x$ so my question is:
Can I absorb the sign into the constant and take $y_2 =e^x$ ?
Yes, you can multiply a solution of the homogeneous equation by any constant (including $-1$) and get another solution of the homogeneous equation.