Can I absorb the sign into the constant of a solution to the homogeneous equation in a second order ode?

403 Views Asked by At

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$ ?

2

There are 2 best solutions below

0
On BEST ANSWER

Yes, you can multiply a solution of the homogeneous equation by any constant (including $-1$) and get another solution of the homogeneous equation.

0
On

There was an error in the second step but it did not change the solution.

\begin{eqnarray} y_2 &=& x\int\frac{e^{-\int \frac{x}{1-x}dx}}{x^2}dx\\ &=&x\int \frac{e^{x+\ln(x-1)}}{x^2}\,dx\\ &=& x\int\frac{(x-1)e^x}{x^2}\,dx\\ &=&x\int\left(\frac{e^x}{x}\right)^\prime dx\\ &=& x\left(\frac{e^x}{x}\right)\\ &=&e^x \end{eqnarray}

But this is merely a multiple of $-e^x$ so the general solution for the homogeneous part is still

$$y_c=c_1x+c_2e^x$$