Consider the following Sturm-Liouville problem : $$ y'' + A(x) y = 0 \text{ on } [0, 2\pi] $$ where $A$ is a non-constant continuous function on $[0, 2\pi]$.
Are there analytical solutions to this problem ?
Consider the following Sturm-Liouville problem : $$ y'' + A(x) y = 0 \text{ on } [0, 2\pi] $$ where $A$ is a non-constant continuous function on $[0, 2\pi]$.
Are there analytical solutions to this problem ?
In general this does not have closed-form solutions (except the trivial solution $0$). One simple example where (as far as I am aware) no closed-form solution is known is $A(x) = x^3 - 1$.
Consider the general second order linear homogeneous ODE : $$\frac{d^2Y}{dx^2}+g(x)\frac{dY}{dx}+h(x)Y(x)=0 \tag 1$$ The change of function $$Y(x)=\exp\left(-\frac12\int g(x)dx \right)y(x)$$ transforms Eq.$(1)$ into Eq.$(2)$ $$\frac{d^2y}{dx^2}+A(x)y(x)=0 \tag 2$$ in which $\quad A(x)=h(x)-\frac14 g(x)^2-\frac12\frac{dg}{dx}$
Now in response to your question :
Insofar "analytically solving" means getting closed form of solutions, not infinite series.
Suppose that a genius be able to "analytically solve" any equation on the form $\quad y''+A(x)y(x)=0\quad$ this means that he could solve any equation on the form $(1)$. Certainly he would earn a Fields medal.
This means that your question is much too wide. A general method for "analytically solving" Eq.$(2)$ isn't known as well as Eq.$(1)$. One knows how to "analytically solve" only a few kind of equations on the form $(2)$ as well as Eq.$(1)$. This is possible if some special functions have been defined and standardized.
For example in the particular cases of polynomial $A(x)$ :
First degree polynomial : $\quad\frac{d^2y}{dx^2}-(x-a)y(x)=0$ $$y(x)=c_1\text{Ai}(x-a)+c_2\text{Bi}(x-a)$$ Ai and Bi are the Airy functions.
Second degree polynomial : $\quad\frac{d^2y}{dx^2}-(x-a)(x-b)y(x)=0$ $$y(x)=c_1\text{D}_{\frac{(a-b)^2-4}{8}}\left(\frac{2x-a-b}{\sqrt{2}} \right)+c_2\text{D}_{\frac{-(a-b)^2-4}{8}}\left(-\frac{2x-a-b}{\sqrt{2}} \right)$$ D$_\nu(z)$ is the parabolic cylinder function.
Third degree polynomial : $\quad\frac{d^2y}{dx^2}-(x-a)(x-b)(x-c)y(x)=0$
No closed form solution for any $a,b,c$. There is no convenient special function avalable.
But they are closed form solutions in case of particular values of $a,b,c$. For example if $a=b=c=0$ the solution is $\quad y(x)=c_1\sqrt{x}\text{ I}_{1/5}(\frac25 x^{5/2})+c_2\sqrt{x}\text{ I}_{1/5}(\frac25 x^{5/2})\quad$ with the modified Bessel function.
Fourth degree polynomial : Again no closed form solution in case of general fourth degree polynomial. But they are closed form solutions in case of some particular fourth degree polynomials.
Let us focus on the case when $A(x)$ is a "polynomial" meaning a linear combination of powers of $x$. Then the following cases (not listed above) are worth mentioning: \begin{eqnarray} \text{If} \quad A(x) &=& \frac{\frac{1}{4}-a^2 n^2}{x^2}+B^2 n^2 x^{2 n-2} \quad \text{then} \quad y(x) =\sqrt{x}\left( C_1 J_a[B x^n] + C_2 Y_a[B x^n] \right) \\ \text{If} \quad A(x) &=& \frac{1}{2} B n^2 (b-2 a) x^{n-2}+\frac{1-(b-1)^2 n^2}{4 x^2}-\frac{1}{4} B^2 n^2 x^{2 n-2} \quad \text{then} \quad y(x) = x^{\frac{1}{2} (b n-n+1)} e^{-\frac{B x^n}{2}} \left( C_1 F_{1,1}[a,b;B x^n] + C_2 U[a,b;B x^n] \right) \\ \text{If} \quad A(x) &=& -\frac{1}{4} B^2 n^2 x^{2 n-2}+B k n^2 x^{n-2}+\frac{\frac{1}{4}-\mu ^2 n^2}{x^2} \quad \text{then} \quad y(x) = x^{\frac{1-n}{2}} v(B x^n) \quad \text{where $v(x)$ satisfies the Whittaker equation} \\ \hline \\ \text{If} \quad A(x) &=& -\frac{1}{2} B n^2 (g-2 a) x^{n-2}-\frac{d^2 n^2 x^{-2 n-2}}{4 B^2}-\frac{1}{4} B^2 n^2 x^{2 n-2}-\frac{d (g-2) n^2 x^{-n-2}}{2 B}+\frac{1-n^2 \left(2 d+(g-1)^2+4 q\right)}{4 x^2} \quad \text{then} \quad y(x) = x^{\frac{1}{2} ((g-1) n+1)} e^{\frac{B^2 x^n-d x^{-n}}{2 B}} v(B x^n) \quad \text{where $v(x)$ satisfies the doubly-confluent Heun equation} \\ \text{If} \quad A(x) &=& \frac{1}{4} B^2 n^2 x^{2 n-2} \left(4 a-d^2-2 g+2\right)-\frac{1}{4} B^4 n^2 x^{4 n-2}-\frac{1}{2} B^3 d n^2 x^{3 n-2}-\frac{1}{2} B n^2 x^{n-2} (d g+2 q)+\frac{1-(g+1)^2 n^2}{4 x^2} \quad \text{then} \quad y(x) = x^{\frac{1}{2} (-g n-n+1)} e^{-\frac{1}{4} B x^n \left(B x^n+2 d\right)} v(B x^n) \quad \text{where $v(x)$ satisfies the bi-confluent Heun equation}\\ \text{If} \quad A(x) &=& (a-1) B^3 n^2 x^{3 n-2}-\frac{1}{4} B^6 n^2 x^{6 n-2}-\frac{1}{2} B^5 g n^2 x^{5 n-2}-\frac{1}{4} B^4 g^2 n^2 x^{4 n-2}-\frac{1}{2} B^2 n^2 (g+2 q) x^{2 n-2}+\frac{1-n^2}{4 x^2} \quad \text{then} \quad y(x) = x^{\frac{1-n}{2}} e^{\frac{1}{12} B^2 x^{2 n} \left(2 B x^n+3 g\right)} v(B x^n) \quad \text{where $v(x)$ satisfies the triconfluent Heun equation} \end{eqnarray}
I have generated the examples above by going to the respective ODE and then changing the abscissa as $x \rightarrow B x^n$ followed by a change in the ordinate so that the coefficient at the first derivative is anihilated.
The proofs are given in the following Mathematica code snippet:
In[2263]:= (*Polynomial case.*)
n =.; Clear[f]; Clear[y]; Clear[v]; a =.; b =.; c =.; B =.; g =.; d \
=.; q =.; x =.; k =.; mu =.;
FullSimplify[(((1/4 - a^2 n^2)/x^2 + B^2 n^2 x^(-2 + 2 n)) # +
D[#, {x, 2}]) &@{Sqrt[x] BesselJ[a, B x^n],
Sqrt[x] BesselY[a, B x^n]}]
FullSimplify[(((1 - (-1 + b)^2 n^2)/(4 x^2) +
1/2 B (-2 a + b) n^2 x^(-2 + n) -
1/4 B^2 n^2 x^(-2 + 2 n)) # + D[#, {x, 2}]) &@{E^(-((B x^n)/
2)) x^(-(1/2) (-1 + n - b n)) Hypergeometric1F1[a, b, B x^n],
E^(-((B x^n)/2)) x^(-(1/2) (-1 + n - b n))
HypergeometricU[a, b, B x^n]}]
FullSimplify[(((1/4 - mu^2 n^2)/x^2 + B k n^2 x^(-2 + n) -
1/4 B^2 n^2 x^(-2 + 2 n)) # +
D[#, {x, 2}]) &@{x^(-(1/2) (-1 + n)) v[B x^n]} /.
Derivative[2][v][x_] :> -(-1/4 + k/x + (1/4 - mu^2)/x^2) v[x]]
FullSimplify[(((1 - n^2 (2 d + (-1 + g)^2 + 4 q))/(4 x^2) - (
d^2 n^2 x^(-2 - 2 n))/(4 B^2) - (d (-2 + g) n^2 x^(-2 - n))/(
2 B) - 1/2 B (-2 a + g) n^2 x^(-2 + n) -
1/4 B^2 n^2 x^(-2 + 2 n)) # + D[#, {x, 2}]) &@{x^(
1/2 (1 + (-1 + g) n)) E^((-d x^-n + B^2 x^n)/(2 B)) v[B x^n]} /.
Derivative[2][v][
x_] :> -(1 + g/x + d/x^2) v'[x] - (a x - q)/x^2 v[x] ]
FullSimplify[(((1 - (1 + g)^2 n^2)/(4 x^2) -
1/2 B n^2 (d g + 2 q) x^(-2 + n) +
1/4 B^2 (2 + 4 a - d^2 - 2 g) n^2 x^(-2 + 2 n) -
1/2 B^3 d n^2 x^(-2 + 3 n) - 1/4 B^4 n^2 x^(-2 + 4 n)) # +
D[#, {x, 2}]) &@{x^(-(1/2) (-1 + n + g n))
E^(-(1/4) B x^n (2 d + B x^n)) v[B x^n]} /.
Derivative[2][v][x_] :> (g/x + d + x) v'[x] - (a x - q)/x v[x] ]
FullSimplify[(((1 - n^2)/(4 x^2) -
1/2 B^2 n^2 (g + 2 q) x^(-2 +
2 n) + (-1 + a) B^3 n^2 x^(-2 + 3 n) -
1/4 B^4 g^2 n^2 x^(-2 + 4 n) - 1/2 B^5 g n^2 x^(-2 + 5 n) -
1/4 B^6 n^2 x^(-2 + 6 n)) # +
D[#, {x, 2}]) &@{x^(-(1/2) (-1 + n)) E^(
1/12 B^2 x^(2 n) (3 g + 2 B x^n)) v[B x^n]} /.
Derivative[2][v][x_] :> - (g + x) x v'[x] - (a x - q) v[x] ]
Out[2264]= {0, 0}
Out[2265]= {0, 0}
Out[2266]= {0}
Out[2267]= {0}
Out[2268]= {0}
Out[2269]= {0}
Those examples clearly do not exhaust the problem. One can also construct exact solutions to 2nd order ODEs using more sophisticated methods like a symmetric product or a gauge transformation Gauge transformation of differential equations. .