<s>[INST] Solving a 2nd-order linear recurrence with variable coefficients 
Question: I am seeking a general closed-form evaluation for the following definite integral.

For nonnegative real parameters $a,b,z\in\mathbb{R}^{+}\land a<z\le b$ and integer index $n\in\mathbb{Z}$, define the auxiliary function $f_{n}{\left(a,b;z\right)}$ via the integral representation
  $$f_{n}{\left(a,b;z\right)}:=\int_{a}^{z}\frac{t^{n}}{\sqrt{\left(t-a\right)\left(b-t\right)}}\,\mathrm{d}t.\tag{1}$$

Specifically, I am requesting a closed-form that's purely in terms of elementary functions (the problem would be practically trivial if hypergeometric type functions were permitted here). We know in principle that every integral of the form $\int R{\left(x,\sqrt{px^{2}+qx+c}\right)}\,\mathrm{d}x$, where $R{\left(x,y\right)}$ is a rational function of two variables, possesses an elementary antiderivative as a consequence of Euler's substitutions and the partial fraction decomposition algorithm.

For $n\in\mathbb{N}\land n\ge2\land a,b,z\in\mathbb{R}^{+}\land a<z\le b$, we can derive a second-order linear non-homogeneous recurrence relation with variable coefficients for the terms $f_{n}{\left(a,b;z\right)}$:

$$\begin{cases}
&\small{f_{0}{\left(a,b;z\right)}=2\arcsin{\left(\sqrt{\frac{z-a}{b-a}}\right)},}\\
&\small{f_{1}{\left(a,b;z\right)}=-\sqrt{\left(z-a\right)\left(b-z\right)}+\left(a+b\right)\arcsin{\left(\sqrt{\frac{z-a}{b-a}}\right)},}\\
&\small{n\,f_{n}=\left(\frac{a+b}{2}\right)\left(2n-1\right)F_{n-1}-ab\left(n-1\right)F_{n-2}-z^{n-1}\sqrt{\left(z-a\right)\left(b-z\right)}.}\tag{2}\\
\end{cases}$$

A general solution to recurrence relation $(2)$ would in principle solve the integral in $(1)$, but my research into general methods for solving second-order recurrence relations didn't turn up anything of much help.
How would I go about evaluating either $(1)$ or $(2)$?

 [/INST] I think your recurrence may be solved in terms of a generating function
$$G(x) = \sum_{n=0}^{\infty} F_n x^n$$
so that
$$F_n = \frac1{n!}G^{(n)}(0) $$
Because all of the coefficients are no worse than linear, the recurrence relation turns into a first-order differential equation in $G$ by using the relation
$$\sum_{n=0}^{\infty} n F_n x^n = x G'(x)$$
We multiply the recurrence relation by $x^n$ and sum over $n \ge 2$ to get
$$\sum_{n=2}^{\infty} n F_n x^n - \frac12 (a+b) \sum_{n=2}^{\infty} (2 n-1) F_{n-1} x^n + a b \sum_{n=2}^{\infty} (n-1) F_{n-2} x^n = -\frac{\sqrt{(z-a)(b-z)}}{z} \sum_{n=2}^{\infty} z^n x^n $$
This becomes
$$x G'(x) - x F_1 - (a+b) x^2 G'(x) - \frac12 (a+b) x G(x)+\frac12 (a+b) x F_0+ a b x^3 G'(x)+a b x^2 G(x) = -z \sqrt{(z-a)(b-z)} \frac{x}{1-z x} $$
or
$$(a b x^2- (a+b) x + 1)G'(x)  + \left ( a b x - \frac12 (a+b) \right )G(x) = \left (F_1 - \frac12 (a+b) F_0 \right)  -z \sqrt{(z-a)(b-z)} \frac{x}{1-z x}$$
The integrating factor for this equation is relatively simple, so we may rewrite this equation as
$$a b \frac{d}{dx} \left [\sqrt{\left ( \frac1{a}-x\right )\left ( \frac1{b}-x\right )} G(x) \right ] = \frac{F_1 - \frac12 (a+b) F_0}{\sqrt{\left ( \frac1{a}-x\right )\left ( \frac1{b}-x\right )}} - z \sqrt{(z-a)(b-z)} \frac{x}{(1-z x)\sqrt{\left ( \frac1{a}-x\right )\left ( \frac1{b}-x\right )} } $$
Integrating, we get
$$a b \sqrt{\left ( \frac1{a}-x\right )\left ( \frac1{b}-x\right )} G(x) +C = \left (F_1 - \frac12 (a+b) F_0 \right ) \log \left(2 a b x+2 \sqrt{a b} \sqrt{1-a x} \sqrt{1-b x}-(a+b)\right) + \sqrt{z-a} \sqrt{b-z} \log \left(2 a b x+2 \sqrt{a b} \sqrt{1-a x} \sqrt{1-b x}-(a+b)\right)+\sqrt{a b} \left[\log (1-x z)-\log \left(x (2 a b+a z+b z)-2  \sqrt{z-a}\sqrt{b-z} \sqrt{1-a x}\sqrt{1-b x} +a+b-2 z\right)\right] $$
where $C$ is a constant of integration determined by $G(0)=F_0$.
While this way looks messy, it does not rely on hypergeometrics.
</s>