Solving a challenging differential equation

How would one go about finding a closed form analytic solution to the following differential equation?

$$\frac{d^2y}{dx^2} +(x^4 +x^2+x+c)y(x) =0 $$

where $c\in\mathbb{R}$


You can have a closed form solution in terms of HeunT (the Heun Triconfluent function)

$$ y( x ) ={C_1}\,{{\rm e}^{\frac{1}{6}\,ix \left( 2\,{x}^{2}+3\right)}}{\it HeunT} \left(-\frac{{3}^{2/3}\sqrt[3]{2} \left(4\,c-1\right)}{8}, \frac{3\,i}{2}, -\frac{{2}^{2/3}\sqrt[3]{3}}{2}, \frac{i\sqrt [3]{2}\,{3}^{2/3}}{3}x \right) +{ C_2} {{\rm e}^{-\frac{1}{6}\,ix \left( 2\,{x}^{2}+3\right)}} {\it HeunT } \left( -\frac{{3}^{2/3}\sqrt[3]{2} \left(4\,c-1\right)}{8} ,-\frac{3\,i}{2}, -\frac{{2}^{2/3}\sqrt[3]{3}}{2}, -\frac{i\sqrt [3]{2}\,{3}^{2/3}}{3}x\right).$$


This is the way I would do it.

Let $p(x)=x^4+x^2+x+c$. Put $z=y'$. Then the equation is equivalent to the system $$ \begin{bmatrix}y\\ z\end{bmatrix}'=\begin{bmatrix}0&1\\-p(x)&0\end{bmatrix}\,\begin{bmatrix}y\\ z\end{bmatrix}. $$ Let us write $A(x)$ for the $2\times 2$ matrix above. For a given vector $\begin{bmatrix}c_1\\ c_2\end{bmatrix}$, a solution will be given by $$ e^{B(x)}\,\begin{bmatrix}c_1\\ c_2\end{bmatrix}, $$ where $B'(x)=A(x)$. That is $B(x)=\begin{bmatrix}0&x\\-q(x)&0\end{bmatrix}$, with $q(x)=x^5/5+x^3/3+x^2/2+cx$. If I didn't make a mistake, the exponential is $$ e^{B(x)}=\begin{bmatrix}\cos\sqrt{xq(x)}&\sqrt\frac{x}{q(x)}\,\sin\sqrt{xq(x)}\\ -\sqrt\frac{q(x)}{x}\,\sin\sqrt{xq(x)}&\cos\sqrt{xq(x)}\end{bmatrix}. $$ As $y$ will be the first coordinate of $e^{B(x)}\begin{bmatrix}c_1\\ c_2\end{bmatrix}$, we get $$ y(x)=c_1\,\cos\sqrt{\frac{x^6}5+\frac{x^4}3+\frac{x^3}2+cx^2}+c_2\,\frac{\sin\sqrt{\frac{x^6}5+\frac{x^4}3+\frac{x^3}2+cx^2}}{\sqrt{\frac{x^5}5+\frac{x^3}3+\frac{x^2}2+cx}}. $$


I am reasonably sure that this equation has no nice solution. If it did, it would be of the form $y(x) = \exp(\int u(x)),$ where $u$ is a rational function.If you want to know more, read this fairly nice summary of Kovacic's algorithm by Carolyn Smith.