1 Introduction

The ordinary second-order linear homogeneous (OSLH) differential equations encountered in physics and applied mathematics problems have the general form [14]

$$ y^{\prime\prime} + b(x)y^{\prime}+ c(x)y = 0 , $$
(1)

where primes denote derivatives with respect to the independent variable x and \(b(x)\) and \(c(x)\) are generally functions of x. Although some analytic solutions are known in closed form for a few specific equations, no general analytic method of solution currently exists. In [4], we found closed-form solutions for the Cauchy-Euler, Riemann-Weber, Chebyshev, and CDOS equations. In these equations, we have identified a common trend that allows us to investigate all OSLH equations analytically: in all four cases, a transformation of the independent variable \(x\to t\) is used in equation (1) that results in a coefficient of the \(y(t)\) term that equals unity, viz.

$$ t = \int{\sqrt{c(x)} \,dx}\quad \Rightarrow\quad \ddot{y} + \widehat{b}(x) \dot{y} + y = 0 , $$
(2)

where dots represent derivatives with respect to t. Then the new differential equation either shows a constant coefficient as well, or another transformation to its canonical form produces a constant coefficient. In either one of these cases, the resulting equation can easily be solved analytically. This method stands in contrast to the general transformation to the canonical form: it transfers the dependence on the variable x to the coefficient of , precisely the term that the canonical transformation strives to eliminate.

In this work, we apply the same methodology to the general form (1) and we obtain a powerful new diagnostic tool (a ‘predictor’) that detects whether analytic solutions exist for any choice of the coefficients \(b(x)\) and \(c(x)\). In the case of constant \(\widehat{b}\equiv B\) in equation (2), the predictor is a first-order nonlinear Bernoulli equation [5, 6] with index \(n=3/2\), viz.

$$ c ^{\prime}+ 2 b c = 2 B c^{3/2} , $$
(3)

which \(b(x)\) and \(c(x)\) must satisfy. In the case of the transformation of equation (2) to its canonical form, the predictor is a complicated second-order equation that we write as a system of two first-order equations.

We derive the predictor equations in Section 2, and we apply the method to some well-known equations of applied mathematics in Section 3. Finally, we summarize and discuss our results in Section 4.

2 Discovery of closed-form solutions

Consider the general form (1) of all OSLH differential equations. The change of independent variable \(t = \int{\sqrt{c(x)} \,dx}\) recasts this equation to the form given in equation (2), where in particular

$$ \widehat{b}(x) \equiv\frac{1}{\sqrt{c}} \biggl( b + \frac{c ^{\prime }}{2c} \biggr) , $$
(4)

where \(c ^{\prime}= dc/dx\). In the specific cases that we investigate below, we are interested in the existence of real solutions of the differential equations in the \(L^{2}(a, b)\) Banach space, although the analysis can be extended to the complex domain as well. Here \((a, b)\) is an interval on the real axis that includes the initial conditions and avoids any singularities. Furthermore, the coefficients \(b(x)\) and \(c(x)\) are assumed to be continuous in \((a, b)\) and at least twice differentiable everywhere in the interval. In what follows, we use capital letters to indicate various constants.

2.1 Case 1: \(\widehat{b}=\mathrm{const.}\equiv B\) in equation (2)

For equal to a constant B, equation (2) has constant coefficients and it can easily be solved analytically [6]. Using \(\widehat{b}=B\) in equation (4), we find the first-order Bernoulli equation (3) that must be satisfied by \(b(x)\) and \(c(x)\). This equation also determines the value of the constant B self-consistently. We solve the Bernoulli equation (3) in Appendix 1, where we obtain generalized forms of the second-order Cauchy-Euler equation [2, 4].

On the other hand, when is not a constant, the predictor does not detect closed-form solutions and then the predictor of Case 2 below must be applied.

2.2 Case 2: the canonical form of equation (2)

If \(\widehat{b}(x)\) is not a constant, we may still try to recast equation (2) to its canonical form [4]

$$ \ddot{u} + \widehat{q}(t) u = 0 , $$
(5)

where \(y(t) = u(t) \exp(-\frac{1}{2}\int{\widehat{b}(x(t)) \,dt})\) and the coefficient

$$ \widehat{q}(t) = 1 - \frac{{\widehat{b}} ^{2}(t)}{4} - \frac{1}{2}\frac{d {\widehat{b}}(t)}{dt} , $$
(6)

recast in terms of x, takes the convenient form

$$ \widehat{q}(x) = 1 - \frac{{\widehat{b}} ^{2}(x)}{4} - \frac{{\widehat{b}} ^{\prime}}{2\sqrt{c(x)}} , $$
(7)

where \({\widehat{b}} ^{\prime}= d\widehat{b}/dx\). In this case, equation (5) can be solved easily if is a constant, say, \({\widehat{q}}=1-Q\). Then equation (7) takes the form

$$ {\widehat{b}} ^{\prime}= 2\sqrt{c} \biggl( Q - \frac{1}{4} { \widehat{b}} ^{2} \biggr) . $$
(8)

In the cases where the first predictor (equation (3)) fails, then equations (4) and (8) describe the second predictor, a system of two first-order equations. Eliminating between these two equations, we find a complicated second-order differential equation that must be satisfied by \(b(x)\) and \(c(x)\), viz.

$$ c c^{\prime\prime} - \frac{5}{4}\bigl({c^{\prime}}\bigr)^{2} + \bigl( 2b^{ \prime}+ b^{2} \bigr) c^{2}= 4 Q c^{3} , $$
(9)

where \({}^{\prime}= d/dx\). Because of the complexity in this equation, it seems to be more convenient using the two first-order equations for verification tests. We have, however, found two families of solutions of equation (9) using a new technique that we describe in Appendix 2.

The second predictor takes an analytically tractable form in the cases where the original equation (1) is already in canonical form (\(b=0\)) and for \(b(x)=2/(x+C)\), where C is an arbitrary constant. Then equation (9) for \(c(x)\) reduces to the compact form

$$ \frac{1}{c^{3/4}} \biggl( \frac{c ^{\prime}}{c^{5/4}} \biggr) ^{\prime }= 4 Q . $$
(10)

When this predictor succeeds, it also determines the value of the constant Q self-consistently. Equation (10) is especially useful in verification tests of many equations of interest that are in canonical form. Some notable examples are described in Section 3 below.

As was described above, for a given OSLH differential equation in canonical form, it is sufficient to test whether its coefficient \(c(x)\) satisfies equation (10). Nevertheless, we may ask whether this equation can be solved analytically, in which case we can obtain the general form of \(c(x)\) for which closed-form solutions are guaranteed to exist. The answer, perhaps surprisingly, is yes. We defer the general study of equation (10) to Appendix 3.

3 Applications of the method

3.1 Cauchy-Euler equation

The Cauchy-Euler equation [2, 4] has \(b(x)=B_{0}/x\) and \(c(x)=C_{0}/x ^{2}\), where \(B_{0}\) and \(C_{0}\) are constants. Substituting these functions into equation (4), we find that

$$ \widehat{b} = (B_{0} - 1) C_{0}^{-1/2} = \mathrm{const.} , $$
(11)

therefore the Cauchy-Euler equation admits analytic, closed-form solutions, as is well known [2, 4].

3.2 Chebyshev equation

The Chebyshev equation [7] has \(b(x)=-x/(1-x^{2})\) and \(c(x)=N^{2}/(1-x ^{2})\), where \(\vert x \vert <1\) and \(N^{2}\) is a constant. Substituting these functions into equation (4), we find that

$$ \widehat{b} = 0 , $$
(12)

therefore the Chebyshev equation admits analytic, closed-form solutions, as is well known [4, 7].

3.3 Bessel equations of order N

The Bessel equation of order N [8] has \(b(x)=1/x\) and \(c(x)=1 - N ^{2}/x^{2}\). Substituting these functions into equation (4), we find that

$$ \widehat{b} = \frac{x^{2}}{(x^{2}-N^{2})^{3/2}} , $$
(13)

not a constant. Then we transform the Bessel equation to its canonical form (equation (23) in [4]), where we find that

$$ \widehat{q}(x) = 1 + \frac{1 - 4N^{2}}{4x^{2}} . $$
(14)

This coefficient shows that, in general, the Bessel equation does not admit closed-form solutions since it does not satisfy equation (10). But in the special cases with orders \(N=\pm1/2\), \(\widehat{q}(x)\) becomes 1 and closed-form solutions do exist, as is well known [3, 8].

The same outcome is also obtained for the modified Bessel equation of order N [8] (equation (28) in [4]) for which the coefficient of its canonical form is

$$ \widehat{q}(x) = -1 + \frac{1 - 4N^{2}}{4x^{2}} , $$
(15)

that is \(1 - 4 N^{2} = 0\) for \(N=\pm1/2\) leading to a constant \(\widehat{q}=-1\) value.

3.4 Equations transformed to the Bessel type

These equations have the form

$$ y^{\prime\prime} + x^{P} y = 0 \quad (P=\mathrm{const.}\neq0, -2) , $$
(16)

and they were studied in [4]. In this case, \(b(x)=0\) and \(c(x)=x^{P}\). Substituting \(c(x)\) into the predictor (10), we find that

$$ -P \biggl( 1 + \frac{1}{4}P \biggr) x^{-(P+2)} = 4 Q , $$
(17)

which is satisfied for \(Q=0\) and \(P=-4\) (the case \(P=0\) is trivial and the case \(P=-2\) is a Cauchy-Euler equation). The analytic solutions found in this case are related to those found above for the \(N=-1/2\) Bessel equation for the following reason: equation (16) can be transformed to a Bessel equation with order \(N=1/(P+2)\) and independent variable \(\xi= 2Nx^{1/(2N)}\) [4], therefore the \(P=-4\) case corresponds to the Bessel case with \(N=-1/2\) and \(\xi= -1/x\).

3.5 CDOS equation

The CDOS equation [4, 9] has \(b(x)=0\) and \(c(x)=C_{0}/(1-x^{2})^{2}\) where \(\vert x \vert <1\) and \(C_{0} > 0\) is a constant. Substituting \(c(x)\) into the predictor (10), we find that

$$ Q = \frac{1}{C_{0}} , $$
(18)

therefore the CDOS equation admits analytic solutions, as was found in [4].

4 Summary and discussion

We have discovered two predictors (expressed by the differential equation (3) and by the combination of equations (4) and (8)) for analytic studies of all OSLH differential equations (Section 2). The latter predictor is also described by equation (9) and it is considerably simplified (see equation (10)) if the given OSLH equation is in canonical form. The first predictor is applied to the general form (1), whereas the second predictor is applied to the canonical form (5) after the first predictor has returned negative results (or to the general form (1) with \(b= 0\) or \(b=2/(x+C)\), where C is a constant). When either predictor is satisfied, the result is positive and the given OSLH equation is guaranteed to admit a transformation to a form with constant coefficients that can easily be solved in closed form.

In Section 3, we have analyzed some differential equations of wide interest in applied mathematics [19] and we confirmed that they possess analytic, closed-form solutions. We believe that this new diagnostic tool will prove very useful in future studies of many more OSLH differential equations of interest to theoretical physicists and applied mathematicians.

We note, however, that this method of analysis cannot detect the existence of one analytic particular solution in the cases where the other linearly independent solution cannot be written also in closed form. An example kindly provided by the reviewers is the set of equations \(y^{\prime\prime} \pm x y^{\prime} \mp y = 0\), which possess the particular solution \(y=x\) and another particular solution that cannot be written in closed form (it contains the error function \(\operatorname{erf}(\sqrt{x^{2}/2})\)). In this case, both predictors determine (correctly) that the general solutions of these equations do not have closed forms, but they do not detect the solution \(y=x\).

Furthermore, the transformation (2) is not appropriate and does not work for equations whose canonical form happens to have a constant coefficient. An example is the equation \(y^{\prime\prime} + 2x y^{\prime} + x^{2} y = 0\) whose canonical form is \(u^{\prime \prime} - u = 0\) with \(y(x) = u(x) \exp(-x^{2}/2)\), and that can be solved easily. For this reason, the transformation of the general equation (1) to its canonical form should always be attempted before the above methodology is applied.