How to find the general solution of $xy''-(2x+1)y'+x^2y=0$ when we know the general solution of $y''+2y'+xy=0$? Given that the general solution of $y''+2y'+xy=0$ is $y=C_1\int_0^\infty e^{-t^2}\cos\biggl(\dfrac{t^3}{3}-xt\biggr)dt+C_2\int_0^\infty\biggl(e^{-\frac{t^3}{3}+t^2-xt}+e^{-t^2}\sin\biggl(\dfrac{t^3}{3}-xt\biggr)\biggr)dt$ , find the general solution of $xy''-(2x+1)y'+x^2y=0$ .
Note that according to Particular solution to a Riccati equation $y' = 1 + 2y + xy^2$, both $xy''-(2x+1)y'+x^2y=0$ and $y''+2y'+xy=0$ come from the same Riccati equation.
 A: The obvious way, as I'm sure you've probably looked at, is to transform from the equation $y''+2y'+xy=0$ to the Ricatti equation $v'=1+2v+xv^2$, and then to the equation you're interested in $xw''-(2x+1)w'+x^2w=0$.  Doing this, you can see the relationship
$$
\frac{w'}{w}=-x\frac{y}{y'}
$$
which is solved as 
$$
w=C_1\exp\left(-\int x\frac{y}{y'}\,\mathrm{d}x\right)
$$
noting that $y/y'$ only has a single constant.  This isn't the form we expect for 2nd order linear equations $(w=c_1w_1+c_2w_2)$ (not obviously, at least) but it's the only way I can see of making use of the solution to the first equation.
The reason I think you can't do any better comes from the reasoning in Particular solution to a Riccati equation $y' = 1 + 2y + xy^2$, in that you can't apply the kernel method to the equation of interest.
For example, it's easy to spot the similarities between solution of the Airy equation: $y''+xy=0$ and the solution you've given for $y''+2y'+xy=0$ because the kernel method can be used for both.  Namely, the difference is a factor $\mu=e^{-t^2}$ that shows up in the kernel:
$$
y=C_1\int_0^\infty \mu\cos\biggl(\dfrac{t^3}{3}-xt\biggr)\mathrm{d}t+C_2\int_0^\infty\biggl(\mu^{-1}e^{-\frac{t^3}{3}-xt}+\mu\sin\biggl(\dfrac{t^3}{3}-xt\biggr)\biggr)\mathrm{d}t.
$$
Are you so set on a solution that makes use of your known solution?  The equation you're interested in can be solved by power series, considering it only has a regular singular point at $x=0$.
edit: I did just notice you acknowledged this last statement in the linked post, and your reasoning for it being troublesome (multi-term recurrence relation) I would agree with... but I would also say that it's better than no solution at all.
A: Not sure if you have your heart set on exact solutions, but what about a perturbative solution?  I can only speak in relatively general terms for now, but I hope this outline is clear enough to guide you on what to do.
Rewrite the first equation for which we know the solution as 
$$x y''+2 x y' + x^2 y = 0$$
We write the desired solution to this equation as $y_0(x)$.  You write a general form of the solution above; Mathematica, however, writes the form more compactly as
$$y_0(x) = e^{-x} (a \, \mathrm{Ai}{[e^{i \pi/3} (1-x)]} + b \, \mathrm{Bi}{[e^{i \pi/3} (1-x)]}) $$
$\mathrm{Ai}$ and $\mathrm{Bi}$ being the Airy functions and the constants $a$ and $b$ determined by initial conditions not specified.
We rewrite the 2nd equation as follows:
$$x y''+2 x y' + x^2 y = (4 x+1) y'$$
The first step in a perturbative approach is to introduce a "small" parameter $\epsilon$ that represents a deviation from the initial solution.  That is, we write the the above equation as
$$x y''+2 x y' + x^2 y = \epsilon (4 x+1) y'$$
This is a regular perturbation because the perturbation is not being done at the highest derivative (i.e., no new solutions would be introduced by the perturbation).  The solution $y(x)$ may then be written as
$$y(x) = \sum_{n=0}^{\infty} \epsilon^n y_n(x)$$
without really knowing whether that sum converges.  The $y_n(x)$ satisfy a recurrence relation:
$$x y_n''+2 x y_n' + x^2 y_n = \epsilon (4 x+1) y_{n-1}'$$
where, for $n \ge 1$, $y_n(0) = 0$, $y_n'(0) = 0$.
Of course, you don't want to have to compute more than a few terms.  You also need to determine whether the above series converges or diverges; if it diverges, then you need to figure out how many terms you can compute before the approximation no longer works.  Finally, of course, to get an approximation to the solution, use $\epsilon = 1$.
A: See page 21 section 0.2 ( and more ) of Handbook of Exact Solutions for Ordinary Differential Equations .
Good Look.
