How to solve inhomogeneous Laguerre equation? What is the technique to solve this equation?
$$xy''+(1-x)y'+\frac{y}{2}=e^{-x}$$
I tried solutions of the type: $y=Ae^{-x}+Bxe^{-x}$, but not all the terms cancelled.
Would I have to use the Wronskian?
 A: Taking the Laplace transform of both sides of the equation I get the first order linear ODE:
$$-2sY(s) - s^2Y'(s) + sY(s) + sY'(s) + Y(s) + \frac{Y(s)}{2}= \frac{1}{s + 1 } $$
Which has particular solution (according to WA):
$$\frac{\sqrt{-(s-1)s}}{\sqrt{1-s}s^{\frac{3}{2}}} - \frac{\arctan\left(\frac{\sqrt{2}s}{\sqrt{-(s-1)s}}\right)}{\sqrt{2}\sqrt{1-s}s^{\frac{3}{2}}} + \frac{\arctan\left(\frac{\sqrt{2}s}{\sqrt{-(s-1)s}}\right)}{\sqrt{2}\sqrt{1-s}\sqrt{s}}$$
So if a closed form exists for the particular solution it will be the inverse Laplace transform of this and is unlikely to be anything nice...
A: I'm afraid the Laguerre differential equation has not a simple closed form for $\lambda \neq 0$. In your case $\lambda = 1/2$. The solution of the homogeneous Laguerre equation, 
$$L[y] = y'' + (1-x) y' + \lambda y =0, $$ is given in terms of special functions:
$$y(x) = \alpha_1 U(-\lambda, 1,x)  + \alpha_2 L_\lambda(x),$$ where $U$ is the confluent hypergeometric function of the second kind and $L_\lambda$ is the generalized Laguerre polynomial. The non-homogenous part can be obtained with the help of the method of variation of parameters.
You can obtain a series expansion of every part of the solution by using the Frobenius method as @Bennet Gardiner pointed out in his comment.
Hope this helps!
Cheers.
A: Consider $xy''+(1-x)y'+\dfrac{y}{2}=0$ :
Let $y=\int_Ce^{xs}K(s)~ds$ ,
Then $x(\int_Ce^{xs}K(s)~ds)''+(1-x)(\int_Ce^{xs}K(s)~ds)'+\dfrac{1}{2}\int_Ce^{xs}K(s)~ds=0$
$x\int_Cs^2e^{xs}K(s)~ds+(1-x)\int_Cse^{xs}K(s)~ds+\dfrac{1}{2}\int_Ce^{xs}K(s)~ds=0$
$x\int_C(s^2-s)e^{xs}K(s)~ds+\int_C\left(s+\dfrac{1}{2}\right)e^{xs}K(s)~ds=0$
$\int_Cs(s-1)e^{xs}K(s)~d(xs)+\int_C\left(s+\dfrac{1}{2}\right)e^{xs}K(s)~ds=0$
$\int_Cs(s-1)K(s)~d(e^{xs})+\int_C\left(s+\dfrac{1}{2}\right)e^{xs}K(s)~ds=0$
$[s(s-1)e^{xs}K(s)]_s-\int_Ce^{xs}~d((s^2-s)K(s))+\int_C\left(s+\dfrac{1}{2}\right)e^{xs}K(s)~ds=0$
$[s(s-1)e^{xs}K(s)]_s-\int_Ce^{xs}((s^2-s)K'(s)+(2s-1)K(s))~ds+\int_C\left(s+\dfrac{1}{2}\right)e^{xs}K(s)~ds=0$
$[s(s-1)e^{xs}K(s)]_s-\int_Ce^{xs}\left(s(s-1)K'(s)+\left(s-\dfrac{3}{2}\right)K(s)\right)~ds=0$
$\therefore s(s-1)K'(s)+\left(s-\dfrac{3}{2}\right)K(s)=0$
$s(s-1)K'(s)=-\left(s-\dfrac{3}{2}\right)K(s)$
$\dfrac{K'(s)}{K(s)}=-\dfrac{2s-3}{2s(s-1)}$
$\int\dfrac{K'(s)}{K(s)}ds=-\int\dfrac{2s-3}{2s(s-1)}ds$
$\int\dfrac{K'(s)}{K(s)}ds=\int\left(\dfrac{1}{2(s-1)}-\dfrac{3}{2s}\right)ds$
$\ln K(s)=\dfrac{1}{2}\ln(s-1)-\dfrac{3}{2}\ln s+c_1$
$K(s)=cs^{-\frac{3}{2}}(s-1)^\frac{1}{2}$
$\therefore y=\int_Ccs^{-\frac{3}{2}}(s-1)^\frac{1}{2}e^{xs}~ds$
But since the above procedure in fact suitable for any complex number $s$ ,
$\therefore y_n=\int_{a_n}^{b_n}c_n(k_nt)^{-\frac{3}{2}}(k_nt-1)^\frac{1}{2}e^{xk_nt}~d(k_nt)=k_n^{-\frac{1}{2}}c_n\int_{a_n}^{b_n}t^{-\frac{3}{2}}(k_nt-1)^\frac{1}{2}e^{k_nxt}~dt$
For some $x$-independent real number choices of $a_n$ and $b_n$ and $x$-independent complex number choices of $k_n$ such that:
$\lim\limits_{t\to a_n}t^{-\frac{1}{2}}(k_nt-1)^\frac{3}{2}e^{k_nxt}=\lim\limits_{t\to b_n}t^{-\frac{1}{2}}(k_nt-1)^\frac{3}{2}e^{k_nxt}$
$\int_{a_n}^{b_n}t^{-\frac{3}{2}}(k_nt-1)^\frac{1}{2}e^{k_nxt}~dt$ converges
For $n=1$ , the best choice is $a_1=1$ , $b_1=\infty$ , $k_1=1$ when $\text{Re}(x)\leq0$
$\therefore y_1=C_1\int_1^\infty t^{-\frac{3}{2}}(t-1)^\frac{1}{2}e^{xt}~dt$ when $\text{Re}(x)\leq0$
