DEtools/Heunsols - Help

DEtools

 Heunsols
 solutions of a Heun type second order linear ODE

 Calling Sequence Heunsols(LODE) Heunsols(LODE,y(x)) Heunsols(coeff_list,x)

Parameters

 LODE - homogeneous linear differential equation of second order y(x) - any indeterminate function of one variable; required only when the ODE involves more than one function being differentiated coeff_list - list of coefficients of the linear ODE x - independent variable of the linear ODE

Description

 • The Heunsols routine returns a basis of the space of solutions of a second order linear ODE of Heun type--that is, an equation of one of the following five forms: the general Heun equation, the Heun Confluent equation, the Biconfluent equation, the Doubleconfluent equation, or the Triconfluent equation.
 > with(DEtools,singularities);
 $\left[{\mathrm{singularities}}\right]$ (1)
 > PDEtools[declare](y(z), prime=z, quiet);
 > GHE := diff(y(z),z,z) + (gamma/z+delta/(z-1)+epsilon/(z-a))*diff(y(z),z) + (alpha*beta*z-q)/z/(z-1)/(z-a)*y(z) = 0;
 ${\mathrm{GHE}}{≔}{\mathrm{y\text{'}\text{'}}}{+}\left(\frac{{\mathrm{\gamma }}}{{z}}{+}\frac{{\mathrm{\delta }}}{{z}{-}{1}}{+}\frac{{\mathrm{\epsilon }}}{{z}{-}{a}}\right){}{\mathrm{y\text{'}}}{+}\frac{\left({\mathrm{\alpha }}{}{\mathrm{\beta }}{}{z}{-}{q}\right){}{y}}{{z}{}\left({z}{-}{1}\right){}\left({z}{-}{a}\right)}{=}{0}$ (2)
 > singularities( GHE );
 ${\mathrm{regular}}{=}\left\{{0}{,}{1}{,}{a}{,}{\mathrm{\infty }}\right\}{,}{\mathrm{irregular}}{=}{\varnothing }$ (3)
 The solution to this equation is implemented in Maple as the HeunG function. The sum of the exponents of the singularities of Heun's equation is equal to two and the parameter $\mathrm{\epsilon }$ is expressed in terms of the other ones by
 > epsilon = alpha+beta+1 -gamma-delta;
 ${\mathrm{\epsilon }}{=}{\mathrm{\alpha }}{+}{\mathrm{\beta }}{+}{1}{-}{\mathrm{\gamma }}{-}{\mathrm{\delta }}$ (4)
 The other four Heun equations are confluent cases, obtained from the general Heun equation above through confluence processes. These are: the Heun Confluent equation
 > CHE := diff(y(z),z,z) + (gamma/z+delta/(z-1)-epsilon)*diff(y(z),z) +((q-alpha*beta)/(z-1)-q/z)*y(z) = 0;
 ${\mathrm{CHE}}{≔}{\mathrm{y\text{'}\text{'}}}{+}\left(\frac{{\mathrm{\gamma }}}{{z}}{+}\frac{{\mathrm{\delta }}}{{z}{-}{1}}{-}{\mathrm{\epsilon }}\right){}{\mathrm{y\text{'}}}{+}\left(\frac{{-}{\mathrm{\alpha }}{}{\mathrm{\beta }}{+}{q}}{{z}{-}{1}}{-}\frac{{q}}{{z}}\right){}{y}{=}{0}$ (5)
 > singularities( CHE );
 ${\mathrm{regular}}{=}\left\{{0}{,}{1}\right\}{,}{\mathrm{irregular}}{=}\left\{{\mathrm{\infty }}\right\}$ (6)
 having for solution the HeunC function; the Biconfluent equation
 > BHE := diff(y(z),z,z) + (-2*z-beta+(1+alpha)/z)*diff(y(z),z) + (gamma-alpha-2 - 1/2*((1+alpha)*beta+delta)/z)*y(z) = 0;
 ${\mathrm{BHE}}{≔}{\mathrm{y\text{'}\text{'}}}{+}\left({-}{2}{}{z}{-}{\mathrm{\beta }}{+}\frac{{1}{+}{\mathrm{\alpha }}}{{z}}\right){}{\mathrm{y\text{'}}}{+}\left({\mathrm{\gamma }}{-}{\mathrm{\alpha }}{-}{2}{-}\frac{\left({1}{+}{\mathrm{\alpha }}\right){}{\mathrm{\beta }}{+}{\mathrm{\delta }}}{{2}{}{z}}\right){}{y}{=}{0}$ (7)
 > singularities( BHE );
 ${\mathrm{regular}}{=}\left\{{0}\right\}{,}{\mathrm{irregular}}{=}\left\{{\mathrm{\infty }}\right\}$ (8)
 having for solution the HeunB function; the Doubleconfluent equation
 > DHE := diff(y(z),z,z)-(alpha+2*z+z^2*alpha-2*z^3)/(z+1)^2/(z-1)^2*diff(y(z),z)+(delta+(2*alpha+gamma)*z+beta*z^2)/(z-1)^3/(z+1)^3*y(z);
 ${\mathrm{DHE}}{≔}{\mathrm{y\text{'}\text{'}}}{-}\frac{\left({\mathrm{\alpha }}{}{{z}}^{{2}}{-}{2}{}{{z}}^{{3}}{+}{\mathrm{\alpha }}{+}{2}{}{z}\right){}{\mathrm{y\text{'}}}}{{\left({z}{+}{1}\right)}^{{2}}{}{\left({z}{-}{1}\right)}^{{2}}}{+}\frac{\left({\mathrm{\delta }}{+}\left({2}{}{\mathrm{\alpha }}{+}{\mathrm{\gamma }}\right){}{z}{+}{\mathrm{\beta }}{}{{z}}^{{2}}\right){}{y}}{{\left({z}{-}{1}\right)}^{{3}}{}{\left({z}{+}{1}\right)}^{{3}}}$ (9)
 > singularities( DHE );
 ${\mathrm{regular}}{=}{\varnothing }{,}{\mathrm{irregular}}{=}\left\{{-1}{,}{1}\right\}$ (10)
 having for solution the HeunD function, and the Triconfluent equation
 > THE := diff(y(z),z,z) + (-gamma-3*z^2)*diff(y(z),z) + (alpha+z*beta-3*z)*y(z) = 0;
 ${\mathrm{THE}}{≔}{\mathrm{y\text{'}\text{'}}}{+}\left({-}{3}{}{{z}}^{{2}}{-}{\mathrm{\gamma }}\right){}{\mathrm{y\text{'}}}{+}\left({\mathrm{\beta }}{}{z}{+}{\mathrm{\alpha }}{-}{3}{}{z}\right){}{y}{=}{0}$ (11)
 > singularities( THE );
 ${\mathrm{regular}}{=}{\varnothing }{,}{\mathrm{irregular}}{=}\left\{{\mathrm{\infty }}\right\}$ (12)
 having for solution the HeunT function.
 The standard form of the four confluent equations is not uniform in the literature. The Maple choice of standard form follows [1], the classic reference for these equations, except for one particular: for the Doubleconfluent equation (DHE above) (and so the definition of HeunD) Maple uses the so-called Jaffe form, see [3], so that the two irregular singular points are symmetrically located at z=-1 and z=1.
 • There are two general forms of calling sequences available for Heunsols.
 The first argument LODE of the first calling sequence is a linear differential equation in diff or $\mathrm{D}$ form. The second argument y(x) is the function in the differential equation, and it is required only when the ODE involves more than one function being differentiated.
 The last calling sequence has as its first argument the list of coefficients of a linear ODE, and the second argument is the independent variable. This input sequence may be convenient for programming with the Heunsols routine.
 • This routine is part of the DEtools package, and so it can be used in the form Heunsols(..) only after executing the command with(DEtools). However, it can always be accessed through the long form of the command by using DEtools[Heunsols](..).

Examples

 > $\mathrm{with}\left(\mathrm{DEtools}\right):$
 > $\mathrm{PDEtools}\left[\mathrm{declare}\right]\left(y\left(x\right),\mathrm{prime}=x\right)$
 ${y}{}\left({x}\right){}{\mathrm{will now be displayed as}}{}{y}$
 ${\mathrm{derivatives with respect to}}{}{x}{}{\mathrm{of functions of one variable will now be displayed with \text{'}}}$ (13)

Kamke's example 2.108:

 > $\mathrm{ode}\left[108\right]≔x\mathrm{diff}\left(y\left(x\right),x,x\right)+\left(x+a+b\right)\mathrm{diff}\left(y\left(x\right),x\right)+ay\left(x\right)$
 ${{\mathrm{ode}}}_{{108}}{≔}{x}{}{\mathrm{y\text{'}\text{'}}}{+}\left({x}{+}{a}{+}{b}\right){}{\mathrm{y\text{'}}}{+}{a}{}{y}$ (14)
 > $B\left[108\right]≔\mathrm{Heunsols}\left(\mathrm{ode}\left[108\right],y\left(x\right)\right)$
 ${{B}}_{{108}}{≔}\left[{\mathrm{HeunC}}{}\left({1}{,}{-}{1}{+}{b}{+}{a}{,}{-1}{,}\frac{{a}}{{2}}{-}\frac{{b}}{{2}}{,}{-}\frac{{a}}{{2}}{+}\frac{{b}}{{2}}{+}\frac{{1}}{{2}}{,}{x}\right){,}{{x}}^{{1}{-}{b}{-}{a}}{}{\mathrm{HeunC}}{}\left({1}{,}{1}{-}{b}{-}{a}{,}{-1}{,}\frac{{a}}{{2}}{-}\frac{{b}}{{2}}{,}{-}\frac{{a}}{{2}}{+}\frac{{b}}{{2}}{+}\frac{{1}}{{2}}{,}{x}\right)\right]$ (15)

A solution to this ODE is built by using this solution basis and tested as follows.

 > $\mathrm{sol}\left[108\right]≔y\left(x\right)=\mathrm{add}\left(\mathrm{_C}‖iB\left[108\right]\left[i\right],i=1..2\right)$
 ${{\mathrm{sol}}}_{{108}}{≔}{y}{=}{\mathrm{_C1}}{}{\mathrm{HeunC}}{}\left({1}{,}{-}{1}{+}{b}{+}{a}{,}{-1}{,}\frac{{a}}{{2}}{-}\frac{{b}}{{2}}{,}{-}\frac{{a}}{{2}}{+}\frac{{b}}{{2}}{+}\frac{{1}}{{2}}{,}{x}\right){+}{\mathrm{_C2}}{}{{x}}^{{1}{-}{b}{-}{a}}{}{\mathrm{HeunC}}{}\left({1}{,}{1}{-}{b}{-}{a}{,}{-1}{,}\frac{{a}}{{2}}{-}\frac{{b}}{{2}}{,}{-}\frac{{a}}{{2}}{+}\frac{{b}}{{2}}{+}\frac{{1}}{{2}}{,}{x}\right)$ (16)

The following test returns zero when sol is correct.

 > $\mathrm{odetest}\left(\mathrm{sol}\left[108\right],\mathrm{ode}\left[108\right]\right)$
 ${0}$ (17)
 > $\mathrm{diff}\left(y\left(x\right),x,x\right)=\frac{-a+bx+2{x}^{2}-1}{x}\mathrm{diff}\left(y\left(x\right),x\right)+\frac{\frac{1}{4}\left(\left(6+4a\right)x+2ba+3+2b\right)}{x}y\left(x\right)$
 ${\mathrm{y\text{'}\text{'}}}{=}\frac{\left({x}{}{b}{+}{2}{}{{x}}^{{2}}{-}{a}{-}{1}\right){}{\mathrm{y\text{'}}}}{{x}}{+}\frac{\left(\left({6}{+}{4}{}{a}\right){}{x}{+}{2}{}{a}{}{b}{+}{3}{+}{2}{}{b}\right){}{y}}{{4}{}{x}}$ (18)
 > $\mathrm{Heunsols}\left(,y\left(x\right)\right)$
 $\left[{\mathrm{HeunB}}{}\left({a}{,}{b}{,}\frac{{1}}{{2}}{,}\frac{{3}}{{2}}{,}{x}\right){,}{\mathrm{HeunB}}{}\left({-}{a}{,}{b}{,}\frac{{1}}{{2}}{,}\frac{{3}}{{2}}{,}{x}\right){}{{x}}^{{-}{a}}\right]$ (19)
 > $\mathrm{diff}\left(y\left(x\right),x,x\right)=\left(\frac{3}{2}+3{x}^{2}\right)\mathrm{diff}\left(y\left(x\right),x\right)+\left(-a+\frac{5}{2}x\right)y\left(x\right)$
 ${\mathrm{y\text{'}\text{'}}}{=}\left(\frac{{3}}{{2}}{+}{3}{}{{x}}^{{2}}\right){}{\mathrm{y\text{'}}}{+}\left({-}{a}{+}\frac{{5}{}{x}}{{2}}\right){}{y}$ (20)
 > $\mathrm{Heunsols}\left(,y\left(x\right)\right)$
 $\left[{\mathrm{HeunT}}{}\left({a}{,}\frac{{1}}{{2}}{,}\frac{{3}}{{2}}{,}{x}\right){,}{\mathrm{HeunT}}{}\left({a}{,}{-}\frac{{1}}{{2}}{,}\frac{{3}}{{2}}{,}{-}{x}\right){}{{ⅇ}}^{\frac{{x}{}\left({2}{}{{x}}^{{2}}{+}{3}\right)}{{2}}}\right]$ (21)

This is Lame's equation in algebraic form

 > $\mathrm{diff}\left(y\left(x\right),\mathrm{}\left(x,2\right)\right)+\frac{1}{2}\left(\frac{1}{x}+\frac{1}{x-1}+\frac{1}{x-a}\right)\mathrm{diff}\left(y\left(x\right),x\right)+\frac{\frac{1}{4}\left(ah-\mathrm{\nu }\left(\mathrm{\nu }+1\right)x\right)}{x\left(x-1\right)\left(x-a\right)}y\left(x\right)=0$
 ${\mathrm{y\text{'}\text{'}}}{+}\frac{\left(\frac{{1}}{{x}}{+}\frac{{1}}{{x}{-}{1}}{+}\frac{{1}}{{x}{-}{a}}\right){}{\mathrm{y\text{'}}}}{{2}}{+}\frac{\left({a}{}{h}{-}{\mathrm{\nu }}{}\left({\mathrm{\nu }}{+}{1}\right){}{x}\right){}{y}}{{4}{}{x}{}\left({x}{-}{1}\right){}\left({x}{-}{a}\right)}{=}{0}$ (22)
 > $\mathrm{Heunsols}\left(,y\left(x\right)\right)$
 $\left[{\mathrm{HeunG}}{}\left({a}{,}{-}\frac{{a}{}{h}}{{4}}{,}{-}\frac{{\mathrm{\nu }}}{{2}}{,}\frac{{\mathrm{\nu }}}{{2}}{+}\frac{{1}}{{2}}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{2}}{,}{x}\right){,}\sqrt{{x}}{}{\mathrm{HeunG}}{}\left({a}{,}{-}\frac{{1}}{{4}}{}{a}{}{h}{+}\frac{{1}}{{4}}{}{a}{+}\frac{{1}}{{4}}{,}{1}{+}\frac{{\mathrm{\nu }}}{{2}}{,}\frac{{1}}{{2}}{-}\frac{{\mathrm{\nu }}}{{2}}{,}\frac{{3}}{{2}}{,}\frac{{1}}{{2}}{,}{x}\right)\right]$ (23)