# Analytical solution to a specific differential equation

I was wondering whether there is an analytical solution to the ODE $$$$-n\int xy(x)dx + ihy'(x) + (x^2+k)y(x) = 0,$$$$ where $$n=0,1,2,...$$, $$h \in \mathbb{R}$$, and $$k=+1,0$$ or $$-1$$.

For $$n=0$$ this can be solved exactly, and the solution is $$$$y(x) = C \exp\left[ih\left(\frac{x^3}{3}+kx\right)\right] \equiv f(x).$$$$

However, I struggled to find a general solution for different $$n$$. Differentiating the ODE gives $$$$ihy''(x)+(x^2+k)y'(x)+(2-n)xy(x)=0.$$$$ I have tried the ansatz $$$$y(x) = f(x)^{(n-2)/2} + f(x)^{(n-2)/2}\int f(x)^{1-n} dx,$$$$ but it only satisfies the equation when $$n=2$$.

I was able to make some progress by separating the equation into its real and imaginary parts and integrate the coupled equations numerically, but I was hoping for an analytical solution.

The other possible solution is the triconfluent Heun function $$$$y(x) = e^{-\frac{x^{3}+3 kx}{3 h}} C_{2} \text { HeunT }\left[0, \frac{-4+n}{h},-\frac{k}{h}, 0,-\frac{1}{h}, x\right] + C_{1} \text { HeunT }\left[0, \frac{-2+n}{h}, \frac{k}{h}, 0, \frac{1}{h}, x\right].$$$$

My question is whether there is an analytical solution of a simpler form?

For $$k=0$$ the solution is a hypergeometric function, $$y(x)=C_1 \, _1F_1\left(\frac{2}{3}-\frac{n}{3};\frac{2}{3};\frac{i x^3}{3 h}\right)-(3h)^{-1/3}(-1)^{5/6} C_2 x \, _1F_1\left(1-\frac{n}{3};\frac{4}{3};\frac{i x^3}{3 h}\right),$$ which at least for some values of $$n$$ can be reduced to a Bessel function and/or an incomplete gamma function.
$$n=1:\qquad y(x)=\frac{\sqrt[6]{-\frac{1}{3}} \sqrt{x} e^{\frac{i x^3}{6 h}} \left(3 \sqrt[3]{2} C_1 \Gamma \left(\frac{5}{6}\right) J_{-\frac{1}{6}}\left(-\frac{x^3}{6 h}\right)-i C_2 \Gamma \left(\frac{1}{6}\right) J_{\frac{1}{6}}\left(-\frac{x^3}{6 h}\right)\right)}{3\ 2^{2/3} \sqrt[6]{h}},$$ $$n=2:\qquad y(x)=\frac{\sqrt[3]{-1} C_2 h^{2/3} \Gamma \left(\frac{4}{3}\right) \left(-\frac{i x^3}{h}\right)^{2/3}}{x^2}-\frac{\sqrt[3]{-1} C_2 h^{2/3} \left(-\frac{i x^3}{h}\right)^{2/3} \Gamma \left(\frac{1}{3},-\frac{i x^3}{3 h}\right)}{3 x^2}+C_1,$$ $$n=3:\qquad y(x)=\frac{C_1 \Gamma \left(\frac{2}{3}\right) \sqrt[3]{-\frac{i x^3}{h}}}{\sqrt[3]{3}}+\frac{C_1 \sqrt[3]{-\frac{i x^3}{h}} \Gamma \left(-\frac{1}{3},-\frac{i x^3}{3 h}\right)}{3 \sqrt[3]{3}}-\frac{(-1)^{5/6} C_2 x}{\sqrt[3]{3} \sqrt[3]{h}}.$$