Reduction of Order Leads to Non-Elementary Integral

calculusintegrationordinary differential equationsreduction-of-order-ode

If $u_1=x+1$ is a solution of $$xu''-(x+1)u'+u=0$$ find another linearly independent solution using reduction of order.

I let $u_2=(x+1)v(x)$ be the second solution. Hence
$$v''(x^2+x)-v'(x^2+1)=0$$ Let $w=v'$, so
\begin{align}
\frac{dw}{dx}(x^2+x)-w(x^2+1)&=0 \\
\frac{dw}{dx}&=\frac{(x^2+x)^{-1}(x^2+1)}{w^{-1}} \\
\text{ln}(w)&=\int \frac{x^2+1}{x^2+x} \ dx \\
\text{ln}(w)&=\int 1-\frac{1}{x}+\frac{2}{x+1} \ dx \\
\text{ln}(w)&=x+\text{ln}\left(\frac{(x+1)^2}{x}\right)+C \\
w&=C_1\frac{e^x(x+1)^2}{x} \\
v&=C_1\int \frac{e^x(x+1)^2}{x} \ dx
\end{align}
Where $$C_1\int \frac{e^x}{x} \ dx$$ cannot be solved. How do I find $v$?

Best Answer

Your work is correct up to the partial fractions

$$ \frac{v''}{v'} = \frac{x^2+1}{x^2+x} = 1 + \frac{1-x}{x(x+1)} = 1 + \frac{1}{x} - \frac{2}{x+1} $$

Integrating this gives

$$ \ln(v') = x + \ln x - 2\ln(x+1) $$ $$ \implies v' = \frac{xe^x}{(x+1)^2} = \frac{e^x}{x+1}-\frac{e^x}{(x+1)^2} $$

This has the form $e^xf(x) + e^xf'(x) = (e^xf(x))'$, therefore

$$ v(x) = \frac{e^x}{x+1} $$

I've ignored the integration constants, since they're already included in the general solution, which is

$$ u(x) = (x+1)(c_1 + c_2v(x)) = c_1(x+1) + c_2e^x $$