In [17]:
using ApproxFun, Plots, ComplexPhasePortrait, ApproxFun, SingularIntegralEquations,
SpecialFunctions
using SingularIntegralEquations.HypergeometricFunctions
gr();
Dr Sheehan Olver
s.olver@imperial.ac.uk
Office Hours: 3-4pm Mondays, 11-12am Thursdays, Huxley 6M40
Website: https://github.com/dlfivefifty/M3M6LectureNotes
The hypergeometric equation has three regular singular points at $0$, $1$ and $\infty$: $$ z(1-z) {\D^2 u \over \D u^2} + \br[c-(a+b+1) z] {\D u \over \dz} - ab u =0 $$ It's importance follows from the following theorem.
Theorem Any homogenous 2nd order linear differential equation whose singularities in $\bar\C$ are regular and not more than three in number can be transformed into the hypergeometric functions.
Proof See [Chapter 5.8, Olver 1975]. ⬛️
If we solve this ODE along a straight contour starting from $z_0 = -1$, we have that all solutions are analytic off $[0,\infty)$. Interestingly, there exists a special solution that is analytic off $[1,\infty)$, the (Gauss) hypergeometric function, which we denote $$ u(z) = {}_2F_1\!\left({a,b \atop c}; z \right) $$
To see this, consider the indicial equation at zero: $$ \alpha(\alpha-1) + a_{-1} \alpha + b_{-2} = 0 $$ where $a_{-1} = c$ and $b_{-2} = 0$. This has two solutions: $\alpha = 0$ and $ \alpha = 1 - c$. The choice $\alpha = 0$ has no singularity, and forward substitution proceeds provided $1-c$ is not a positive integer.
Here is a phase plot of a typical hypergeometric function, showing the branch cut from $(1,∞)$:
In [2]:
phaseplot(z -> _₂F₁(0.5,-0.2,0.1,z), (-3,3), (-3,3))
Out[2]:
Note some special cases are entire:
In [3]:
n = 5;
a ,b = 0.0, 0.0
phaseplot(z -> _₂F₁(-n,n+a+b+1,a+1,z+eps()*im), (-3,3), (-3,3))
Out[3]:
When c
is a negative integer, we see that it is not well-define:
In [4]:
_₂F₁(0.5,-0.2,-3,0.1) # errors out for 1-c = 2
Out[4]:
Remark The regularized hypergeometric function ${\mathbf F}\!\left({a,b \atop c}; z \right)$ extends the definition to $1-c$ being a positive integer. In these cases, one has the initial condition $u(0) = 0$, or more specifically, $u(z) = O(z^{1-c})$. In practical applications, one should normally use ${\mathbf F}$.
We can determine the Taylor coefficients of $u(z) = \HF(a,b,c,z)$ by solving the equation $$ z(1-z) {\D^2 u \over \D z^2} + \br[c-(a+b+1) z] {\D u \over \dz} - ab u =0 \qqand u(0) = 1 $$ (only one initial condition is specified since the other solution is singular) as a lower triangular system:
We do so by representing the various operators: $$ z (1-z){\D^2 \over \D z^2} \equiv \begin{pmatrix} 0 & 0 \\ & 0 & 2 \\ &&-2 & 6 \\ &&&-6 & 12 \\ &&&&\ddots & \ddots \end{pmatrix} $$
In [5]:
z = Fun(Taylor(Circle(1.0)))
a = 0.1; b = 0.3; c= 0.4;
D = Derivative() : space(z)
z*(1-z)*D^2
Out[5]:
In [6]:
(c-(a+b+1)*z)*D
Out[6]:
Adding in the boundary row, we get a really nice, simple formula for the taylor coefficients: $$ \begin{pmatrix} 1 \\ -ab & c \\ & -(a+b+1)-ab & 2+2c \\ && -2-2(a+b+1)-ab & 6+3c \\ &&& -6-3(a+b+1)-ab & 12+4c \\ &&&&\ddots & \ddots \end{pmatrix} \begin{pmatrix} u_0 \\ u_1 \\ \vdots \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \\ \vdots \end{pmatrix} $$
That is, we have \begin{align*} u_0 &= 1 \\ u_{k+1} &= { k(k+a+b)+ab \over (k+1)(k + c)} u_k &= { (a+k)(b+k) \over (k+1)(k + c)} u_k \end{align*}
In [7]:
n = 100
u = Array{Float64}(n)
u[1] = 1
for k=0:n-2
u[k+2] =(a+k)*(b+k)/((k+1)*(k+c))*u[k+1]
end
u = Fun(Taylor(), u)
(z*(1-z)*D^2 + (c-(a+b+1)*z)*D - a*b*I)*u # zero apart from tail
Out[7]:
In [8]:
u(0.1) - _₂F₁(a,b,c,0.1)
Out[8]:
Recall the Pochhammer symbol: Definition (Pochhammer) $$ (a)_n := a(a+1)(a+2) \cdots (a+n-1) $$
We have thus arrived at a nice formula for the Taylor series:
Theorem (Hypergeometric function Taylor series) For $|z| < 1$, $$ \HF(a,b,c,z) = \sum_{k=0} {(a)_k (b)_k \over (c)_k} {z^k \over k!} $$ solves the hypergeometric equation with $\HF(a,b,c,0) = 1$.
This gives us one solution to the equation, but we know all ODEs have two linearly independent solutions. In fact, we know from the indicial equation that the second solution has a singularity of the form $(-z)^{1-c}$. It turns out after we change variables we arrive back at a Hypergeometric function:
Theorem (Hypergeometric function second solution) Suppose $c$ is not an integer. Then $$ (-z)^{1-c} \HF(a-c+1, b-c+1,2-c, z) $$ solves the hypergeometric function off $[0,\infty)$.
Proof This is fairly straightforward: Making the change of variables: $$ u(z) = (-z)^{1-c} v(z) $$ that is, \begin{align*} u'(z) &= (c-1)(-z)^{-c} v(z) + (-z)^{1-c} v'(z)\\ u''(z) &= c(c-1)(-z)^{-c-1} v(z) + 2(c-1)(-z)^{-c} v'(z) + (-z)^{1-c} v''(z) \end{align*} the hypergeometric function becomes \begin{align*} z(1-z)(-z)^{1-c} v''(z) - 2(c-1) (1-z) (-z)^{1-c} v'(z) -(1-z) c(c-1)(-z)^{-c} v(z) + (c-(a+b+1) z) ((c-1)(-z)^{-c} v(z) + (-z)^{1-c} v'(z)) - ab (-z)^{1-c} v(z) = 0 \Rightarrow z(1-z) v''(z) +\br[2-c - (3+a+b-2c)] v'(z) - (a-c+1)(b-c+1)v(z) = 0 \end{align*} This is again the hypergeometric function, with the altered parameters.
⬛️
Let's check it out:
In [13]:
a,b,c = 0.1,0.3,0.4
u = z -> (-z)^(1-c)*_₂F₁(a-c+1,b-c+1,2-c,z)
phaseplot(u, (-3,3), (-3,3))
Out[13]:
Let's double check it satisfies the original ODE:
In [16]:
# dual numbers don't work to second degree so let's check numerically:
z = Fun(0.1+im .. 0.2+im)
uf = Fun(u, domain(z))
norm(z*(1-z)*uf'' + (c - (a+b+1)*z)*uf' - a*b*uf)
Out[16]: