 HeunC - Maple Help

HeunC

The Heun Confluent function

HeunCPrime

The derivative of the Heun Confluent function Calling Sequence HeunC($\mathrm{\alpha }$, $\mathrm{\beta }$, $\mathrm{\gamma }$, $\mathrm{\delta }$, $\mathrm{\eta }$, z) HeunCPrime($\mathrm{\alpha }$, $\mathrm{\beta }$, $\mathrm{\gamma }$, $\mathrm{\delta }$, $\mathrm{\eta }$, z) Parameters

 $\mathrm{\alpha }$ - algebraic expression $\mathrm{\beta }$ - algebraic expression $\mathrm{\gamma }$ - algebraic expression $\mathrm{\delta }$ - algebraic expression $\mathrm{\eta }$ - algebraic expression z - algebraic expression Description

 • The HeunC function is the solution of the Heun Confluent equation. Following the first reference (at the end), the equation and the conditions at the origin satisfied by HeunC are
 ${\mathrm{HeunC}}{}\left({\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\gamma }}{,}{\mathrm{\delta }}{,}{\mathrm{\eta }}{,}{z}\right){=}{\mathrm{DESol}}{}\left(\left\{\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{z}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{_Y}}{}\left({z}\right){-}\frac{\left({-}{{z}}^{{2}}{}{\mathrm{\alpha }}{+}\left({-}{\mathrm{\beta }}{+}{\mathrm{\alpha }}{-}{\mathrm{\gamma }}{-}{2}\right){}{z}{+}{\mathrm{\beta }}{+}{1}\right){}\left(\frac{{ⅆ}}{{ⅆ}{z}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{_Y}}{}\left({z}\right)\right)}{{z}{}\left({z}{-}{1}\right)}{-}\frac{\left(\left(\left({-}{\mathrm{\beta }}{-}{\mathrm{\gamma }}{-}{2}\right){}{\mathrm{\alpha }}{-}{2}{}{\mathrm{\delta }}\right){}{z}{+}\left({\mathrm{\beta }}{+}{1}\right){}{\mathrm{\alpha }}{+}\left({-}{\mathrm{\gamma }}{-}{1}\right){}{\mathrm{\beta }}{-}{2}{}{\mathrm{\eta }}{-}{\mathrm{\gamma }}\right){}{\mathrm{_Y}}{}\left({z}\right)}{{2}{}{z}{}\left({z}{-}{1}\right)}\right\}{,}\left\{{\mathrm{_Y}}{}\left({z}\right)\right\}{,}\left\{{\mathrm{_Y}}{}\left({0}\right){=}{1}{,}{\mathrm{D}}{}\left({\mathrm{_Y}}\right){}\left({0}\right){=}\frac{\left({-}{\mathrm{\alpha }}{+}{1}{+}{\mathrm{\gamma }}\right){}{\mathrm{\beta }}{+}{\mathrm{\gamma }}{-}{\mathrm{\alpha }}{+}{2}{}{\mathrm{\eta }}}{{2}{}\left({\mathrm{\beta }}{+}{1}\right)}\right\}\right)$ (1)
 • This Heun (singly) Confluent equation is obtained from the Heun General equation through a confluence process, that is, a process where two singularities coalesce, performed by redefining parameters and taking limits, resulting in a single (typically irregular) singularity. The Heun Confluent equation thus has two regular singularities and one irregular singularity, and includes as particular cases both the 2F1 and 1F1 hypergeometric equations. The solution to the 2F1 equation,
 > DEtools[hyperode]( hypergeom([a,b],[c],z), y(z) ) = 0;
 ${y}{}\left({z}\right){}{a}{}{b}{+}\left(\left({a}{+}{b}{+}{1}\right){}{z}{-}{c}\right){}\left(\frac{{ⅆ}}{{ⅆ}{z}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({z}\right)\right){+}\left({{z}}^{{2}}{-}{z}\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{z}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({z}\right)\right){=}{0}$ (2)
 can then be expressed in terms of HeunC functions
 > dsolve((2), [HeunC]);
 ${y}{}\left({z}\right){=}{\mathrm{_C1}}{}{\mathrm{HeunC}}{}\left({0}{,}{a}{-}{b}{,}{c}{-}{1}{,}{0}{,}\frac{\left({-}{2}{}{a}{+}{c}\right){}{b}}{{2}}{+}\frac{{a}{}{c}}{{2}}{-}\frac{{c}}{{2}}{+}\frac{{1}}{{2}}{,}{-}\frac{{1}}{{z}{-}{1}}\right){}{\left({z}{-}{1}\right)}^{{-}{a}}{+}{\mathrm{_C2}}{}{\mathrm{HeunC}}{}\left({0}{,}{-}{a}{+}{b}{,}{c}{-}{1}{,}{0}{,}\frac{\left({-}{2}{}{a}{+}{c}\right){}{b}}{{2}}{+}\frac{{a}{}{c}}{{2}}{-}\frac{{c}}{{2}}{+}\frac{{1}}{{2}}{,}{-}\frac{{1}}{{z}{-}{1}}\right){}{\left({z}{-}{1}\right)}^{{-}{b}}$ (3)
 and the same for the 1F1 hypergeometric confluent equation
 > DEtools[hyperode]( hypergeom([a],[c],z), y(z) ) = 0;
 ${a}{}{y}{}\left({z}\right){+}\left({-}{c}{+}{z}\right){}\left(\frac{{ⅆ}}{{ⅆ}{z}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({z}\right)\right){-}{z}{}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{z}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({z}\right)\right){=}{0}$ (4)
 > dsolve((4), [HeunC]);
 ${y}{}\left({z}\right){=}{\mathrm{_C1}}{}{{ⅇ}}^{{z}}{}{\mathrm{HeunC}}{}\left({1}{,}{c}{-}{1}{,}{-1}{,}{-}{a}{+}\frac{{c}}{{2}}{,}{-}\frac{{c}}{{2}}{+}{a}{+}\frac{{1}}{{2}}{,}{z}\right){+}{\mathrm{_C2}}{}{{ⅇ}}^{{z}}{}{{z}}^{{-}{c}{+}{1}}{}{\mathrm{HeunC}}{}\left({1}{,}{-}{c}{+}{1}{,}{-1}{,}{-}{a}{+}\frac{{c}}{{2}}{,}{-}\frac{{c}}{{2}}{+}{a}{+}\frac{{1}}{{2}}{,}{z}\right)$ (5)
 HeunC, thus, contains as particular cases all the hypergeometric functions of the 2F1 and 1F1 classes - some of these specializations are listed at the end of the Examples section.
 • Two other important non-hypergeometric case of Heun's Confluent equation, are the "spheroidal wave function" equation
 > diff(y(z),z,z) + 2*(gamma+1)*z*diff(y(z),z)/(z^2-1) + (4*delta*z^2-c)/(z^2-1)*y(z) = 0;
 $\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{z}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({z}\right){+}\frac{{2}{}\left({\mathrm{\gamma }}{+}{1}\right){}{z}{}\left(\frac{{ⅆ}}{{ⅆ}{z}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({z}\right)\right)}{{{z}}^{{2}}{-}{1}}{+}\frac{\left({4}{}{\mathrm{\delta }}{}{{z}}^{{2}}{-}{c}\right){}{y}{}\left({z}\right)}{{{z}}^{{2}}{-}{1}}{=}{0}$ (6)
 obtained from Heun's Confluent equation taking $\left\{\mathrm{\alpha }=0,\mathrm{\beta }=-\frac{1}{2},\mathrm{\eta }=\frac{\left(1-\mathrm{\gamma }-c\right)}{4}\right\}$ and changing $z$ -> ${z}^{2}$;
 and the rational form of Mathieu's equation,
 > diff(y(z),z,z) + z/(z^2-1)*diff(y(z),z) + (2*delta*(2*z^2-1)-a)/(z^2-1)*y(z) = 0;
 $\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{z}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({z}\right){+}\frac{{z}{}\left(\frac{{ⅆ}}{{ⅆ}{z}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({z}\right)\right)}{{{z}}^{{2}}{-}{1}}{+}\frac{\left({2}{}{\mathrm{\delta }}{}\left({2}{}{{z}}^{{2}}{-}{1}\right){-}{a}\right){}{y}{}\left({z}\right)}{{{z}}^{{2}}{-}{1}}{=}{0}$ (7)
 obtained from the spheroidal wave function equation above by taking $c=a+2\mathrm{\delta }$ and further specializing $\mathrm{\gamma }=-\frac{1}{2}$.
 • The HeunC($\mathrm{\alpha }$,$\mathrm{\beta }$,$\mathrm{\gamma }$,$\mathrm{\delta }$,$\mathrm{\eta }$, z) function is a local (Frobenius) solution to Heun's Confluent equation, computed as a power series expansion around the origin, a regular singular point. The series converges for $\left|z\right|<1$, where the second regular singularity is located. An analytic continuation of HeunC is obtained through identities, relating the values of the function in different regions of the $z$ plane, for given values of the other parameters, or by expanding the solution around 1, the other regular singularity, and overlapping the series. General formulas relating these series expansions at different singularities and for arbitrary values of the other parameters, however, are not known at present.
 • A special case happens when the parameters entering HeunC are such that the function is, simultaneously, a Frobenius solution around the two regular singularities and hence analytic in a domain containing both of them. In such a case the series expansion for HeunC truncates and the function becomes a polynomial. A necessary (not sufficient) condition for this case is that $\mathrm{\delta }=-\left(n+\frac{\left(\mathrm{\gamma }+\mathrm{\beta }+2\right)}{2}\right)\mathrm{\alpha }$, with $n$ a positive integer, and $\mathrm{\eta }$ has one of a finite number of characteristic values, so that the function is a polynomial of degree $n$. Examples

Heun's Confluent equation,

 > $\mathrm{CHE}≔\mathrm{diff}\left(y\left(z\right),z,z\right)=\frac{-{z}^{2}\mathrm{\alpha }+\left(-2-\mathrm{\beta }-\mathrm{\gamma }+\mathrm{\alpha }\right)z+1+\mathrm{\beta }}{z\left(z-1\right)}\mathrm{diff}\left(y\left(z\right),z\right)+\frac{\frac{1}{2}\left(\left(\left(-\mathrm{\beta }-\mathrm{\gamma }-2\right)\mathrm{\alpha }-2\mathrm{\delta }\right)z+\left(\mathrm{\beta }+1\right)\mathrm{\alpha }+\left(-\mathrm{\gamma }-1\right)\mathrm{\beta }-\mathrm{\gamma }-2\mathrm{\eta }\right)}{z\left(z-1\right)}y\left(z\right)$
 ${\mathrm{CHE}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{z}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({z}\right){=}\frac{\left({-}{{z}}^{{2}}{}{\mathrm{\alpha }}{+}\left({-}{2}{-}{\mathrm{\beta }}{-}{\mathrm{\gamma }}{+}{\mathrm{\alpha }}\right){}{z}{+}{1}{+}{\mathrm{\beta }}\right){}\left(\frac{{ⅆ}}{{ⅆ}{z}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({z}\right)\right)}{{z}{}\left({z}{-}{1}\right)}{+}\frac{\left(\left(\left({-}{\mathrm{\beta }}{-}{\mathrm{\gamma }}{-}{2}\right){}{\mathrm{\alpha }}{-}{2}{}{\mathrm{\delta }}\right){}{z}{+}\left({\mathrm{\beta }}{+}{1}\right){}{\mathrm{\alpha }}{+}\left({-}{\mathrm{\gamma }}{-}{1}\right){}{\mathrm{\beta }}{-}{\mathrm{\gamma }}{-}{2}{}{\mathrm{\eta }}\right){}{y}{}\left({z}\right)}{{2}{}{z}{}\left({z}{-}{1}\right)}$ (8)

can be transformed into another version of itself, that is, an equation with two regular singularities and one irregular singularity respectively located at $\left\{0,1,\mathrm{\infty }\right\}$, through transformations of the form

 > $y\left(z\right)={z}^{\frac{\left(\mathrm{\mu }-1\right)\mathrm{\beta }}{2}}{\left(z-1\right)}^{\frac{\left(\mathrm{\nu }-1\right)\mathrm{\gamma }}{2}}\mathrm{exp}\left(\frac{\left(\mathrm{\rho }-1\right)\mathrm{\alpha }z}{2}\right)u\left(z\right)$
 ${y}{}\left({z}\right){=}{{z}}^{\frac{\left({\mathrm{\mu }}{-}{1}\right){}{\mathrm{\beta }}}{{2}}}{}{\left({z}{-}{1}\right)}^{\frac{\left({\mathrm{\nu }}{-}{1}\right){}{\mathrm{\gamma }}}{{2}}}{}{{ⅇ}}^{\frac{\left({\mathrm{\rho }}{-}{1}\right){}{\mathrm{\alpha }}{}{z}}{{2}}}{}{u}{}\left({z}\right)$ (9)

where ${\mathrm{\lambda }}^{2}=1$, ${\mathrm{\mu }}^{2}=1$ and ${\mathrm{\nu }}^{2}=1$. Under this transformation, the HeunC parameters transform according to $\mathrm{\alpha }$ -> $\mathrm{\alpha }\mathrm{\lambda }$, $\mathrm{\beta }$ -> $\mathrm{\beta }\mathrm{\mu }$ and $\mathrm{\gamma }$ -> $\mathrm{\gamma }\mathrm{\nu }$. These transformations form a group of eight elements and imply on a number of identities, among which you have

 > $\mathrm{FunctionAdvisor}\left(\mathrm{identities},\mathrm{HeunC}\right)$
 $\left[\left[{\mathrm{HeunC}}{}\left({\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\gamma }}{,}{\mathrm{\delta }}{,}{\mathrm{\eta }}{,}{z}\right){=}{\left({1}{-}{z}\right)}^{{-}{\mathrm{\gamma }}}{}{\mathrm{HeunC}}{}\left({\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{-}{\mathrm{\gamma }}{,}{\mathrm{\delta }}{,}{\mathrm{\eta }}{,}{z}\right){,}{\mathrm{\beta }}{::}\left({¬}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{'}{\mathrm{integer}}{'}\right]\right)\right){\wedge }\left|{z}\right|{<}{1}\right]{,}\left[{\mathrm{HeunC}}{}\left({\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\gamma }}{,}{\mathrm{\delta }}{,}{\mathrm{\eta }}{,}{z}\right){=}{{ⅇ}}^{{-}{z}{}{\mathrm{\alpha }}}{}{\mathrm{HeunC}}{}\left({-}{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\gamma }}{,}{\mathrm{\delta }}{,}{\mathrm{\eta }}{,}{z}\right){,}{\mathrm{\beta }}{::}\left({¬}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{'}{\mathrm{integer}}{'}\right]\right)\right){\wedge }\left|{z}\right|{<}{1}\right]\right]$ (10)

Changing $z$ -> $1-t$ also results in a HeunC equation with the singularities located at $\left\{0,1,\mathrm{\infty }\right\}$; this permits rewriting the solution to the CHE in different manners. For example, the general solution returned by default by dsolve is

 > $\mathrm{dsolve}\left(\mathrm{CHE}\right)$
 ${y}{}\left({z}\right){=}{\mathrm{_C1}}{}{\mathrm{HeunC}}{}\left({\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\gamma }}{,}{\mathrm{\delta }}{,}{\mathrm{\eta }}{,}{z}\right){+}{\mathrm{_C2}}{}{{z}}^{{-}{\mathrm{\beta }}}{}{\mathrm{HeunC}}{}\left({\mathrm{\alpha }}{,}{-}{\mathrm{\beta }}{,}{\mathrm{\gamma }}{,}{\mathrm{\delta }}{,}{\mathrm{\eta }}{,}{z}\right)$ (11)

When $\mathrm{\beta }$ is an integer, however, these two "independent" solutions are not independent, yet a second pair of independent solutions can be constructed exploring this invariance in form under $z$ -> $1-t$

 > $\mathrm{dsolve}\left(\mathrm{CHE}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{assuming}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{\beta }::'\mathrm{integer}'$
 ${y}{}\left({z}\right){=}{\mathrm{_C1}}{}{\mathrm{HeunC}}{}\left({-}{\mathrm{\alpha }}{,}{\mathrm{\gamma }}{,}{\mathrm{\beta }}{,}{-}{\mathrm{\delta }}{,}{\mathrm{\eta }}{+}{\mathrm{\delta }}{,}{1}{-}{z}\right){+}{\mathrm{_C2}}{}{\left({z}{-}{1}\right)}^{{-}{\mathrm{\gamma }}}{}{\mathrm{HeunC}}{}\left({-}{\mathrm{\alpha }}{,}{-}{\mathrm{\gamma }}{,}{\mathrm{\beta }}{,}{-}{\mathrm{\delta }}{,}{\mathrm{\eta }}{+}{\mathrm{\delta }}{,}{1}{-}{z}\right)$ (12)

For $z$ different from 1, the 2F1 and the confluent 1F1 hypergeometric functions are related to HeunC by

 > $\mathrm{FunctionAdvisor}\left(\mathrm{specialize},\mathrm{hypergeom},\mathrm{HeunC}\right)$
 $\left[{\mathrm{hypergeom}}{}\left(\left[{a}{,}{b}\right]{,}\left[{c}\right]{,}{z}\right){=}\frac{{\mathrm{HeunC}}{}\left({0}{,}{c}{-}{1}{,}{b}{-}{a}{,}{0}{,}\frac{\left({a}{+}{b}{-}{1}\right){}{c}}{{2}}{-}{b}{}{a}{+}\frac{{1}}{{2}}{,}\frac{{z}}{{z}{-}{1}}\right)}{{\left({1}{-}{z}\right)}^{{b}}}{,}{z}{\ne }{1}\right]{,}\left[{\mathrm{hypergeom}}{}\left(\left[{a}\right]{,}\left[{b}\right]{,}{z}\right){=}{\mathrm{HeunC}}{}\left({1}{,}{b}{-}{1}{,}{1}{,}{-}\frac{{b}}{{2}}{+}{a}{,}\frac{{b}}{{2}}{-}{a}{+}\frac{{1}}{{2}}{,}{-}{z}\right){}\left({z}{+}{1}\right){,}{z}{\ne }{-1}\right]$ (13)

When $\mathrm{\delta }=-\left(n+\frac{\left(\mathrm{\gamma }+\mathrm{\beta }+2\right)}{2}\right)\mathrm{\alpha }$, with $n$ a positive integer, the $n$th + 1 coefficient in the series expansion is a polynomial in $\mathrm{\eta }$ of order $n+1$. If $\mathrm{\delta }$ is a root of that polynomial, that coefficient is zero and with it all the following ones; the series then truncates and HeunC is a polynomial. For example, the necessary condition for a polynomial form is

 > $\mathrm{HeunC}\left(\mathrm{\alpha },\mathrm{\beta },\mathrm{\gamma },-\mathrm{\alpha }\left(n+\frac{\mathrm{\gamma }+2+\mathrm{\beta }}{2}\right),\mathrm{\eta },z\right)$
 ${\mathrm{HeunC}}{}\left({\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\gamma }}{,}{-}{\mathrm{\alpha }}{}\left({n}{+}\frac{{\mathrm{\gamma }}}{{2}}{+}\frac{{\mathrm{\beta }}}{{2}}{+}{1}\right){,}{\mathrm{\eta }}{,}{z}\right)$ (14)

Considering the first non-trivial case, for $n=1$, the function is

 > $\mathrm{HC}≔\mathrm{subs}\left(n=1,\right)$
 ${\mathrm{HC}}{≔}{\mathrm{HeunC}}{}\left({\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\gamma }}{,}{-}{\mathrm{\alpha }}{}\left({2}{+}\frac{{\mathrm{\gamma }}}{{2}}{+}\frac{{\mathrm{\beta }}}{{2}}\right){,}{\mathrm{\eta }}{,}{z}\right)$ (15)

So the coefficient of ${z}^{2}$ in the series expansion is

 > $Q≔\mathrm{simplify}\left(\mathrm{series}\left(\mathrm{HC},z,3\right),\mathrm{size}\right)$
 ${Q}{≔}{1}{+}\frac{\left({-}{\mathrm{\alpha }}{+}{1}{+}{\mathrm{\gamma }}\right){}{\mathrm{\beta }}{+}{\mathrm{\gamma }}{-}{\mathrm{\alpha }}{+}{2}{}{\mathrm{\eta }}}{{2}{}{\mathrm{\beta }}{+}{2}}{}{z}{+}\frac{{1}}{{8}}{}\frac{\left({\mathrm{\alpha }}{-}{\mathrm{\gamma }}{-}{1}\right){}\left({\mathrm{\alpha }}{-}{\mathrm{\gamma }}{-}{3}\right){}{{\mathrm{\beta }}}^{{2}}{+}\left({4}{}{{\mathrm{\alpha }}}^{{2}}{+}\left({-}{4}{}{\mathrm{\eta }}{-}{8}{}{\mathrm{\gamma }}{-}{14}\right){}{\mathrm{\alpha }}{+}{4}{}\left({\mathrm{\gamma }}{+}{\mathrm{\eta }}{+}\frac{{1}}{{2}}\right){}\left({\mathrm{\gamma }}{+}{2}\right)\right){}{\mathrm{\beta }}{+}{3}{}{{\mathrm{\alpha }}}^{{2}}{+}\left({-}{8}{}{\mathrm{\eta }}{-}{6}{}{\mathrm{\gamma }}{-}{8}\right){}{\mathrm{\alpha }}{+}{4}{}\left({\mathrm{\eta }}{+}\frac{{\mathrm{\gamma }}}{{2}}\right){}\left({\mathrm{\eta }}{+}\frac{{3}{}{\mathrm{\gamma }}}{{2}}{+}{2}\right)}{\left({\mathrm{\beta }}{+}{1}\right){}\left({\mathrm{\beta }}{+}{2}\right)}{}{{z}}^{{2}}{+}{O}{}\left({{z}}^{{3}}\right)$ (16)
 > $\mathrm{c2}≔\mathrm{coeff}\left(Q,z,2\right)$
 ${\mathrm{c2}}{≔}\frac{\left({\mathrm{\alpha }}{-}{\mathrm{\gamma }}{-}{1}\right){}\left({\mathrm{\alpha }}{-}{\mathrm{\gamma }}{-}{3}\right){}{{\mathrm{\beta }}}^{{2}}{+}\left({4}{}{{\mathrm{\alpha }}}^{{2}}{+}\left({-}{4}{}{\mathrm{\eta }}{-}{8}{}{\mathrm{\gamma }}{-}{14}\right){}{\mathrm{\alpha }}{+}{4}{}\left({\mathrm{\gamma }}{+}{\mathrm{\eta }}{+}\frac{{1}}{{2}}\right){}\left({\mathrm{\gamma }}{+}{2}\right)\right){}{\mathrm{\beta }}{+}{3}{}{{\mathrm{\alpha }}}^{{2}}{+}\left({-}{8}{}{\mathrm{\eta }}{-}{6}{}{\mathrm{\gamma }}{-}{8}\right){}{\mathrm{\alpha }}{+}{4}{}\left({\mathrm{\eta }}{+}\frac{{\mathrm{\gamma }}}{{2}}\right){}\left({\mathrm{\eta }}{+}\frac{{3}{}{\mathrm{\gamma }}}{{2}}{+}{2}\right)}{{8}{}\left({\mathrm{\beta }}{+}{1}\right){}\left({\mathrm{\beta }}{+}{2}\right)}$ (17)

solving for $\mathrm{\eta }$, requesting from solve to return using RootOf, you have

 > $\mathrm{_EnvExplicit}≔\mathrm{false}$
 ${\mathrm{_EnvExplicit}}{≔}{\mathrm{false}}$ (18)
 > $\mathrm{\eta }=\mathrm{solve}\left(\mathrm{c2},\mathrm{\eta }\right)$
 ${\mathrm{\eta }}{=}{\mathrm{RootOf}}{}\left({4}{}{{\mathrm{_Z}}}^{{2}}{+}\left({-}{4}{}{\mathrm{\alpha }}{}{\mathrm{\beta }}{+}{4}{}{\mathrm{\beta }}{}{\mathrm{\gamma }}{-}{8}{}{\mathrm{\alpha }}{+}{8}{}{\mathrm{\beta }}{+}{8}{}{\mathrm{\gamma }}{+}{8}\right){}{\mathrm{_Z}}{+}{{\mathrm{\alpha }}}^{{2}}{}{{\mathrm{\beta }}}^{{2}}{-}{2}{}{\mathrm{\gamma }}{}{\mathrm{\alpha }}{}{{\mathrm{\beta }}}^{{2}}{+}{{\mathrm{\gamma }}}^{{2}}{}{{\mathrm{\beta }}}^{{2}}{+}{4}{}{{\mathrm{\alpha }}}^{{2}}{}{\mathrm{\beta }}{-}{4}{}{\mathrm{\alpha }}{}{{\mathrm{\beta }}}^{{2}}{-}{8}{}{\mathrm{\gamma }}{}{\mathrm{\alpha }}{}{\mathrm{\beta }}{+}{4}{}{\mathrm{\gamma }}{}{{\mathrm{\beta }}}^{{2}}{+}{4}{}{{\mathrm{\gamma }}}^{{2}}{}{\mathrm{\beta }}{+}{3}{}{{\mathrm{\alpha }}}^{{2}}{-}{14}{}{\mathrm{\alpha }}{}{\mathrm{\beta }}{-}{6}{}{\mathrm{\alpha }}{}{\mathrm{\gamma }}{+}{3}{}{{\mathrm{\beta }}}^{{2}}{+}{10}{}{\mathrm{\beta }}{}{\mathrm{\gamma }}{+}{3}{}{{\mathrm{\gamma }}}^{{2}}{-}{8}{}{\mathrm{\alpha }}{+}{4}{}{\mathrm{\beta }}{+}{4}{}{\mathrm{\gamma }}\right)$ (19)

substituting in $\mathrm{HC}$ we have

 > $\mathrm{HC_polynomial}≔\mathrm{subs}\left(,\mathrm{HC}\right)$
 ${\mathrm{HC_polynomial}}{≔}{\mathrm{HeunC}}{}\left({\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\gamma }}{,}{-}{\mathrm{\alpha }}{}\left({2}{+}\frac{{\mathrm{\gamma }}}{{2}}{+}\frac{{\mathrm{\beta }}}{{2}}\right){,}{\mathrm{RootOf}}{}\left({4}{}{{\mathrm{_Z}}}^{{2}}{+}\left({-}{4}{}{\mathrm{\alpha }}{}{\mathrm{\beta }}{+}{4}{}{\mathrm{\beta }}{}{\mathrm{\gamma }}{-}{8}{}{\mathrm{\alpha }}{+}{8}{}{\mathrm{\beta }}{+}{8}{}{\mathrm{\gamma }}{+}{8}\right){}{\mathrm{_Z}}{+}{{\mathrm{\alpha }}}^{{2}}{}{{\mathrm{\beta }}}^{{2}}{-}{2}{}{\mathrm{\gamma }}{}{\mathrm{\alpha }}{}{{\mathrm{\beta }}}^{{2}}{+}{{\mathrm{\gamma }}}^{{2}}{}{{\mathrm{\beta }}}^{{2}}{+}{4}{}{{\mathrm{\alpha }}}^{{2}}{}{\mathrm{\beta }}{-}{4}{}{\mathrm{\alpha }}{}{{\mathrm{\beta }}}^{{2}}{-}{8}{}{\mathrm{\gamma }}{}{\mathrm{\alpha }}{}{\mathrm{\beta }}{+}{4}{}{\mathrm{\gamma }}{}{{\mathrm{\beta }}}^{{2}}{+}{4}{}{{\mathrm{\gamma }}}^{{2}}{}{\mathrm{\beta }}{+}{3}{}{{\mathrm{\alpha }}}^{{2}}{-}{14}{}{\mathrm{\alpha }}{}{\mathrm{\beta }}{-}{6}{}{\mathrm{\alpha }}{}{\mathrm{\gamma }}{+}{3}{}{{\mathrm{\beta }}}^{{2}}{+}{10}{}{\mathrm{\beta }}{}{\mathrm{\gamma }}{+}{3}{}{{\mathrm{\gamma }}}^{{2}}{-}{8}{}{\mathrm{\alpha }}{+}{4}{}{\mathrm{\beta }}{+}{4}{}{\mathrm{\gamma }}\right){,}{z}\right)$ (20)

When the function admits a polynomial form, as is the case of $\mathrm{HC_polynomial}$ by construction, to obtain the actual polynomial of degree $n$ (in this case $n=1$) use

 > $\mathrm{eval}\left(,\mathrm{HeunC}=\mathrm{HeunC}:-\mathrm{SpecialValues}:-\mathrm{Polynomial}\right)$
 ${1}{+}\frac{\left(\left({-}{\mathrm{\alpha }}{+}{1}{+}{\mathrm{\gamma }}\right){}{\mathrm{\beta }}{+}{\mathrm{\gamma }}{-}{\mathrm{\alpha }}{+}{2}{}{\mathrm{RootOf}}{}\left({4}{}{{\mathrm{_Z}}}^{{2}}{+}\left({-}{4}{}{\mathrm{\alpha }}{}{\mathrm{\beta }}{+}{4}{}{\mathrm{\beta }}{}{\mathrm{\gamma }}{-}{8}{}{\mathrm{\alpha }}{+}{8}{}{\mathrm{\beta }}{+}{8}{}{\mathrm{\gamma }}{+}{8}\right){}{\mathrm{_Z}}{+}{{\mathrm{\alpha }}}^{{2}}{}{{\mathrm{\beta }}}^{{2}}{-}{2}{}{\mathrm{\gamma }}{}{\mathrm{\alpha }}{}{{\mathrm{\beta }}}^{{2}}{+}{{\mathrm{\gamma }}}^{{2}}{}{{\mathrm{\beta }}}^{{2}}{+}{4}{}{{\mathrm{\alpha }}}^{{2}}{}{\mathrm{\beta }}{-}{4}{}{\mathrm{\alpha }}{}{{\mathrm{\beta }}}^{{2}}{-}{8}{}{\mathrm{\gamma }}{}{\mathrm{\alpha }}{}{\mathrm{\beta }}{+}{4}{}{\mathrm{\gamma }}{}{{\mathrm{\beta }}}^{{2}}{+}{4}{}{{\mathrm{\gamma }}}^{{2}}{}{\mathrm{\beta }}{+}{3}{}{{\mathrm{\alpha }}}^{{2}}{-}{14}{}{\mathrm{\alpha }}{}{\mathrm{\beta }}{-}{6}{}{\mathrm{\alpha }}{}{\mathrm{\gamma }}{+}{3}{}{{\mathrm{\beta }}}^{{2}}{+}{10}{}{\mathrm{\beta }}{}{\mathrm{\gamma }}{+}{3}{}{{\mathrm{\gamma }}}^{{2}}{-}{8}{}{\mathrm{\alpha }}{+}{4}{}{\mathrm{\beta }}{+}{4}{}{\mathrm{\gamma }}\right)\right){}{z}}{{2}{}{\mathrm{\beta }}{+}{2}}$ (21) References

 Decarreau, A.; Dumont-Lepage, M.C.; Maroni, P.; Robert, A.; and Ronveaux, A. "Formes Canoniques de Equations confluentes de l'equation de Heun." Annales de la Societe Scientifique de Bruxelles. Vol. 92 I-II, (1978): 53-78.
 Ronveaux, A. ed. Heun's Differential Equations. Oxford University Press, 1995.
 Slavyanov, S.Y., and Lay, W. Special Functions, A Unified Theory Based on Singularities. Oxford Mathematical Monographs, 2000.