# EDIT: Solve the second-order ODE $y''+\frac{1}{x}y'=a,\;a$ constant using variation of parameters

Note: I changed $$y$$ to $$y'$$. Solve the second-order ODE $$y''+\frac{1}{x}y'=a,\;\;a$$ constant.

For me to use Variation of parameters, I need to find two linearly independent solutions $$y_1$$ and $$y_2$$, where the particular solution, $$y_p$$ is given by

\begin{align} y_p(x)=-y_1(x)\int\dfrac{r(x)y_2(x)}{W(y_1,y_2)}dx+y_2(x)\int\dfrac{r(x)y_1(x)}{W(y_1,y_2)}dx \end{align} and $$W,\;r(x)$$ are Wronskian and the right-hand side, respectively. Here, $$r(x)=a.$$

So, I need to look for the solution to $$y''+\frac{1}{x}y'=0$$ to get $$y_1$$ and $$y_2.$$ If I get them, I'm done. Is there any way of getting these two?

• WA says this here $$\left\{\left\{y(x)\to -\pi a J_1\left(2 \sqrt{x}\right) G_{2,4}^{2,1}\left(x\left| \begin{array}{c} \frac{3}{2},1 \\ \frac{3}{2},\frac{5}{2},\frac{1}{2},1 \\ \end{array} \right.\right)+\pi a x^{5/2} \, _0\tilde{F}_1(;3;-x) Y_1\left(2 \sqrt{x}\right)+c_1 \sqrt{x} J_1\left(2 \sqrt{x}\right)+2 i c_2 \sqrt{x} Y_1\left(2 \sqrt{x}\right)\right\}\right\}$$ – Dr. Sonnhard Graubner Apr 5 at 17:51
• @Dr. Sonnhard Graubner: Wow! That's something else! – Omojola Micheal Apr 5 at 17:53
• $y_1=ax$ works. I don't know how to go about finding a second linearly independent solution though. – John Doe Apr 5 at 18:10
• Making $Y(x) = y(x) + ax$ you have the DE $Y''(x) + \frac 1x Y(x) = 0$ solving for $Y(x)$ we have then $y(x) = Y(x)-a x$ – Cesareo Apr 5 at 18:29
• @Dr. Sonnhard Graubner: Sorry for the actual error, I made an edit! – Omojola Micheal Apr 5 at 20:00

## 2 Answers

This is solvable.$$xy''+y'=0\\(xy')'=ax\\xy'=C_1\\y=\int\frac {C_1}x\,dx\\y=C_1\ln x+C_2$$ So your two independent solutions can be $$1$$ and $$\ln x$$.

• @LutzL You're right, thanks – John Doe Apr 6 at 0:52

You can integrate $$xy''+y'=0$$ to $$xy'=C$$ and further to $$y=C\ln x+D$$, which is the homogeneous or complimentary solution.