# Hypergeometric differential equation with integer parameters?

Naively, the hypergeometric differential equation has two independent solutions as follows:

fun=y[x]/.DSolve[(x (1 - x) y''[x] + (c - (a + b + 1) x) y'[x] - a b y[x]) == 0, y[x], x][[1]]


Let's say we are interested in obtaining the solution for a,b,c integer, e.g.

subabc={a->5,b->4,c->3};


Substituting this in just gives infinity:

fun/.subabc


ComplexInfinity

While substituting the parameters into the differential equation before solving it, gives a perfectly finite result:

y[x]/.DSolve[((x (1 - x) y''[x] + (c - (a + b + 1) x) y'[x] - a b y[x])/.subabc) == 0, y[x], x][[1]]


Is there a way to make Mathematica return a valid analytic result that would reduce to the explicit example upon inserting integer parameters?

Since you are assuming positive integer parameters, use a linear transformation on the second independent solution:

expr = DSolveValue[(x (1 - x) y''[x] + (c - (a + b + 1) x) y'[x] - a b y[x]) == 0,
y[x], x] // MapAt[# /. Hypergeometric2F1[a_, b_, c_, z_] :>
Pochhammer[c - b, -a]/Pochhammer[c, -a]
Hypergeometric2F1[a, b, b - c + a + 1, 1 - z] &, 2]


which yields

C[1] Hypergeometric2F1[a, b, c, x] + ((-1)^(1 - c) x^(1 - c) Pochhammer[1 - b, -1 - a + c]
C[2] Hypergeometric2F1[1 + a - c, 1 + b - c, 1 + a + b - c, 1 - x])/
Pochhammer[2 - c, -1 - a + c]


This behaves fine for positive integer parameters:

expr /. Thread[{a, b, c} -> {5, 4, 3}]
((3 + 2 x) C[1])/(3 (1 - x)^6) +
(C[2] (1 - 12 x - 36 x^2 + 44 x^3 + 3 x^4 - 36 x^2 Log[x] - 24 x^3 Log[x]))/
((-1 + x)^6 x^2)

• This is curious! I thought the linear transformations were only valid when one of the upper parameters is a negative integer, making the whole thing a polynomial. How come it is valid here too, did I miss something? – Kagaratsch Mar 7 '19 at 2:41
• Yes, I've found they produce solutions that still satisfy the hypergeometric DE if the denominator parameter would otherwise degenerate to a negative integer. I haven't fully investigated why yet. – J. M. will be back soon Mar 7 '19 at 3:18
• Very interesting! Perhaps it just shifts to a different independent pair from the 24 Kummer solutions... – Kagaratsch Mar 7 '19 at 3:27