Zeros of Quasi-Orthogonal Jacobi Polynomials

Zeros of Quasi-Orthogonal Jacobi Polynomials\star\star$\star$This paper is a
contribution to the Special Issue on Orthogonal Polynomials, Special Functions
and Applications. The full collection is available at
http://www.emis.de/journals/SIGMA/OPSFA2015.html

Kathy DRIVER and Kerstin JORDAAN K. Driver and K. Jordaan Department of
Mathematics and Applied Mathematics, University of Pretoria,
Pretoria, 0002, South Africa<EMAIL_ADDRESS><EMAIL_ADDRESS>
Received October 30, 2015, in final form April 20, 2016; Published online
April 27, 2016

We consider interlacing properties satisfied by the zeros of Jacobi
polynomials in quasi-orthogonal sequences characterised by $\alpha>-1$,
$-2<\beta<-1$. We give necessary and sufficient conditions under which a
conjecture by Askey, that the zeros of Jacobi polynomials
$P_{n}^{(\alpha,\beta)}$ and $P_{n}^{(\alpha,\beta+2)}$ are interlacing, holds
when the parameters $\alpha$ and $\beta$ are in the range $\alpha>-1$ and
$-2<\beta<-1$. We prove that the zeros of $P_{n}^{(\alpha,\beta)}$ and
$P_{n+1}^{(\alpha,\beta)}$ do not interlace for any $n\in\mathbb{N}$, $n\geq
2$ and any fixed $\alpha$, $\beta$ with $\alpha>-1$, $-2<\beta<-1$. The
interlacing of zeros of $P_{n}^{(\alpha,\beta)}$ and
$P_{m}^{(\alpha,\beta+t)}$ for $m,n\in\mathbb{N}$ is discussed for $\alpha$
and $\beta$ in this range, $t\geq 1$, and new upper and lower bounds are
derived for the zero of $P_{n}^{(\alpha,\beta)}$ that is less than $-1$.

interlacing of zeros; quasi-orthogonal Jacobi polynomials

33C50; 42C05

##  1 Introduction

Let $\\{p_{n}\\}_{n=0}^{\infty}$, $\deg(p_{n})=n$, $n\in\mathbb{N}$, be a
sequence of orthogonal polynomials with respect to a positive Borel measure
$\mu$ supported on an interval $(a,b)$. It is well known (see [22]) that the
zeros of $p_{n}$ are real and simple and lie in $(a,b)$ while, if we denote
the zeros of $p_{n}$, in increasing order by $x_{1,n}<x_{2,n}<\dots<x_{n,n}$,
then

$\displaystyle x_{1,n}<x_{1,n-1}<x_{2,n}<x_{2,n-1}<\dots<x_{n-1,n-1}<x_{n,n},$

a property called the interlacing of zeros.

Since our discussion will include interlacing of zeros of polynomials of non-
consecutive degree, we recall the following definitions:

######  Definition 1.1.

Let $n\in{\mathbb{N}}$. If $x_{1,n}<x_{2,n}<\dots<x_{n,n}$ are the zeros of
$p_{n}$ and $y_{1,n}<y_{2,n}<\dots<y_{n,n}$ are the zeros of $q_{n}$, then the
zeros of $p_{n}$ and $q_{n}$ are interlacing if

$\displaystyle x_{1,n}<y_{1,n}<x_{2,n}<y_{2,n}<\dots<x_{n,n}<y_{n,n}$

or if

$\displaystyle y_{1,n}<x_{1,n}<y_{2,n}<x_{2,n}<\dots<y_{n,n}<x_{n,n},$

The definition of interlacing of zeros of two polynomials whose degrees differ
by more than one was introduced by Stieltjes [22].

######  Definition 1.2.

Let $m,n\in{\mathbb{N}}$, $m\leq n-2$. The zeros of the polynomials $p_{n}$
and $q_{m}$ are interlacing if there exist $m$ open intervals, with endpoints
at successive zeros of $p_{n}$, each of which contains exactly one zero of
$q_{m}$.

Askey conjecture. In [3], Richard Askey conjectured that the zeros of the
Jacobi polynomials $P_{n}^{(\alpha,\beta)}$ and $P_{n}^{(\alpha,\beta+2)}$ are
interlacing for each $n\in{\mathbb{N}}$, $\alpha,\beta>-1$. A more general
version of the Askey conjecture was proved in [12], namely that the zeros of
$P_{n}^{(\alpha,\beta)}$ and the zeros of $P_{n}^{(\alpha-k,\beta+t)}$ are
interlacing for each $n\in\mathbb{N}$, $\alpha,\beta>-1$ and any real numbers
$t$ and $k$ with $0\leq t,k\leq 2$.

Here, we investigate Askey’s conjecture, and several extensions thereof, in
the context of sequences of Jacobi polynomials that are quasi-orthogonal of
order $1$.

The concept of quasi-orthogonality of order $1$ was introduced by Riesz in
[20] in his seminal work on the moment problem. Fejér [14] considered quasi-
orthogonality of order $2$ while the general case was first studied by Shohat
[21]. Chihara [7] discussed quasi-orthogonality of order $r$ in the context of
three-term recurrence relations and Dickinson [8] improved Chihara’s result by
deriving a system of recurrence relations that provides both necessary and
sufficient conditions for quasi-orthogonality. Algebraic properties of the
linear functional associated with quasi-orthogonality are investigated in [11,
16, 17, 18]. Quasi-orthogonal polynomials have also been studied in the
context of connection coefficients, see for example [1, 2, 9, 15, 23, 24, 25,
26] as well as Geronimus canonical spectral transformations of the measure
(cf. [27]). Properties of orthogonal polynomials associated with such
Geronimus perturbations, including properties satisfied by the zeros, have
been analysed in [4].

The definition of quasi-orthogonality of a sequence of polynomials is the
following:

######  Definition 1.3.

Let $\\{q_{n}\\}_{n=0}^{\infty}$ be a sequence of polynomials with degree
$q_{n}=n$ for each $n\in{\mathbb{N}}$. For a positive integer $r<n$, the
sequence $\\{q_{n}\\}_{n=0}^{\infty}$ is quasi-orthogonal of order $r$ with
respect to a positive Borel measure $\mu$ if

$\displaystyle\int x^{k}q_{n}(x)d{\mu}(x)=0\qquad\mbox{for}\quad
k=0,\ldots,n-1-r.$ (1)

If (1) holds for $r=0$, the sequence $\\{q_{n}\\}_{n=0}^{\infty}$ is
orthogonal with respect to the measure $\mu$. A characterisation of a
polynomial $q_{n}$ that is quasi-orthogonal of order $r$ with respect to a
positive measure $\mu$, as a linear combination of
$p_{n},p_{n-1},\dots,p_{n-r}$ where $\\{p_{n}\\}_{n=0}^{\infty}$ is orthogonal
with respect to $\mu$, was first investigated by Shohat (cf. [21]). A full
statement and proof of this result can be found in [5, Theorem 1].

Quasi-orthogonal polynomials arise in a natural way in the context of
classical orthogonal polynomials that depend on one or more parameters. The
sequence of Jacobi polynomials
$\big{\\{}P_{n}^{(\alpha,\beta)}\big{\\}}_{n=0}^{\infty}$ is orthogonal on
$(-1,1)$ with respect to the weight function $(1-x)^{\alpha}(1+x)^{\beta}$
when $\alpha>-1$, $\beta>-1$. The three-term recurrence relation [22, (4.5.1)]
satisfied by the sequence is

$\displaystyle
c_{n}P_{n}^{(\alpha,\beta)}(x)=(x-d_{n})P_{n-1}^{(\alpha,\beta)}(x)-e_{n}P_{n-2}^{(\alpha,\beta)}(x),\qquad
n=2,3,\dots,$ (2)

where

$\displaystyle c_{n}=2n(n+\alpha+\beta)/(2n+\alpha+\beta-1)(2n+\alpha+\beta),$
$\displaystyle
d_{n}=\big{(}{\beta}^{2}-{\alpha}^{2}\big{)}/(2n+\alpha+\beta-2)(2n+\alpha+\beta),$
(3) $\displaystyle
e_{n}=2(n+\alpha-1)(n+\beta-1)/(2n+\alpha+\beta-2)(2n+\alpha+\beta-1),$

and $P_{0}^{(\alpha,\beta)}(x)\equiv 1$,
$P_{1}^{(\alpha,\beta)}(x)=\frac{1}{2}(\alpha+\beta+2)x+\frac{1}{2}(\alpha-\beta)$.
For values of $\alpha$ and $\beta$ outside the range $\alpha,\beta>-1$, the
Jacobi sequence $\big{\\{}P_{n}^{(\alpha,\beta)}\big{\\}}_{n=0}^{\infty}$ can
be defined by the three term recurrence relation (2). The quasi-orthogonal
Jacobi sequences of order $1$ and $2$ are of particular interest since, apart
from the orthogonal Jacobi sequences, these are the only sequences of Jacobi
polynomials for $\alpha,\beta\in\mathbb{R}$ where all $n$ zeros of
$P_{n}^{(\alpha,\beta)}$ are real and distinct.

In [5, Theorem 7], it is proved that if $-1<\alpha,\beta<0$, and
$k,l\in{\mathbb{N}}$ with $k+l<n$, the Jacobi polynomials
$\big{\\{}P_{n}^{(\alpha-k,\beta-l)}\big{\\}}_{n=0}^{\infty}$ are quasi-
orthogonal of order $k+l$ with respect to the weight function
$(1-x)^{\alpha}(1+x)^{\beta}$ on the interval $[-1,1]$.

Interlacing properties of zeros of quasi-orthogonal and orthogonal Jacobi
polynomials of the same or consecutive degree were discussed and the following
result proved in [5, Corollary 4].

######  Lemma 1.4.

Fix $\alpha$ and $\beta$, $\alpha>-1$ and $-2<\beta<-1$ and denote the
sequence of Jacobi polynomials by
$\big{\\{}P_{n}^{(\alpha,\beta)}\big{\\}}_{n=0}^{\infty}$. For each
$n\in{\mathbb{N}}$, $n\geq 1$, let $x_{1,n}<x_{2,n}<\dots<x_{n,n}$ denote the
zeros of the $($quasi-orthogonal$)$ polynomial $P_{n}^{(\alpha,\beta)}$ and
$y_{1,n}<y_{2,n}<\dots<y_{n,n}$ denote the zeros of the $($orthogonal$)$
polynomial $P_{n}^{(\alpha,\beta+1)}$. Then

$\displaystyle x_{1,n}<-1<y_{1,n}<x_{2,n}<y_{2,n}<\dots<x_{n,n}<y_{n,n}<1$ (4)

and

$\displaystyle
x_{1,n+1}<-1<y_{1,n}<x_{2,n+1}<y_{2,n}<\dots<x_{n,n+1}<y_{n,n}<x_{n+1,n+1}<1,$
(5)

For proof see [5, Corollary 4(ii)(a)] with $\beta$ replaced by $\beta+1$.

In [6], Bustamante, Martínez-Cruz and Quesada apply the interlacing properties
of zeros of quasi-orthogonal and orthogonal Jacobi polynomials given in [12]
and in Lemma 1.4 to show that best possible one-sided polynomial approximants
to a unit step function on the interval $[-1,1]$, which are in some cases
unique, can be obtained using Hermite interpolation at interlaced zeros of
quasi-orthogonal and orthogonal Jacobi polynomials.

We assume throughout this paper that $\alpha$ and $\beta$ are fixed numbers
lying in the range $\alpha>-1$, $-2<\beta<-1$.

In Section 2, we analyse the interlacing properties of zeros of polynomials of
consecutive, and non-consecutive, degree within a sequence of quasi-orthogonal
Jacobi polynomials of order $1$. In Section 3 we prove a necessary and
sufficient condition for the Askey conjecture to hold between the zeros of an
orthogonal and a quasi-orthogonal (order 1) sequence of Jacobi polynomials of
the same degree and then extend this to the case where the polynomials are of
consecutive degree. In Section 4 we discuss interlacing properties and
inequalities satisfied by the zeros of orthogonal and quasi-orthogonal (order
$1$) Jacobi polynomials whose degrees differ by more than unity. In Section 5
we derive upper and lower bounds for the zero of $P_{n}^{(\alpha,\beta)}$ that
is $<-1$.

Note that, since Jacobi polynomials satisfy the symmetry property [15,
equation (4.1.1)]

$\displaystyle
P_{n}^{(\alpha,\beta)}(x)={(-1)}^{n}P_{n}^{(\beta,\alpha)}(-x),$ (6)

each result proved for quasi-orthogonal Jacobi polynomials
$P_{n}^{(\alpha,\beta)}$ with $\alpha>-1$, $-2<\beta<-1$ has an analogue for
the corresponding quasi-orthogonal polynomial with $\beta>-1$, $-2<\alpha<-1$.

##  2 Quasi-orthogonal Jacobi polynomials of order 1

###  2.1 Zeros of $\boldsymbol{P_{n}^{(\alpha,\beta)}}$ and
$\boldsymbol{P_{n-k}^{(\alpha,\beta)}}$, $\boldsymbol{k,n\in\mathbb{N}}$,
$\boldsymbol{1\leq k<n}$

Our first result proves that for any $n\in{\mathbb{N}}$, $n\geq 2$,
interlacing does not hold between the $n$ real zeros of
$P_{n}^{(\alpha,\beta)}$ and the $n+1$ real zeros of
$P_{n+1}^{(\alpha,\beta)}$. However, the $n-1$ zeros of
$P_{n}^{(\alpha,\beta)}$ in $(-1,1)$ interlace with the $n$ zeros of
$P_{n+1}^{(\alpha,\beta)}$ in $(-1,1)$. Moreover, the $n+1$ zeros of
$(1+x)P_{n}^{(\alpha,\beta)}(x)$ interlace with the $n+1$ zeros of
$P_{n+1}^{(\alpha,\beta)}(x)$ for each $n\in\mathbb{N}$.

######  Theorem 2.1.

Fix $\alpha$ and $\beta$, $\alpha>-1$ and $-2<\beta<-1$ and denote the
sequence of Jacobi polynomials by
$\big{\\{}P_{n}^{(\alpha,\beta)}\big{\\}}_{n=0}^{\infty}$. For each
$n\in{\mathbb{N}}$, $n\geq 1$, let $x_{1,n}<x_{2,n}<\dots<x_{n,n}$ denote the
zeros of $P_{n}^{(\alpha,\beta)}$. Then

$\displaystyle
x_{1,n}<x_{1,n+1}<-1<x_{2,n+1}<x_{2,n}<\dots<x_{n,n+1}<x_{n,n}<x_{n+1,n+1}<1.$
(7)

######  Corollary 2.2.

Let $\big{\\{}P_{n}^{(\alpha,\beta)}\big{\\}}_{n=0}^{\infty}$ denote the
sequence of Jacobi polynomials and fix $\alpha$ and $\beta$ with $\alpha>-1$
and $-2<\beta<-1$. The zeros of $P_{n-k}^{(\alpha,\beta)}$ and the zeros of
$P_{n}^{(\alpha,\beta)}$ do not interlace for any $k,n\in{\mathbb{N}}$, $n\geq
3$, $k\in\\{1,\dots,n-1\\}$.

######  Proof 2.3.

It follows immediately from Definition 1.1 that Stieltjes interlacing does not
hold between the zeros of two polynomials if any zero of the polynomial of
smaller degree lies outside the interval with endpoints at the smallest and
largest zero of the polynomial of larger degree. Since (7) shows that
$x_{1,n-2}<x_{1,n-1}<x_{1,n}<-1<x_{n,n}$ for each $n\in{\mathbb{N}}$, the
smallest zero of $P_{n-2}^{(\alpha,\beta)}$ lies outside the interval
$(x_{1,n},x_{n,n})$ and this proves the result.

######  Remark 2.4.

Theorem 2.1 complements results proved by Dimitrov, Ismail and Rafaeli [10]
who consider the interlacing properties of zeros of orthogonal polynomials
arising from perturbations of the weight function of orthogonality. However,
the sequences of polynomials considered in [10] retain orthogonality. Shifting
from the orthogonal case to the quasi-orthogonal order $1$ Jacobi case
$P_{n}^{(\alpha,\beta)}$ with $\alpha>-1$, $-2<\beta<-1$ may be viewed as a
perturbation of the (orthogonal) Jacobi weight function
${(1-x)}^{\alpha}{(1+x)}^{\beta}$, $\alpha,\beta>-1$, by the factor
${(1+x)}^{-1}$.

######  Remark 2.5.

Relation (7) proves that for each fixed $\alpha$ and $\beta$ with $\alpha>-1$
and $-2<\beta<-1$, the zero of $P_{n}^{(\alpha,\beta)}$ that is less than
$-1$, increases with $n$.

######  Corollary 2.6.

For each fixed $\alpha$, $\beta$ with $-2<\alpha<-1$ and $\beta>-1$, and each
$n\in{\mathbb{N}}$, $n\geq 2$,

  * $(i)$

the $n+1$ zeros of $(1-x)P_{n}^{(\alpha,\beta)}(x)$ interlace with the $n+1$
zeros of $P_{n+1}^{(\alpha,\beta)}(x)$;

  * $(ii)$

the $n-1$ zeros of $P_{n}^{(\alpha,\beta)}$ that lie in the interval $(-1,1)$
interlace with the $n$ zeros of $P_{n+1}^{(\alpha,\beta)}$ that lie in the
interval $(-1,1)$;

  * $(iii)$

interlacing does not hold between all the real zeros of
$P_{n}^{(\alpha,\beta)}$ and all the real zeros of $P_{n+1}^{(\alpha,\beta)}$
for any $n\in{\mathbb{N}}$, $n\geq 2$;

  * $(iv)$

the zero of $P_{n}^{(\alpha,\beta)}$ that is $>1$ decreases with $n$.

######  Proof 2.7.

The result follows from Theorem 2.1 and the symmetry property (6) of Jacobi
polynomials.

###  2.2 Co-primality and zeros of $\boldsymbol{P_{n}^{(\alpha,\beta)}}$ and
$\boldsymbol{P_{n-k}^{(\alpha,\beta)}}$, $\boldsymbol{k,n\in\mathbb{N}}$,
$\boldsymbol{2\leq k<n}$

Common zeros of two polynomials, should they exist, play a crucial role when
discussing interlacing properties of their zeros, see, for example, [13]. The
polynomials $P_{n}^{(\alpha,\beta)}$ and $P_{n-1}^{(\alpha,\beta)}$ of
consecutive degree are co-prime for each $n\in{\mathbb{N}}$, $n\geq 1$, and
each fixed $\alpha$, $\beta$ with $\alpha>-1$ and $-2<\beta<-1$. This follows
from Theorem 2.1 but is also immediate from the three term recurrence relation
(2) since if $P_{n}^{(\alpha,\beta)}$ and $P_{n-1}^{(\alpha,\beta)}$ had a
common zero, this would also be a zero of $P_{n-2}^{(\alpha,\beta)}$. After
suitable iteration of (2), this contradicts $P_{0}^{(\alpha,\beta)}(x)\equiv
1$.

######  Theorem 2.8.

Let $\big{\\{}P_{n}^{(\alpha,\beta)}\big{\\}}_{n=0}^{\infty}$ denote the
sequence of Jacobi polynomials and fix $\alpha$ and $\beta$ with $\alpha>-1$
and $-2<\beta<-1$. If $P_{n}^{(\alpha,\beta)}$ and $P_{n-2}^{(\alpha,\beta)}$
are co-prime for each $n\in{\mathbb{N}}$, $n\geq 3$, then the zeros of
$(x+1)(x-d_{n})P_{n-2}^{(\alpha,\beta)}$ interlace with the zeros of
$P_{n}^{(\alpha,\beta)}$ where $d_{n}$ is given in (3).

######  Remark 2.9.

We note that results analogous to Theorem 2.8 can be proven for the zeros of
Jacobi polynomials $P_{n}^{(\alpha,\beta)}$ and $P_{n-k}^{(\alpha,\beta)}$
when $k,n\in\mathbb{N}$, $3\leq k<n$.

##  3 An extension of the Askey conjecture

###  3.1 Zeros of $\boldsymbol{P_{n}^{(\alpha,\beta)}}$ and
$\boldsymbol{P_{n}^{(\alpha,\beta+2)}}$, $\boldsymbol{n\in\mathbb{N}}$

We investigate an extension of the Askey conjecture that the zeros of the
Jacobi polynomials $P_{n}^{(\alpha,\beta)}$ and $P_{n}^{(\alpha,\beta+2)}$ are
interlacing when $\alpha>-1$, $-2<\beta<-1$ and prove a necessary and
sufficient condition for interlacing between the zeros of these two
polynomials to occur.

######  Theorem 3.1.

Suppose that $\alpha>-1$, $-2<\beta<-1$, and
$\big{\\{}P_{n}^{(\alpha,\beta)}\big{\\}}_{n=0}^{\infty}$ is the sequence of
Jacobi polynomials. Let $\delta:=-1-\frac{2(\beta+1)}{\alpha+\beta+2n+2}$. For
each $n\in{\mathbb{N}}$, the zeros of $P_{n}^{(\alpha,\beta)}$ and
$P_{n}^{(\alpha,\beta+2)}$ are interlacing if and only if $\delta<x_{2,n}$,
where $x_{2,n}$ is the smallest zero of $P_{n}^{(\alpha,\beta)}$ in the
interval $(-1,1)$.

######  Remark 3.2.

Numerical evidence confirms that the assumption in Theorem 3.1, i.e.,
$\delta<x_{2,n}$, is reasonable. There are values of $\alpha$ and $\beta$ for
which the condition is satisfied and others where it is not. For example, when
$n=5$, $\alpha=2.35$ and $\beta=-1.5$ we have $\delta=-0.922179$ and
$x_{2,n}=-0.885666$ whereas for the same $n$ and $\alpha$ with $\beta=-1.9$ we
have $\delta=-0.855422$ and $x_{2,n}=-0.961637$. Analytically one can see that
the condition is more likely to be satisfied when $\delta$ approaches $-1$, a
lower bound for $x_{2,n}$, i.e., when $\beta\to-1$ with $\alpha>-1$ and
$n\in\mathbb{N}$ fixed.

Although full interlacing between the zeros of $P_{n}^{(\alpha,\beta)}$ and
$P_{n}^{(\alpha,\beta+2)}$ cannot occur when $\delta\geq x_{2,n}$, there is an
interlacing result, involving the point $\delta$, that holds between the zeros
of $P_{n}^{(\alpha,\beta)}$ that lie in the interval $(-1,1)$ and the zeros of
$P_{n}^{(\alpha,\beta+2)}$ provided the two polynomials have no common zeros.

######  Theorem 3.3.

Suppose that $\alpha>-1$, $-2<\beta<-1$ and
$\big{\\{}P_{n}^{(\alpha,\beta)}\big{\\}}_{n=0}^{\infty}$ is the sequence of
Jacobi polynomials. Suppose that $P_{n}^{(\alpha,\beta)}$ and
$P_{n}^{(\alpha,\beta+2)}$ have no common zeros and assume that
$\delta:=-1-\frac{2(\beta+1)}{\alpha+\beta+2n+2}>x_{2,n}$. For each
$n\in{\mathbb{N}}$, the zeros of $(x-\delta)P_{n}^{(\alpha,\beta)}(x)$
interlace with the zeros of $P_{n}^{(\alpha,\beta+2)}(x)$.

###  3.2 Zeros of $\boldsymbol{P_{n}^{(\alpha,\beta)}}$ and
$\boldsymbol{P_{n-1}^{(\alpha,\beta+2)}}$, $\boldsymbol{n\in\mathbb{N}}$

######  Theorem 3.4.

Let $\alpha>-1$, $-2<\beta<-1$ and
$\big{\\{}P_{n}^{(\alpha,\beta)}\big{\\}}_{n=0}^{\infty}$ be the sequence of
Jacobi polynomials. Let $x_{1,n}<x_{2,n}<\dots<x_{n,n}$ denote the zeros of
$P_{n}^{(\alpha,\beta)}$ and $z_{1,n-1}<z_{2,n-1}<\dots<z_{n-1,n-1}$ denote
the zeros of $P_{n-1}^{(\alpha,\beta+2)}$. Then $P_{n-1}^{(\alpha,\beta+2)}$
and $P_{n}^{(\alpha,\beta)}$ are co-prime and the zeros of
$(1+x)P_{n-1}^{(\alpha,\beta+2)}$ interlace with the zeros of
$P_{n}^{(\alpha,\beta)}$, i.e.,

$\displaystyle
x_{1,n}<-1<x_{2,n}<z_{1,n-1}<x_{3,n}<\dots<x_{n-1,n}<z_{n-2,n-1}<x_{n,n}<z_{n-1,n-1}.$

##  4 Zeros of $\boldsymbol{P_{n}^{(\alpha,\beta)}}$ and
$\boldsymbol{P_{n-2}^{(\alpha,\beta+t)}}$, $\boldsymbol{t\geq 1}$,
$\boldsymbol{n\in\mathbb{N}}$

For fixed $\alpha>-1$, $-2<\beta<-1$, and fixed $t\geq 1$, the parameter
$\beta+t$ is greater than $-1$ and each sequence of Jacobi polynomials
$\big{\\{}P_{n}^{(\alpha,\beta+t)}\big{\\}}_{n=0}^{\infty}$ is orthogonal on
the interval $(-1,1)$. It is known (see (4) and (5)) that the zeros of the
quasi-orthogonal polynomial $P_{n}^{(\alpha,\beta)}$ interlace with the zeros
of the (orthogonal) polynomial $P_{n-1}^{(\alpha,\beta+1)}$, as well as with
the zeros of the (orthogonal) polynomial $P_{n}^{(\alpha,\beta+1)}$. Here, we
discuss interlacing between the zeros of $P_{n}^{(\alpha,\beta)}$ and the
zeros of the (orthogonal) polynomial $P_{n-2}^{(\alpha,\beta+1)}$. We also
prove that the zeros of $P_{n}^{(\alpha,\beta)}$ and the zeros of
$P_{n-2}^{(\alpha,\beta+t)}$ interlace for continuous variation of $t$, $2\leq
t\leq 4$ and that the polynomials $P_{n}^{(\alpha,\beta)}$ and
$P_{n-2}^{(\alpha,\beta+t)}$ are co-prime for any $t\in[2,4]$

######  Theorem 4.1.

Let $n\in{\mathbb{N}}$, $n\geq 3$, $\alpha$, $\beta$ fixed, $\alpha>-1$,
$-2<\beta<-1$, and suppose
$\big{\\{}P_{n}^{(\alpha,\beta)}\big{\\}}_{n=0}^{\infty}$ is the sequence of
Jacobi polynomials.

  * $(i)$

The $n-2$ distinct zeros of $P_{n-2}^{(\alpha,\beta+1)}$ $($which all lie in
the interval $(-1,1))$ together with the point
$\frac{2(n+\beta)(\alpha+\beta+n)}{(\alpha+\beta+2n)(\alpha+\beta+2n-1)}-1$,
interlace with the $n-1$ distinct zeros of $P_{n}^{(\alpha,\beta)}$ that lie
in $(-1,1)$, provided $P_{n-2}^{(\alpha,\beta+1)}$ and
$P_{n}^{(\alpha,\beta)}$ are co-prime.

  * $(ii)$

For $2\leq t\leq 4$, the $n-2$ distinct zeros of $P_{n-2}^{(\alpha,\beta+t)}$
interlace with the $n-1$ zeros of $P_{n}^{(\alpha,\beta)}$ that lie in
$(-1,1)$.

######  Remark 4.2.

Note that Theorem 4.1(ii) does not assume that $P_{n-2}^{(\alpha,\beta+t)}$
and $P_{n}^{(\alpha,\beta)}$ are co-prime, $2\leq t\leq 4$. This assumption is
not required since the proof will show that $P_{n-2}^{(\alpha,\beta+t)}$ and
$P_{n}^{(\alpha,\beta)}$ are co-prime for every $t$, $2\leq t\leq 4$,
$\alpha>-1$, $-2<\beta<-1$, and $n\in{\mathbb{N}}$.

##  5 Bounds for the smallest zeros of $\boldsymbol{P_{n}^{(\alpha,\beta)}}$,
$\boldsymbol{n\in\mathbb{N}}$

In this section we derive upper and lower bounds for the zero of
$P_{n}^{(\alpha,\beta)}$ that lies outside the interval $(-1,1)$ when
$\alpha>-1$, $-2<\beta<-1$.

######  Theorem 5.1.

Let $n\in{\mathbb{N}}$, $n\geq 3$, $\alpha$, $\beta$ fixed, $\alpha>-1$,
$-2<\beta<-1$. Denote the smallest zero of the Jacobi polynomial
$P_{n}^{(\alpha,\beta)}$ by $x_{1,n}$. Then

$\displaystyle-1+A_{n}<-1+\frac{D_{n}}{C_{n}}<x_{1,n}<-B_{n}<-1,$ (8)

where

$\displaystyle A_{n}=\frac{2(\beta+1)}{2n+\alpha+\beta},$ (9a) $\displaystyle
B_{n}=1-\frac{2(\beta+1)(\beta+2)}{(n+\beta+1)(n+\alpha+\beta+1)},$ (9b)
$\displaystyle C_{n}=(\beta+3)(\alpha+\beta+2)+2(n-1)(n+\alpha+\beta+2),$ (9c)
$\displaystyle D_{n}=2(\beta+1)(\beta+3).$ (9d)

The upper and lower bounds obtained in Theorem 5.1 for the zero of
$P_{n}^{(\alpha,\beta)}$, $\alpha>-1$, $-2<\beta<-1$, that is smaller than
$-1$, approach $-1$ as $n\to\infty$. This is consistent with the observation
that this zero increases with $n$ (cf. Remark 2.5). These bounds for the
smallest zero of a quasi-orthogonal (order 1) Jacobi polynomial are remarkably
good. We provide some numerical examples in Table 1 to illustrate the
inequalities in (8).

Table 1: Bounds for the smallest zero of $P_{15}^{(\alpha,\beta)}(x)$ for different values of $\alpha>-1$ and $-2<\beta<-1$. $\alpha$, $\beta$ | $-1+\frac{D_{n}}{C_{n}}$ | $x_{1,15}$ |  $-B_{n}$3pt3pt
---|---|---|---
$\alpha=0.93$, $\beta=-1.9$ | $-1.0044$ | $-1.00287$ | $-1.00085$
$\alpha=-0.93$, $\beta=-1.9$ | $-1.005$ | $-1.00327$ | $-1.00097$
$\alpha=-0.93$, $\beta=-1.05$ | $-1.0004636$ | $-1.0004635$ | $-1.0045$
$\alpha=0.93$, $\beta=-1.05$ | $-1.0004094$ | $-1.0004088$ | $-1.0004001$
$\alpha=8.3$, $\beta=-1.55$ | $-1.00235$ | $-1.00231$ | $-1.00151$

##  6 Proof of main results

We will make use of the following mixed three term recurrence relations
satisfied by Jacobi polynomials. The relations are derived from contiguous
relations satisfied by ${}_{2}F_{1}$ hypergeometric functions and can easily
be verified by comparing coefficients of powers of $x$ on both sides of the
equations.

######  Lemma 6.1.

Let $\big{\\{}P_{n}^{(\alpha,\beta)}\big{\\}}_{n=0}^{\infty}$,
$n\in\mathbb{N}$ be the sequence of Jacobi polynomials:

$\displaystyle
2n(\alpha+\beta+n)P_{n}^{(\alpha,\beta)}=-(1+x)(\alpha+n-1)(\alpha+\beta+2n)P_{n-2}^{(\alpha,\beta+1)}$
$\displaystyle\qquad{}-[2(\beta+n)(\alpha+\beta+n)-(x+1)(\alpha+\beta+2n-1)(\alpha+\beta+2n)]P_{n-1}^{(\alpha,\beta)},$
(10)
$\displaystyle(x+1)(\alpha+\beta+n+1)P_{n-1}^{(\alpha,\beta+2)}=2nP_{n}^{(\alpha,\beta)}+2(\beta+1)P_{n-1}^{(\alpha,\beta+1)},$
(11)
$\displaystyle\frac{(\beta+n)}{2n}\left(x+1-A_{n}\right)P_{n-1}^{(\alpha,\beta)}=\frac{(x+1)^{2}(\alpha+n-1)}{4n}P_{n-2}^{(\alpha,\beta+2)}+\frac{(\beta+1)}{\alpha+\beta+2n}P_{n}^{(\alpha,\beta)},$
(12)
$\displaystyle\left(x+B_{n}\right)P_{n-1}^{(\alpha,\beta)}-A(x)P_{n}^{(\alpha,\beta)}+\frac{(x+1)^{3}(\alpha+n-1)(\alpha+\beta+2n)}{4(\beta+n)(\beta+n+1)}P_{n-2}^{(\alpha,\beta+3)},$
(13)
$\displaystyle\left(C_{n}(x+1)-D_{n}\right)P_{n-1}^{(\alpha,\beta)}=\frac{(x+1)^{4}E_{n}}{8(n+\beta)(\beta+2)}P_{n-2}^{(\alpha,\beta+4)}-\frac{nB(x)}{2(n+\beta)(\beta+2)}P_{n}^{(\alpha,\beta)},$
(14)

where $A_{n}$, $B_{n}$, $C_{n}$ and $D_{n}$ are given in (9),

$\displaystyle
E_{n}=(2n+\alpha+\beta)(n+\alpha-1)(n+\alpha+\beta+1)(n+\alpha+\beta+2)$

and

$\displaystyle
A(x)=\frac{n(2(\beta+1)(\beta+2)-(n-1)(x+1)(\alpha+n-1))}{(\beta+n)(\beta+n+1)(\alpha+\beta+n+1)},$
$\displaystyle
B(x)=\big{(}\alpha^{2}+5\alpha\beta+7\alpha+4\beta^{3}+24\beta^{2}+39\beta-2n^{3}-3\alpha
n^{2}-5\beta n^{2}-4n^{2}-\alpha^{2}n-5\alpha\beta n$
$\displaystyle\hphantom{B(x)=}{}-4\alpha n+10\beta
n+14n+16\big{)}-2(n-1)(n+\alpha-1)(2n+\alpha+3\beta+4)x$
$\displaystyle\hphantom{B(x)=}{}-(n-1)(n+\alpha-1)(2n+\alpha+\beta)x^{2}.$

######  Proof 6.2 (Proof of Theorem 2.1).

Evaluating the mixed three-term recurrence relation [19, p. 265]

$\displaystyle\frac{1}{2}(2+\alpha+\beta+2n)(x+1)P_{n}^{(\alpha,\beta+1)}(x)=(n+1)P_{n+1}^{(\alpha,\beta)}(x)+(1+\beta+n)P_{n}^{(\alpha,\beta)}(x)$

at successive zeros $x_{i,n}$, $x_{i+1,n}$ of $P_{n}^{(\alpha,\beta)}$,
$i\in\\{1,\dots,n-1\\}$, we obtain

$\displaystyle
4{(n+1)}^{2}P_{n+1}^{(\alpha,\beta)}(x_{i,n})P_{n+1}^{(\alpha,\beta)}(x_{i+1,n})$
$\displaystyle\qquad{}={(2+\alpha+\beta+2n)}^{2}(x_{i,n}+1)(x_{i+1,n}+1)P_{n}^{(\alpha,\beta+1)}(x_{i,n})P_{n}^{(\alpha,\beta+1)}(x_{i+1,n}).$
(15)

Now, from (4), $(1+x_{i,n})(1+x_{i+1,n})<0$ when $i=1$ and
$(1+x_{i,n})(1+x_{i+1,n})>0$ for $i\in\\{2,\dots,n-1\\}$ while
$P_{n}^{(\alpha,\beta+1)}(x_{i,n})P_{n}^{(\alpha,\beta+1)}(x_{i+1,n})<0$ for
$i\in\\{1,2,\dots,n-1\\}$. We deduce from (15) that
$P_{n+1}^{(\alpha,\beta)}(x_{i,n})$ and $P_{n+1}^{(\alpha,\beta)}(x_{i+1,n})$
have the same sign for $i=1$ and differ in sign for $i=2,\dots,n-1$. Since the
zeros are distinct, it follows that $P_{n+1}^{(\alpha,\beta)}$ has an even
number of zeros in the interval $(x_{1,n},x_{2,n})$ and an odd number of zeros
in each of the intervals $(x_{i,n},x_{i+1,n})$, $i\in\\{2,\dots,n-1\\}$.
Therefore $P_{n+1}^{(\alpha,\beta)}$ has at least $n-2$ simple zeros between
$x_{2,n}$ and $x_{n,n}$, plus its smallest zero $x_{1,n+1}$ which is $<-1$
and, from (4) and (5), its largest zero $x_{n+1,n+1}>y_{n,n}>x_{n,n}$.
Therefore, $n$ zeros of $P_{n+1}^{(\alpha,\beta)}$ are accounted for and we
must still have either no zeros or two zeros of $P_{n+1}^{(\alpha,\beta)}$ in
the interval $(x_{1,n},x_{2,n})$ where $x_{1,n}<-1<x_{2,n}$ for each
$n\in{\mathbb{N}}$, $n\geq 1$. Since exactly one of the zeros of
$P_{n+1}^{(\alpha,\beta)}$ is $<-1$ for $n\in{\mathbb{N}}$, $n\geq 1$, the
only possibility is $x_{1,n}<x_{1,n+1}<-1<x_{2,n+1}<x_{2,n}$ which proves the
result.

######  Proof 6.3 (Proof of Theorem 2.8).

It follows from (2) and the assumption that $P_{n}^{(\alpha,\beta)}$ and
$P_{n-2}^{(\alpha,\beta)}$ are co-prime that
$P_{n}^{(\alpha,\beta)}(d_{n})\neq 0$ since $c_{n}$, $e_{n}>0$ provided that
$n\geq 3$. Evaluating (2) at the $n-2$ pairs of successive zeros $x_{i,n}$ and
$x_{i+1,n}$, $i\in\\{2,\dots,n-1\\}$, of $P_{n}^{(\alpha,\beta)}$ that lie in
the interval $(-1,1)$, we obtain

$\displaystyle\frac{P_{n-1}^{(\alpha,\beta)}(x_{i,n})P_{n-1}^{(\alpha,\beta)}(x_{i+1,n})}{P_{n-2}^{(\alpha,\beta)}(x_{i,n})P_{n-2}^{(\alpha,\beta)}(x_{i+1,n})}=\frac{(e_{n})^{2}}{(d_{n}-x_{i,n})(d_{n}-x_{i+1,n})}.$
(16)

The right-hand side of (16) is positive if and only if
$d_{n}\notin(x_{i,n},x_{i+1,n})$, while

$\displaystyle
P_{n-1}^{(\alpha,\beta)}(x_{i,n})P_{n-1}^{(\alpha,\beta)}(x_{i+1,n})<0$

for each $i\in\\{2,\dots,n-1\\}$ since we know from Theorem 2.1 that the zeros
of $P_{n}^{(\alpha,\beta)}$ and $P_{n-1}^{(\alpha,\beta)}$ that lie in the
interval $(-1,1)$ are interlacing. Therefore, from (16),
$P_{n-2}^{(\alpha,\beta)}$ changes sign between each pair of successive zeros
of $P_{n}^{(\alpha,\beta)}$ that lie in $(-1,1)$ except possibly for one pair
$x_{j,n}$, $x_{j+1,n}$, with $x_{j,n}<d_{n}<x_{j+1,n}$,
$j\in\\{2,\dots,n-1\\}$. There are $n-2$ intervals with endpoints at the
successive zeros of $P_{n}^{(\alpha,\beta)}$ that lie in the interval $(-1,1)$
and $P_{n-2}^{(\alpha,\beta)}$ has exactly $n-3$ distinct zeros in $(-1,1)$.
Therefore, the zeros of $P_{n-2}^{(\alpha,\beta)}$ that lie in the interval
$(-1,1)$, together with the point $d_{n}$, must interlace with the $n-1$ zeros
of $P_{n}^{(\alpha,\beta)}$ that lie in $(-1,1)$. The stated interlacing
result follows from Theorem 2.1 since $x_{1,n-2}<x_{1,n}<-1<x_{2,n}$.

######  Proof 6.4 (Proof of Theorem 3.1).

Suppose that $\delta<x_{2,n}$. From [19, equation (11), p. 71],

$\displaystyle(2(\beta+1)+(x+1)(\alpha+\beta+2n+2))P_{n}^{(\alpha,\beta+1)}$
$\displaystyle\qquad{}=(x+1)(\alpha+\beta+n+2)P_{n}^{(\alpha,\beta+2)}+2(\beta+n+1)P_{n}^{(\alpha,\beta)}.$
(17)

Since $P_{n}^{(\alpha,\beta)}$ and $P_{n}^{(\alpha,\beta+1)}$ are co-prime for
each $n\in{\mathbb{N}}$ and each fixed $\alpha$, $\beta$, $\alpha>-1$,
$-2<\beta<-1$ by (4), it follows from (17) that the only possible common zero
of $P_{n}^{(\alpha,\beta)}$ and $P_{n}^{(\alpha,\beta+2)}$ is
$\delta:=-1-\frac{2(\beta+1)}{\alpha+\beta+2n+2}$. If $\delta<x_{2,n}$ then
$P_{n}^{(\alpha,\beta)}$ and $P_{n}^{(\alpha,\beta+2)}$ are co-prime since all
the zeros of $P_{n}^{(\alpha,\beta+2)}$ lie in $(-1,1)$ and $x_{2,n}$ is the
smallest zero of $P_{n}^{(\alpha,\beta)}$ in $(-1,1)$. Evaluating (17) at
successive zeros $x_{1,n}<-1<x_{2,n}<\dots<x_{n,n}<1$ of
$P_{n}^{(\alpha,\beta)}$ we obtain, for each $i\in\\{1,2,\dots,n-1\\}$,

$\displaystyle(x_{i,n}+1)(x_{i+1,n}+1)P_{n}^{(\alpha,\beta+2)}(x_{i,n})P_{n}^{(\alpha,\beta+2)}(x_{i+1,n}){(\alpha+\beta+n+2)}^{2}$
$\displaystyle\qquad{}={(\alpha+\beta+2n+2)}^{2}(x_{i,n}-\delta)(x_{i+1,n}-\delta)P_{n}^{(\alpha,\beta+1)}(x_{i,n})P_{n}^{(\alpha,\beta+1)}(x_{i+1,n}).$
(18)

Now, from (4), $(x_{i,n}+1)(x_{i+1,n}+1)<0$ when $i=1;$
$(x_{i,n}+1)(x_{i+1,n}+1)>0$ for $i=2,3,\dots,n-1$ and
$P_{n}^{(\alpha,\beta+1)}(x_{i,n})P_{n}^{(\alpha,\beta+1)}(x_{i+1,n})<0$ for
each $i=1,2,\dots,n-1$. Since $x_{1,n}<-1<\delta<x_{2,n}$ by assumption, we
deduce from (18) that $P_{n}^{(\alpha,\beta+2)}(x_{i,n})$ and
$P_{n}^{(\alpha,\beta+2)}(x_{i+1,n})$ differ in sign for each
$i=1,2,\dots,n-1$. It follows that $P_{n}^{(\alpha,\beta+2)}$ has an odd
number of zeros in each one of the intervals $(x_{i,n},x_{i+1,n})$ for
$i=1,2,3,\dots,n-1$. Also, from (4), $x_{n,n}<z_{n,n}$ where
$z_{1,n}<z_{2,n}<\dots<z_{n,n}$ are the zeros of $P_{n}^{(\alpha,\beta+2)}$.
It follows that the zeros of $P_{n}^{(\alpha,\beta)}$ and
$P_{n}^{(\alpha,\beta+2)}$ are interlacing.

Suppose that $\delta>x_{2,n}$. A similar analysis of (18) shows that
$P_{n}^{(\alpha,\beta+2)}$ has the same sign at the smallest two zeros
$x_{1,n}$ and $x_{2,n}$ of $P_{n}^{(\alpha,\beta)}$ and therefore an even
number of zeros in the interval $(x_{1,n},x_{2,n})$, which shows that
interlacing does not hold. Obviously, if $\delta=x_{2,n}$ then $\delta$ is a
common zero of $P_{n}^{(\alpha,\beta)}$ and $P_{n}^{(\alpha,\beta+2)}$ so
interlacing does not hold. This completes the proof.

######  Proof 6.5 (Proof of Theorem 3.3).

Evaluating (17) at successive zeros $z_{i,n}$, $z_{i+1,n}$ of
$P_{n}^{(\alpha,\beta+2)}$, we have, for each $i\in\\{1,2,\dots,n-1\\}$,

$\displaystyle
4{(\beta+n+1)}^{2}P_{n}^{(\alpha,\beta)}(z_{i,n})P_{n}^{(\alpha,\beta)}(z_{i+1,n})$
$\displaystyle\qquad{}={(\alpha+\beta+2n+2)}^{2}(z_{i,n}-\delta)(z_{i+1,n}-\delta)P_{n}^{(\alpha,\beta+1)}(z_{i,n})P_{n}^{(\alpha,\beta+1)}(z_{i+1,n}).$

From [12, Theorem 2.4] we know that if $y_{1,n}<y_{2,n}<\dots<y_{n,n}$ denote
the zeros of $P_{n}^{(\alpha,\beta+1)}$, then

$\displaystyle-1<y_{1,n}<z_{1,n}<y_{2,n}<z_{2,n}<\dots<y_{n,n}<z_{n,n}<1,$
(19)

so that
$P_{n}^{(\alpha,\beta+1)}(z_{i,n})P_{n}^{(\alpha,\beta+1)}(z_{i+1,n})<0$ for
each $i=1,2,\dots,n-1$, while $(z_{i,n}-\delta)(z_{i+1,n}-\delta)>0$ unless
$\delta\in(z_{i,n},z_{i+1,n})$. This means that there are two possibilities:
(a) $P_{n}^{(\alpha,\beta)}$ has $n-1$ sign changes between successive zeros
of $P_{n}^{(\alpha,\beta+2)}$ in $(-1,1)$ and
$\delta\notin(z_{i,n},z_{i+1,n})$ for any $i\in\\{1,2,\dots,n-1\\}$; or (b)
$P_{n}^{(\alpha,\beta)}$ has $n-2$ sign changes between successive zeros of
$P_{n}^{(\alpha,\beta+2)}$ in $(-1,1)$ and $\delta$ lies in one interval, say
$\delta\in(z_{j,n},z_{j+1,n})$ where $j\in\\{1,2,\dots,n-1\\}$. If (a) holds
then since $P_{n}^{(\alpha,\beta)}$ has exactly $n-1$ simple zeros in
$(-1,1)$, these zeros, together with the point $\delta$, interlace with the
zeros of $P_{n}^{(\alpha,\beta+2)}$ in $(-1,1)$. If, on the other hand, (b)
holds then $P_{n}^{(\alpha,\beta)}$ has no sign change, and therefore an even
number of zeros, in the interval $(z_{j,n},z_{j+1,n})$ that contains $\delta$.
Since $P_{n}^{(\alpha,\beta)}$ has exactly $n-1$ simple zeros in $(-1,1)$ and
$n-2$ sign changes in $(-1,1)$, we deduce that no zero of
$P_{n}^{(\alpha,\beta)}$ lies in the interval $(z_{j,n},z_{j+1,n})$ that
contains $\delta$ and one zero of $P_{n}^{(\alpha,\beta)}$ is either
$<z_{1,n}$ or $>z_{n,n}$. Since we know from (4) that the largest zero
$x_{n,n}$ of $P_{n}^{(\alpha,\beta)}$ satisfies $x_{n,n}<y_{n,n}$ while from
(19) $y_{n,n}<z_{n,n}$, the only possibility is that the smallest zero
$x_{2,n}$ of $P_{n}^{(\alpha,\beta)}$ in $(-1,1)$ is $<z_{1,n}$. Therefore,
the zeros of $(x-\delta)P_{n}^{(\alpha,\beta)}(x)$ interlace with the zeros of
$P_{n}^{(\alpha,\beta+2)}(x)$ and the result follows.

######  Proof 6.6 (Proof of Theorem 3.4).

Evaluating (11) at successive zeros $x_{i,n}$, $x_{i+1,n}$,
$i\in\\{1,2,\dots,n-1\\}$ of $P_{n}^{(\alpha,\beta}$ we obtain

$\displaystyle(x_{i,n}+1)(x_{i+1,n}+1)(\alpha+\beta+n+1)^{2}P_{n-1}^{(\alpha,\beta+2)}(x_{i,n})P_{n-1}^{(\alpha,\beta+2)}(x_{i+1,n})$
$\displaystyle\qquad{}=4(\beta+1)^{2}P_{n-1}^{(\alpha,\beta+1)}(x_{i,n})P_{n-1}^{(\alpha,\beta+1)}(x_{i+1,n}).$

From (5) with $n$ replaced by $n-1$ we have
$P_{n-1}^{(\alpha,\beta+1)}(x_{i,n})P_{n-1}^{(\alpha,\beta+1)}(x_{i+1,n})<0$
while $(1+x_{i,n})(1+x_{i+1,n})<0$ for $i=1$ and $>0$ for
$i\in\\{2,3,\dots,n-1\\}$. Therefore
$P_{n-1}^{(\alpha,\beta+2)}(x_{i,n})P_{n-1}^{(\alpha,\beta+2)}(x_{i+1,n}){<}0$
for each $i\in\\{2,3,\dots,n-1\\}$. Hence $P_{n-1}^{(\alpha,\beta+2)}$ has an
even number of sign changes in $(x_{1,n},x_{2,n})$ and an odd number of sign
changes in $(x_{i,n},x_{i+1,n})$ for $i\in\\{2,3\dots,n-1\\}$. Since
$P_{n-1}^{(\alpha,\beta+2)}$ has $n-1$ distinct zeros, there must be exactly
one zero of $P_{n-1}^{(\alpha,\beta+2)}$ in each of the $n-2$ intervals
$(x_{i,n},x_{i+1,n})$, $i\in\\{2,3\dots,n-1\\}$. The remaining zero of
$P_{n-1}^{(\alpha,\beta+2)}$ must lie in $(-1,1)$ and cannot lie in the
interval $(-1,x_{2,n})$. Therefore the only possibility is that the largest
zero $z_{n-1,n-1}$ of $P_{n-1}^{(\alpha,\beta+2)}$ is $>x_{n,n}$.

######  Proof 6.7 (Proof of Theorem 4.1).

(i) We can write (10) as

$\displaystyle(k_{1}-(x+1)k_{2})P_{n-1}^{(\alpha,\beta)}(x)=-(1+x)k_{3}P_{n-2}^{(\alpha,\beta+1)}(x)-k_{4}P_{n}^{(\alpha,\beta)}(x).$
(20)

Let $x_{i,n}$, $i\in\\{1,2,\dots,n\\}$ denote the zeros of
$P_{n}^{(\alpha,\beta)}$ in ascending order. Note that
$(1+x_{i,n})\neq\frac{k_{1}}{k_{2}}$ for any $i\in\\{1,\dots,n\\}$ since that
would contradict the assumption that $P_{n}^{(\alpha,\beta)}$ and
$P_{n-2}^{(\alpha,\beta+1)}$ are co-prime. Evaluating (20) at each pair of
zeros $x_{i,n}$ and $x_{i+1,n}$, $i\in\\{2,\dots,n-1\\}$, of
$P_{n}^{(\alpha,\beta)}$ that lie in the interval $(-1,1)$, we obtain

$\displaystyle\frac{P_{n-1}^{(\alpha,\beta)}(x_{i,n})P_{n-1}^{(\alpha,\beta)}(x_{i+1,n})}{P_{n-2}^{(\alpha,\beta+1)}(x_{i,n})P_{n-2}^{(\alpha,\beta+1)}(x_{i+1,n})}=\frac{(1+x_{i,n})(1+x_{i+1,n})k_{3}^{2}}{(k_{1}-(x_{i,n}+1)k_{2})(k_{1}-(x_{i+1,n}+1)k_{2})}.$
(21)

Since $(1+x_{i,n})$ and $(1+x_{i+1,n})$ are positive for
$i\in\\{2,\dots,n-1\\}$, the right-hand side of (21) is positive if and only
if $\frac{k_{1}}{k_{2}}-1\notin(x_{i,n},x_{i+1,n})$ for any
$i\in\\{2,\dots,n-1\\}$. Suppose, now, that
$\frac{k_{1}}{k_{2}}-1\notin(x_{i,n},x_{i+1,n})$ for any
$i\in\\{2,\dots,n-1\\}$. Since the zeros $x_{i,n-1}$, $i\in\\{2,\dots,n-1\\}$
of $P_{n-1}^{(\alpha,\beta)}$ interlace with the zeros $x_{i,n}$,
$i\in\\{2,\dots,n\\}$ of $P_{n}^{(\alpha,\beta)}$, $\alpha>-1$, $-2<\beta<-1$
(Theorem 2.1), we see from (21) that
$P_{n-1}^{(\alpha,\beta)}(x_{i,n})P_{n-1}^{(\alpha,\beta)}(x_{i+1,n})<0$ for
each $i\in\\{2,\dots,n-1\\}$, $n\in{\mathbb{N}}$, $n\geq 2$. Therefore if
$\frac{k_{1}}{k_{2}}-1\notin(x_{i,n},x_{i+1,n})$ for any
$i\in\\{2,\dots,n-1\\}$, the $n-2$ distinct zeros of
$P_{n-2}^{(\alpha,\beta+1)}$ in $(-1,1)$ interlace with the $n-1$ zeros of
$P_{n}^{(\alpha,\beta)}$ that lie in $(-1,1)$. Further, by our assumption, the
point $\frac{k_{1}}{k_{2}}-1$ lies outside the interval with endpoints at the
smallest positive zero $x_{2,n}$ of $P_{n}^{(\alpha,\beta)}$ and its largest
zero $x_{n,n}$ so interlacing holds between the $n-2$ simple zeros of
$P_{n-2}^{(\alpha,\beta+1)}$ together with the point $\frac{k_{1}}{k_{2}}-1$
and the $n-1$ zeros of $P_{n}^{(\alpha,\beta)}$ that lie in $(-1,1)$. Suppose
now that $\frac{k_{1}}{k_{2}}-1\in(x_{i,n},x_{i+1,n})$ for some
$i\in\\{2,\dots,n-1\\}$. Then, in this single interval say
$(x_{j,n},x_{j+1,n})$ containing $\frac{k_{1}}{k_{2}}-1$, there will be no
sign change of $P_{n-1}^{(\alpha,\beta)}$ but its sign will change in each of
the remaining $n-3$ intervals with endpoints at the successive zeros of
$P_{n}^{(\alpha,\beta)}$. However, evaluating (20) at $x_{1,n}$ and $x_{2,n}$,
we obtain

$\displaystyle\frac{P_{n-1}^{(\alpha,\beta)}(x_{1,n})P_{n-1}^{(\alpha,\beta)}(x_{2,n})}{P_{n-2}^{(\alpha,\beta+1)}(x_{1,n})P_{n-2}^{(\alpha,\beta+1)}(x_{2,n})}=\frac{(1+x_{1,n})(1+x_{2,n})k_{2}^{2}k_{3}^{2}}{(\frac{k_{1}}{k_{2}}-1-x_{1,n})(\frac{k_{1}}{k_{2}}-1-x_{2,n})}.$
(22)

Now $\frac{k_{1}}{k_{2}}-1\in(x_{i,n},x_{i+1,n})$ for some
$i\in\\{2,\dots,n-1\\}$ so $\frac{k_{1}}{k_{2}}-1\notin(x_{1,n},x_{2,n})$. The
right-hand side of (22) is therefore negative while, from Theorem 2.1 with $n$
replaced by $n-1$, we know that
$P_{n-1}^{(\alpha,\beta)}(x_{1,n})P_{n-1}^{(\alpha,\beta)}(x_{2,n})>0$.
Therefore $P_{n-2}^{(\alpha,\beta+1)}$ has a different sign at $x_{1,n}$ and
$x_{2,n}$ and therefore one zero greater that $-1$ but less than $x_{2,n}$. We
can therefore deduce that in each case, the $n-2$ simple zeros of
$P_{n-2}^{(\alpha,\beta+1)}$, together with the point $\frac{k_{1}}{k_{2}}-1$,
interlace with the $n-1$ zeros of $P_{n}^{(\alpha,\beta)}$ in $(-1,1)$ if
$P_{n-2}^{(\alpha,\beta+1)}$ and $P_{n}^{(\alpha,\beta)}$ are co-prime.

(ii) Since the zeros of $P_{n-2}^{(\alpha,\beta+t)}$ are increasing functions
of $t$ for $2\leq t\leq 4$ [22, Theorem 6.21.1], it will be sufficient to
prove (ii) in the two special cases $t=2$ and $t=4$. For the case $t=2$, we
note that since the polynomials $P_{n}^{(\alpha,\beta)}$ and
$P_{n-1}^{(\alpha,\beta)}$ are co-prime (7), it follows from (12) that the
only possible common zero of $P_{n-2}^{(\alpha,\beta+2)}$ and
$P_{n}^{(\alpha,\beta)}$ is $-1+\frac{2(\beta+1)}{\alpha+\beta+2n}$ which is
$<-1$ for each $\alpha$, $\beta$, $\alpha>-1$, $-2<\beta<-1$. Since all of the
zeros of $P_{n-2}^{(\alpha,\beta+2)}$ lie in the interval $(-1,1)$,
$P_{n-2}^{(\alpha,\beta+2)}$ and $P_{n}^{(\alpha,\beta)}$ are co-prime for
$\alpha>-1$, $-2<\beta<-1$. Evaluating (12) at the $n-2$ pairs of successive
zeros $x_{i,n}$ and $x_{i+1,n}$, $i\in\\{2,\dots,n-1\\}$ of
$P_{n}^{(\alpha,\beta)}$ that lie in $(-1,1)$ yields

$\displaystyle\frac{P_{n-1}^{(\alpha,\beta)}(x_{i,n})P_{n-1}^{(\alpha,\beta)}(x_{i+1,n})}{P_{n-2}^{(\alpha,\beta+2)}(x_{i,n})P_{n-2}^{(\alpha,\beta+2)}(x_{i+1,n})}$
$\displaystyle\qquad{}=\frac{(x_{i,n}+1)^{2}(x_{i+1,n}+1)^{2}(\alpha+n-1)^{2}(\alpha+\beta+2n)^{2}}{4(\beta+n)^{2}(2n+\alpha+\beta)^{2}(x_{i,n}+1-A_{n})(x_{i+1,n}+1-A_{n})}.$
(23)

The right-hand side of (23) is positive since
$\frac{2(\beta+1)}{\alpha+\beta+2n}\notin(1+x_{i,n},1+x_{i+1,n})$ for any
$i\in\\{2,\dots$, $n-1\\}$. By Theorem 2.1,
$P_{n-1}^{(\alpha,\beta)}(x_{i,n})P_{n-1}^{(\alpha,\beta)}(x_{i+1,n}){<}0$ and
hence
$P_{n-2}^{(\alpha,\beta+2)}(x_{i,n})P_{n-2}^{(\alpha,\beta+2)}(x_{i+1,n}){<}0$
for each $i\in\\{2,\dots,n-1\\}$, and, for $t=2$, the interlacing result
follows.

For the case $t=4$, since $P_{n}^{(\alpha,\beta)}$ and
$P_{n-1}^{(\alpha,\beta)}$ are co-prime, (14) implies that the only possible
common zero of $P_{n-2}^{(\alpha,\beta+4)}$ and $P_{n}^{(\alpha,\beta)}$ is
$-1+\frac{D_{n}}{C_{n}}$. Since $D_{n}<0$ and $C_{n}>0$ for each $\alpha$,
$\beta$ with $\alpha>-1$, $-2<\beta<-1$, and $n\geq 3$, it follows that
$-1+\frac{D_{n}}{C_{n}}<-1$ and therefore, since all of the zeros of
$P_{n-2}^{(\alpha,\beta+4)}$ lie in $(-1,1)$, $P_{n-2}^{(\alpha,\beta+4)}$ and
$P_{n}^{(\alpha,\beta)}$ are co-prime for $\alpha>-1$, $-2<\beta<-1$.
Evaluating (14) at the $n-2$ pairs of successive zeros $x_{i,n}$ and
$x_{i+1,n}$, $i\in\\{2,\dots,n-1\\}$ of $P_{n}^{(\alpha,\beta)}$ that lie in
$(-1,1)$,

$\displaystyle\frac{P_{n-1}^{(\alpha,\beta)}(x_{i,n})P_{n-1}^{(\alpha,\beta)}(x_{i+1,n})}{P_{n-2}^{(\alpha,\beta+4)}(x_{i,n})P_{n-2}^{(\alpha,\beta+4)}(x_{i+1,n})}$
$\displaystyle\qquad{}=\frac{(x_{i,n}+1)^{4}(x_{i+1,n}+1)^{4}E_{n}^{2}}{64(n+\beta)^{2}(\beta+2)^{2}(C_{n}(x_{i,n}+1)+D_{n})(C_{n}(x_{i+1,n}+1)+D_{n})}.$
(24)

The right-hand side of (24) is positive since
$\frac{D_{n}}{C_{n}}\notin(1+x_{i,n},1+x_{i+1,n})$ for
$i\in\\{2,\dots,n-1\\}$. By Theorem 2.1,
$P_{n-1}^{(\alpha,\beta)}(x_{i,n})P_{n-1}^{(\alpha,\beta)}(x_{i+1,n})<0$ and
hence
$P_{n-2}^{(\alpha,\beta+4)}(x_{i,n})P_{n-2}^{(\alpha,\beta+4)}(x_{i+1,n})<0$
for each $i\in\\{2,\dots,n-1\\}$, and, for $t=4$, the interlacing result
follows.

######  Proof 6.8 (Proof of Theorem 5.1).

Let $x_{1,n}$ and $y_{1,n-2}^{(\alpha,\beta+t)}$, $t\in\\{2,3,4\\}$ denote the
smallest zero of $P_{n}^{(\alpha,\beta)}$ and $P_{n-2}^{(\alpha,\beta+t)}$
respectively. It follows from (7), Theorem 4.1(ii) and the monotonicity of the
zeros of Jacobi polynomials (cf. [15, Theorem 7.1.2]) that

$\displaystyle
x_{1,n-1}<x_{1,n}<-1<x_{2,n}<y_{1,n-2}^{(\alpha,\beta+2)}<y_{1,n-2}^{(\alpha,\beta+3)}<y_{1,n-2}^{(\alpha,\beta+4)}.$
(25)

Since $\lim\limits_{x\to-\infty}P_{n}^{(\alpha,\beta)}(x)=\infty$ for $n$
even, while $\lim\limits_{x\to-\infty}P_{n}^{(\alpha,\beta)}(x)=-\infty$ for
$n$ odd, we deduce from (25) that

$\displaystyle\frac{P_{n-2}^{(\alpha,\beta+t)}(x_{1,n})}{P_{n-1}^{(\alpha,\beta)}(x_{1,n})}>0\qquad\text{for}\quad
t\in\\{2,3,4\\}.$ (26)

Evaluating (12) at $x_{1,n}$, we obtain

$\displaystyle\frac{P_{n-2}^{(\alpha,\beta+2)}(x_{1,n})}{P_{n-1}^{(\alpha,\beta)}(x_{1,n})}=\frac{2(\beta+n)((x_{1,n}+1)(2n+\alpha+\beta)-2(\beta+1))}{(x_{1,n}+1)^{2}(n+\alpha-1)(2n+\alpha+\beta)}$

and therefore it follows from (26) that
$(x_{1,n}+1)(2n+\alpha+\beta)-2(\beta+1)>0$ for $n\geq 3$. This yields the
bound

$\displaystyle x_{1,n}>\frac{2(\beta+1)}{2n+\alpha+\beta}-1.$

Next, evaluating (13) at $x_{1,n}$ we obtain

$\displaystyle\frac{P_{n-2}^{(\alpha,\beta+3)}(x_{1,n})}{P_{n-1}^{(\alpha,\beta)}(x_{1,n})}=\frac{4(n+\beta)(n+\beta+1)(x_{1,n}+B_{n})}{(x_{1,n}+1)^{3}(n+\alpha-1)(2n+\alpha+\beta)}.$
(27)

Since the left hand side of (27) is positive by (26), $(x_{1,n}+1)^{3}<0$ by
(4) and $B_{n}>1$ for $n\geq 3$, $\alpha>-1$, $-2<\beta<-1$, we see that
$x_{1,n}<-B_{n}<-1$.

Evaluating (14) at $x_{1,n}$ we obtain

$\displaystyle\frac{P_{n-2}^{(\alpha,\beta+4)}(x_{1,n})}{P_{n-1}^{(\alpha,\beta)}(x_{1,n})}=\frac{8(n+\beta)(\beta+2)(C_{n}(x_{1,n}+1)-D_{n})}{(x_{1,n}+1)^{4}E_{n}}$

and it follows from (26) that $C_{n}(x_{1,n}+1)-D_{n}>0$.

Finally, since $C_{n}-(\beta+3)(2n+\alpha+\beta)=2(n-1)(n+\alpha-1)>0$ for
$n\geq 3$ and $\alpha>-1$, we see that

$\displaystyle-1+\frac{2(\beta+1)}{2n+\alpha+\beta}<-1+\frac{2(\beta+1)(\beta+3)}{C_{n}}$

for each $n\geq 3$, $\alpha>-1$ and $-2<\beta<-1$.

### Acknowledgments

The research of both authors was funded by the National Research Foundation of
South Africa. We thank the referees for helpful suggestions and insights.

## References

  * [1] Area I., Godoy E., Ronveaux A., Zarzo A., Solving connection and linearization problems within the Askey scheme and its $q$-analogue via inversion formulas, J. Comput. Appl. Math. 133 (2001), 151–162.
  * [2] Askey R.A., Orthogonal expansions with positive coefficients, Proc. Amer. Math. Soc. 16 (1965), 1191–1194.
  * [3] Askey R.A., Graphs as an aid to understanding special functions, in Asymptotic and computational analysis (Winnipeg, MB, 1989), Lecture Notes in Pure and Appl. Math., Vol. 124, Dekker, New York, 1990, 3–33.
  * [4] Branquinho A., Huertas E.J., Rafaeli F.R., Zeros of orthogonal polynomials generated by the Geronimus perturbation of measures, in Computational Science and its Applications – ICCSA 2014, Part I, Lecture Notes in Comput. Sci., Vol. 8579, Springer, Cham, 2014, 44–59, arXiv:1402.6256.
  * [5] Brezinski C., Driver K.A., Redivo-Zaglia M., Quasi-orthogonality with applications to some families of classical orthogonal polynomials, Appl. Numer. Math. 48 (2004), 157–168.
  * [6] Bustamante J., Martínez-Cruz R., Quesada J.M., Quasi orthogonal Jacobi polynomials and best one-sided $L_{1}$ approximation to step functions, J. Approx. Theory 198 (2015), 10–23.
  * [7] Chihara T.S., On quasi-orthogonal polynomials, Proc. Amer. Math. Soc. 8 (1957), 765–767.
  * [8] Dickinson D., On quasi-orthogonal polynomials, Proc. Amer. Math. Soc. 12 (1961), 185–194.
  * [9] Dimitrov D.K., Connection coefficients and zeros of orthogonal polynomials, J. Comput. Appl. Math. 133 (2001), 331–340.
  * [10] Dimitrov D.K., Ismail M.E.H., Rafaeli F.R., Interlacing of zeros of orthogonal polynomials under modification of the measure, J. Approx. Theory 175 (2013), 64–76.
  * [11] Draux A., On quasi-orthogonal polynomials, J. Approx. Theory 62 (1990), 1–14.
  * [12] Driver K., Jordaan K., Mbuyi N., Interlacing of the zeros of Jacobi polynomials with different parameters, Numer. Algorithms 49 (2008), 143–152.
  * [13] Driver K., Muldoon M.E., Common and interlacing zeros of families of Laguerre polynomials, J. Approx. Theory 193 (2015), 89–98.
  * [14] Fejér L., Mechanische Quadraturen mit positiven Cotesschen Zahlen, Math. Z. 37 (1933), 287–309.
  * [15] Ismail M.E.H., Classical and quantum orthogonal polynomials in one variable, Encyclopedia of Mathematics and its Applications, Vol. 98, Cambridge University Press, Cambridge, 2005.
  * [16] Maroni P., Une caractérisation des polynômes orthogonaux semi-classiques, C. R. Acad. Sci. Paris Sér. I Math. 301 (1985), 269–272.
  * [17] Maroni P., Prolégomènes à l’étude des polynômes orthogonaux semi-classiques, Ann. Mat. Pura Appl. 149 (1987), 165–184.
  * [18] Maroni P., Une théorie algébrique des polynômes orthogonaux. Application aux polynômes orthogonaux semi-classiques, in Orthogonal Polynomials and their Applications (Erice, 1990), IMACS Ann. Comput. Appl. Math., Vol. 9, Baltzer, Basel, 1991, 95–130.
  * [19] Rainville E.D., Special functions, The Macmillan Co., New York, 1960.
  * [20] Riesz M., Sur le problème des moments. III, Ark. Mat. Astron. Fys. 17 (1923), 1–52.
  * [21] Shohat J., On mechanical quadratures, in particular, with positive coefficients, Trans. Amer. Math. Soc. 42 (1937), 461–496.
  * [22] Szegő G., Orthogonal polynomials, American Mathematical Society, Colloquium Publications, Vol. 23, 4th ed., Amer. Math. Soc., Providence, R.I., 1975.
  * [23] Szwarc R., Connection coefficients of orthogonal polynomials, Canad. Math. Bull. 35 (1992), 548–556.
  * [24] Trench W.F., Nonnegative and alternating expansions of one set of orthogonal polynomials in terms of another, SIAM J. Math. Anal. 4 (1973), 111–115.
  * [25] Trench W.F., Proof of a conjecture of Askey on orthogonal expansions with positive coefficients, Bull. Amer. Math. Soc. 81 (1975), 954–956.
  * [26] Wilson M.W., Nonnegative expansions of polynomials, Proc. Amer. Math. Soc. 24 (1970), 100–102.
  * [27] Zhedanov A., Rational spectral transformations and orthogonal polynomials, J. Comput. Appl. Math. 85 (1997), 67–86.


# Deep-learning assisted detection and quantification of (oo)cysts of Giardia
and Cryptosporidium on smartphone microscopy images

Suprim Nakarmi
NepAl Applied Mathematics and Informatics Institute for research (NAAMII),
Kathmandu, Nepal
Center for Analytical Sciences, Kathmandu Institute of Applied Sciences
(KIAS), Lalitpur, Nepal Sanam Pudasaini
Center for Analytical Sciences, Kathmandu Institute of Applied Sciences
(KIAS), Lalitpur, Nepal Safal Thapaliya
NepAl Applied Mathematics and Informatics Institute for research (NAAMII),
Kathmandu, Nepal Pratima Upretee
NepAl Applied Mathematics and Informatics Institute for research (NAAMII),
Kathmandu, Nepal Retina Shrestha
Center for Analytical Sciences, Kathmandu Institute of Applied Sciences
(KIAS), Lalitpur, Nepal Basant Giri
Center for Analytical Sciences, Kathmandu Institute of Applied Sciences
(KIAS), Lalitpur, Nepal Bhanu Bhakta Neupane
Center for Analytical Sciences, Kathmandu Institute of Applied Sciences
(KIAS), Lalitpur, Nepal
Central Department of Chemistry, Tribhuvan University, Kathmandu, Nepal
Bishesh Khanal
NepAl Applied Mathematics and Informatics Institute for research (NAAMII),
Kathmandu, Nepal

###### Abstract

The consumption of microbial-contaminated food and water is responsible for
the deaths of millions of people annually. Smartphone-based microscopy systems
are portable, low-cost, and more accessible alternatives for the detection of
_Giardia_ and _Cryptosporidium_ than traditional brightfield microscopes.
However, the images from smartphone microscopes are noisier and require manual
cyst identification by trained technicians, usually unavailable in resource-
limited settings. Automatic detection of (oo)cysts using deep-learning-based
object detection could offer a solution for this limitation. We evaluate the
performance of three state-of-the-art object detectors to detect (oo)cysts of
_Giardia_ and _Cryptosporidium_ on a custom dataset that includes both
smartphone and brightfield microscopic images from vegetable samples. Faster
RCNN, RetinaNet, and you only look once (YOLOv8s) deep-learning models were
employed to explore their efficacy and limitations. Our results show that
while the deep-learning models perform better with the brightfield microscopy
image dataset than the smartphone microscopy image dataset, the smartphone
microscopy predictions are still comparable to the prediction performance of
non-experts.

##  1 Introduction

Pathogen contamination of food and water is a serious global challenge. About
$2$ billion people do not have access to feces-free drinking water in the
world111https://www.who.int/news-room/fact-sheets/detail/drinking-water. Such
contaminated food and water can often lead to diarrhea. According to the World
Health Organization (WHO), diarrhoeal diseases account for the loss of around
half a million human lives annually. Similarly, nearly $0.5$ million people
fall ill due to the consumption of contaminated food, resulting in more than
two hundred thousand deaths every year222https://www.who.int/news-room/fact-
sheets/detail/food-safety. _Giardia_ and _Cryptosporidium_ are two of the
major causes of protozoan-induced diarrheal diseases and are the most
frequently identified protozoan parasites causing outbreaks (Baldursson and
Karanis, 2011)††footnotemark: . In low- and middle-income countries, children
under three years of age experience three episodes of diarrhea on average
every year333https://www.who.int/news-room/fact-sheets/detail/diarrhoeal-
disease. _Giardia_ and _Cryptosporidium_ cause intestinal illness called
giardiasis and cryptosporidiosis, respectively. Infections due to
_Cryptosporidium_ and _Giardia_ are more common in low- and middle-income
countries because of unhygienic lifestyles, and poor sanitation (Fricker et
al., 2002; Gupta et al., 2020; Tandukar et al., 2013; Sherchand et al., 2004).
_Giardia_ is more prominent in size with an elliptical shape having a major
axis 8-12 µm and minor axis 7-15 µm. In contrast, _Cryptosporidium_ is
spherically shaped, having a diameter of 3-6 µm (Dixon et al., 2011). Accurate
detection of these microorganisms could enable early diagnosis, saving
millions of lives. Moreover, regularly screening these pathogens in real food
and water samples could help prevent infections and disease outbreaks.

Polymerase chain reaction (PCR), immunological assays, cell culture methods,
fluorescence in situ hybridization, and microscopic analysis (Van den Bossche
et al., 2015; Adeyemo et al., 2018) are the main methods for the detection of
(oo)cysts of _Giardia_ and _Cryptosporidium_. Even though these methods are
reliable and accurate, they are laborious, time-consuming, costly, and require
significant expertise, resulting in a lack of tests needed in many resource-
limited regions. For instance, cell culture requires more than $24$ hours, and
immunological assays and PCR reactions require costly reagents and equipment
(Guerrant et al., 1985, 2001). In addition, some viable bacterial pathogens
are difficult to grow or are even non-culturable (Oliver, 2005). Fluorescence
tagging of cells requires expertise, and the cost of reagents is high.
Microscopic methods are the most widely used diagnostic methods for detecting
parasites, especially in low-resource countries. The microscopic method
examines a glass slide containing a sample under a microscope. However, the
traditional microscopes are still costly, less portable, and require expertise
to handle and accurately identify microorganisms on the slides (Chavan and
Sutkar, 2014). Recently, smartphone-based microscopic methods have been
developed to potentially replace or supplement more expensive and less
portable microscopic methods, including the brightfield and fluorescence
microscopy (Koydemir et al., 2015; Kobori et al., 2016; Kim et al., 2015;
Saeed and Jabbar, 2018; Shrestha et al., 2020; Feng et al., 2016). These
microscopes allow magnification of microorganisms enabling the user to observe
them on the phone screen immediately and capture the images and videos using
the smartphone. However, smartphone microscopy also requires a well-trained
person to identify target organisms accurately, analyze the result, and report
it. In the least developed countries, the lack of skilled technicians limits
the use of such a new microscopic system for rapid field testing and clinical
applications. Therefore, robust and automated detection of microorganisms
using smartphone microscopic images could enable more widespread use of
smartphone microscopes in large-scale screening of parasites.

In recent years, several deep learning-based algorithms have been developed
for various biological and clinical applications such as automatic detection,
segmentation, and classification of human cells and fungi species (Xue and
Ray, 2017; Zieliński et al., 2020), bacteria (Wang et al., 2020), malaria
detection (Vijayalakshmi et al., 2020), image segmentation of two-dimensional
materials in microscopic images (Masubuchi et al., 2020). In addition,
detecting a pollen grain from microscopy images using a deep neural network
has been reported (Gallardo-Caballero et al., 2019). de Haan et al. (2020)
automated the screening of sickle cells using deep learning on a smartphone-
based microscope. Similarly, Xu et al. (2020) proposed ParasNet - a deep-
learning-based network - to detect _Giardia_ and _Cryptosporidium_ in
brightfield microscopic images. Luo et al. (2021) created MCellNet to classify
_Giardia_ , _Cryptosporidium_ , microbeads, and natural pollutants from the
images captured from imaging flow cytometry. Machine learning techniques have
also been developed to classify _Giardia_ from other parasites using features
such as area, equivalent diameter, and intensity in fluorescent smartphone-
based microscopic images (Koydemir et al., 2015). Several other studies have
proposed deep learning-based algorithms to automate microorganism detection in
smartphone microscopes (de Haan et al., 2020; Fuhad et al., 2020; Yang et al.,
2019). However, it is not clear how well state-of-the-art deep learning models
perform in automated detection of the (oo)cysts of _Giardia_ and
_Cryptosporidium_ from smartphone microscopic images in comparison to the
traditional microscope and non-experts. We also introduce labeled smartphone
and brightfield microscopy datasets for detection of the (oo) cysts of
_Giardia_ and _Cryptosporidium_ , making it publicly available for the
scientific community.

Here, we explore the potential of deep learning algorithms to detect cysts of
two different kinds of enteric parasites without human experts’ involvement in
images taken using a custom-built smartphone microscopy system. We created a
custom dataset by capturing images of sample slides from a smartphone
microscope and a traditional brightfield microscope. The sample slides were
obtained for (oo)cysts on both - reference and vegetable sample extracts. We
trained three popular object detection models - Faster RCNN (Ren et al.,
2016), RetinaNet (Lin et al., 2017), and YOLOv8s (Jocher et al., 2023) using
our dataset and evaluated the performance of the models. Finally, we report
the performance of these models compared with expert humans and non-expert
humans and inter-operator variability. The performance of the models with
smartphone microscopic images was also compared with brightfield microscopic
images. The dataset and the source code are made publicly available.

##  2 Methods

###  2.1 Dataset

####  2.1.1 Training-Validation Set

We used two microscopes to capture images: i) a traditional brightfield
microscope and ii) a sapphire ball lens-based smartphone microscope developed
by Shrestha et al. (2020). The brightfield microscope images were captured
with a rectangular field of view (FOV) of 190 µm X $350$ µm and a
magnification of 400X. In contrast, the smartphone microscope images were
captured with a circular FOV of diameter $200$ µm and magnification of 200X.

We captured images by making microscope slides from two different types of
samples: i) standard or reference (oo)cyst suspension samples (Waterborne Inc,
PC101 G/C positive control), and ii) actual vegetable samples obtained from
local markets in Nepal. Figure 1 shows a few examples of reference and actual
vegetable samples along with their bounding box annotations. Likewise, Table 1
summarizes the number and types of images captured in the dataset.

Reference Samples: We prepared $25$ slides each from $5$ µL standard (oo)cyst
suspension (or standard samples) mixed with Lugol’s iodine in equal
proportion. From these $25$ slides, an expert with more than two years of
experience in imaging and annotating _Giardia_ and _Cryptosporidium_ from
microscopy images captured many images from both microscopes. To maintain
consistency, we selected $830$ best images, each based on the clarity of
parasites. Since there was no prior knowledge of parasite counts in individual
slides, identification and counting of (oo)cysts by the expert was considered
as a benchmark.

Vegetable Samples: We prepared $200$ slides from $151$ vegetable samples
collected from local markets in Nepal. The expert captured and selected images
using the same protocol as the one used for the reference samples. From these
slides, 1005 images for each type of microscope were included for further
steps. The images were used for training the object detection models.

####  2.1.2 Independent Test Set

To assess the generalization of deep learning models on smartphone microscope
images, an independent test set was prepared as follows: One hundred ninety-
three images were captured on a particular day using the same smartphone
microscope. The expert captured images at random locations of the microscope
slides, regardless of the presence of parasites. The expert annotated these
images with bounding boxes and ellipses for all _Giardia_ and
_Cryptosporidium_ using VGG annotator (Dutta and Zisserman, 2019).

####  2.1.3 Non-Expert Annotated Set

The expert trained three non-expert humans on smartphone vegetable sample
images for three hours. The non-experts were instructed to use the shape and
size for identifying the (oo)cysts of _Giardia_ and _Cryptosporidium_. The
three non-experts annotated the two types of cysts in $193$ images of the
independent test set. Non-experts used MS-paint for annotations by encircling
the cysts of the two parasites with ellipses of two different colors, and the
time non-experts took to annotate the cysts in each of the images was recorded
using a stopwatch.

Figure 1:  Representative images of reference and real vegetable samples were
captured using brightfield and smartphone microscopes. Example ground truth
annotations of the parasites by the expert and predictions from the object
detector models. Yellow arrow points _Giardia_ , blue arrow points
_Cryptosporidium_ , and black arrow points debris. Table 1: — Description of
two types of the dataset (reference sample and vegetable sample) used in this
study with the total number of parasites annotated by the expert using VGG
software (Dutta and Zisserman, 2019).

Dataset | No. of images | Microscopes | Giardia’s annotation | Cryptosporidium’s annotation
---|---|---|---|---
Reference sample | $830$ | Smartphone | $839$ | $534$
|  | Brightfield | $907$ | $502$
Vegetable sample | $1005$ | Smartphone | $439$ | $796$
|  | Brightfield | $344$ | $740$
Test (vegetable sample) | $193$ | Smartphone | $165$ | $137$

###  2.2 Deep Learning-based Object Detection Models

Three state-of-the-art object detection models were selected for this study:
Faster RCNN (Ren et al., 2016), RetinaNet (Lin et al., 2017), and YOLOv8s
(Jocher et al., 2023). Faster RCNN is one of the most popular networks from
the Region-Based Convolutional Neural Networks (RCNN) family, which is an
improved version based on two previous methods, RCNN (Girshick et al., 2014)
and Fast RCNN (Girshick, 2015). RetinaNet is a popular single-stage detector
that uses a Focal Loss to address the foreground-background class imbalance
problem that gets more severe when detecting smaller objects in the images.
YOLOv8s is a popular single-stage detector with relatively low computational
costs enabling it to be run on smartphones. To assess the quality of the real-
time detection model that can be run on smartphones, we chose YOLOv8s
(smallest model with $11.2$ million parameters) from the various available
models for YOLOv8s, as it is lightweight and has the lowest prediction time
(Jocher et al., 2023).

###  2.3 Experimental Setup

Figure 2 illustrates the overall pipeline of the training and evaluation of
the three object detectors using expert and non-expert annotated images
captured from brightfield and smartphone images. During training, the images
were first pre-processed (see subsection A.1) and then fed as an input to one
of the three object detection models for classifying the object type
(_Giardia_ or _Cryptosporidium_) and localizing the objects with a bounding
box.

Figure 2: Block diagram showing the overview of the method implemented in this
study.

####  2.3.1 Evaluation approach

Since the target application is to be able to assess the contamination in
vegetable samples by identifying and counting the number of (oo)cysts of the
two parasites in the microscopic images, we evaluate the three models using
classification performance metrics: precision, recall, and F1 score. The
model-predicted cysts can belong to one of the three categories: true positive
(TP) when the model’s object prediction (of either _Giardia_ or
_Cryptosporidium_ cysts) correctly matches with the Ground Truth (GT)
annotation, false positive (FP) when the model’s object prediction is
different than the GT, and finally false negative (FN) when the model does not
detect cysts annotated by the experts in the images. Precision, Recall, and F1
score are calculated based on these three values to evaluate the models’
performances.

$Precision(P)=\frac{TP}{TP+FP}$ (1)

$Recall(R)=\frac{TP}{TP+FN}$ (2)

$F1\ score=\frac{2\times P\times R}{P+R}$ (3)

In addition to assessing the object detection model’s performance against the
expert GT annotations, we also evaluate how the model compares with non-expert
humans. This helps assess the utility of deploying the automated models in
places where the experts are not available.

####  2.3.2 Comparing the three models and non-expert humans

We evaluated the object detection models - Faster RCNN, RetinaNet, and YOLOv8s
- in the following settings:

  * •

5-fold cross-validation of the brightfield and smartphone microscope images
using the training-validation dataset with expert annotations: 830X2 images
for the two microscopes with reference and 1005X2 images with vegetable
samples.

  * •

Comparison of the detection models against non-expert humans in identifying
the (oo)cysts of the two parasites in separate independent smartphone
microscope test images (n=193).

  * •

Comparison of time taken by non-experts vs. detection model to identify the
(oo)cysts in the smartphone microscope test images.

To test whether the differences in the performance of the non-expert humans
and the detection models in the independent test set are statistically
significant, we use paired Wilcoxon signed-rank test (Woolson, 2007). The
details are provided in subsection A.2.

##  3 Results

###  3.1 5-fold Cross-validation in training-validation set

Table 2 presents the performance of the three object detection models for the
brightfield microscope images of reference and vegetable samples. The results
are reported for confidence scores($c$) and iou-thresholds($i$) optimized for
each model separately. The details about the choice of these thresholds are
provided in subsection A.3. We see that the models perform better for
reference samples than vegetable samples. It is expected because the reference
sample does not have debris, and hence there are very few objects confounding
with the cysts in the clean brightfield images (example images in Figure 1).
Similarly, we observe that all the object detectors detect _Giardia_ cysts
better than _Cryptosporidium_ ones, except for Faster RCNN which has
negligibly better performance in detecting _Cryptosporidium_.

Table 2: Brightfield microscope training-validation set: 5-fold cross-
validation results on reference and vegetable samples for Faster RCNN,
RetinaNet, and YOLOv8s.

Dataset | Models | Thresholds | Precision | Recall | F1-score
---|---|---|---|---|---
_Giardia_
Reference Sample | Faster RCNN | $c=0.7,i=0.4$ | $\textbf{0.957}\pm 0.014$ | $0.968\pm 0.018$ | $0.962\pm 0.007$
| RetinaNet | $c=0.5,i=0.5$ | $0.917\pm 0.017$ | $0.946\pm 0.013$ | $0.931\pm 0.011$
| YOLOv8s | $c=0.4,i=0.3$ | $0.954\pm 0.016$ | $\textbf{0.975}\pm 0.010$ | $\textbf{0.965}\pm 0.010$
Vegetable Sample | Faster RCNN | $c=0.8,i=0.5$ | $0.783\pm 0.024$ |  $0.901\pm$0.026 | $\textbf{0.837}\pm 0.005$
| RetinaNet | $c=0.4,i=0.4$ | $0.753\pm 0.029$ | $\textbf{0.927}\pm 0.035$ | $0.830\pm 0.024$
| YOLOv8s | $c=0.4,i=0.3$ | $\textbf{0.855}\pm 0.037$ | $0.811\pm 0.018$ | $0.831\pm 0.018$
_Cryptosporidium_
Reference Sample | Faster RCNN | $c=0.7,i=0.4$ | $0.880\pm 0.024$ | $\textbf{0.915}\pm 0.030$ | $\textbf{0.897}\pm 0.018$
| RetinaNet | $c=0.5,i=0.5$ | $\textbf{0.917}\pm 0.025$ | $0.870\pm 0.031$ | $0.893\pm 0.022$
| YOLOv8s | $c=0.4,i=0.3$ | $0.890\pm 0.034$ | $0.887\pm 0.031$ | $0.888\pm 0.028$
Vegetable Sample | Faster RCNN | $c=0.8,i=0.5$ | $0.845\pm 0.029$ |  $0.835\pm$0.045 |  0.839$\pm$0.024
| RetinaNet | $c=0.4,i=0.4$ | $0.801\pm 0.025$ | $\textbf{0.851}\pm 0.022$ | $0.826\pm 0.023$
| YOLOv8s | $c=0.4,i=0.3$ | $\textbf{0.879}\pm 0.052$ | $0.716\pm 0.065$ | $0.788\pm 0.051$

Table 3 shows 5-fold cross-validation results for Smartphone microscope
training-validation set images. As expected, the object detectors’ performance
is lower than brightfield microscope images, because smartphone microscope
images have more textured noise and lower magnification than traditional
brightfield microscopes. We see that most of the trends observed in
brightfield microscope images can also be seen for smartphone microscope:
_Giardia_ cysts are better detected than _Cryptosporidium_ cysts, YOLOv8s and
Faster RCNN provide better results than RetinaNet, except for vegetable
samples, and the performance of the detectors is better for reference samples
compared to the vegetable sample in general. However, one notable exception is
that the F1-score for the vegetable sample is better than the reference sample
for _Cryptosporidium_ when using YOLOv8s. In this case, while the recall
reduced slightly in the vegetable sample, the precision increased
substantially, increasing the overall F1 score. RetinaNet provides better
results in detecting _Giardia_ and _Cryptosporidium_ in vegetable samples, but
Faster RCNN is better for reference samples.

Table 3: Smartphone microscope training-validation set: 5-fold cross-
validation results on reference and vegetable samples for Faster RCNN,
RetinaNet, and YOLOv8s.

Dataset | Models | Thresholds | Precision | Recall | F1-score
---|---|---|---|---|---
_Giardia_
Reference Sample | Faster RCNN | $c=0.5,i=0.3$ | $\textbf{0.872}\pm 0.038$ | $\textbf{0.919}\pm 0.019$ | $\textbf{0.895}\pm 0.024$
| RetinaNet | $c=0.3,i=0.3$ | $0.803\pm 0.024$ | $0.912\pm 0.022$ | $0.854\pm 0.018$
| YOLOv8s | $c=0.3,i=0.4$ | $0.835\pm 0.032$ | $0.891\pm 0.032$ | $0.862\pm 0.030$
Vegetable Sample | Faster RCNN | $c=0.5,i=0.4$ | $0.675\pm 0.061$ | $\textbf{0.789}\pm 0.047$ | $0.726\pm 0.045$
| RetinaNet | $c=0.4,i=0.3$ | $0.729\pm 0.040$ | $0.751\pm 0.061$ | $0.739\pm 0.042$
| YOLOv8s | $c=0.2,i=0.3$ | $\textbf{0.761}\pm 0.053$ | $0.729\pm 0.093$ | $\textbf{0.740}\pm 0.038$
_Cryptosporidium_
Reference Sample | Faster RCNN | $c=0.5,i=0.3$ | $\textbf{0.761}\pm 0.030$ | $0.673\pm 0.051$ | $\textbf{0.714}\pm 0.037$
| RetinaNet | $c=0.3,i=0.3$ | $0.698\pm 0.027$ | $\textbf{0.688}\pm 0.045$ | $0.692\pm 0.025$
| YOLOv8s | $c=0.3,i=0.4$ | $0.580\pm 0.059$ | $0.678\pm 0.117$ | $0.620\pm 0.066$
Vegetable Sample | Faster RCNN | $c=0.5,i=0.4$ | $0.638\pm 0.031$ | $0.650\pm 0.045$ | $0.644\pm 0.030$
| RetinaNet | $c=0.4,i=0.3$ | $\textbf{0.700}\pm 0.046$ | $0.675\pm 0.024$ | $\textbf{0.686}\pm 0.017$
| YOLOv8s | $c=0.2,i=0.3$ | $0.658\pm 0.021$ | $\textbf{0.676}\pm 0.103$ | $0.663\pm 0.046$

###  3.2 Independent Test Set with Smartphone Microscope Images

Table 4 presents the performance of the three models and non-expert humans on
the independent test set images. This set consists of smartphone microscopic
images of vegetable samples where the expert’s annotation is considered ground
truth. The performance of all the models on the test set images is lower than
that of cross-validation, which is typical for machine learning models, known
as the generalization problem. YOLOv8s, which performed well in cross-
validation, has the worst overall score in the test set, suggesting that the
model was less robust to new data. In contrast, the RetinaNet model is more
robust to the new data. Moreover, RetinaNet seems to perform better for
_Cryptosporidium_ , which could be due to the Focal Loss targeted for smaller
objects, as _Cryptosporidium_ cysts have a smaller size than _Giardia_ cysts.
Nevertheless, the test set results reinforce the observation that detecting
_Cryptosporidium_ is more difficult compared to _Giardia_ cysts.

Table 4: Smartphone microscope independent test set: Performance of the three
object detectors and non-expert humans. The standard deviation describes how
diverse the scores are from the mean when predicting the test set on each
cross-validation fold.

Detector | _Giardia_ | _Cryptosporidium_
---|---|---
Precision | Recall | F1-score | Precision | Recall | F1-score
Faster RCNN | $\textbf{0.679}\pm 0.024$ | $\textbf{0.358}\pm 0.015$ | $\textbf{0.468}\pm 0.015$ | $0.423\pm 0.030$ | $0.270\pm 0.033$ | $0.328\pm 0.026$
RetinaNet | $0.657\pm 0.034$ | $0.333\pm 0.025$ | $0.441\pm 0.025$ | $\textbf{0.473}\pm 0.013$ | $\textbf{0.286}\pm 0.049$ | $\textbf{0.355}\pm 0.039$
YOLOv8s | $0.656\pm 0.020$ | $0.240\pm 0.037$ | $0.350\pm 0.040$ | $0.337\pm 0.019$ | $0.260\pm 0.037$ | $0.293\pm 0.031$
Non-expert1 | $0.634$ | $0.430$ | $0.512$ | $0.233$ | $0.124$ | $0.162$
Non-expert2 | $0.399$ | $0.539$ | $0.459$ | $0.191$ | $0.606$ | $0.290$
Non-expert3 | $0.297$ | $0.497$ | $0.372$ | $0.168$ | $0.255$ | $0.203$

Wilcoxon signed-rank test showed that all the models and non-expert humans
mostly had significantly different results, except for Non-expert $1$, who had
non-significant statistical results with Faster RCNN and RetinaNet, for both
Giardia and Cryptosporidium. (Details provided in subsection A.2.)

Since the ability to detect the cysts in real-time using only the smartphone
can be valuable for rapid field testing scenarios, we computed the time
required to detect the cysts for the different models and the human experts
and non-experts. YOLOv8s was the fastest, predicting the objects in an average
of $0.032$ seconds per image, whereas Faster RCNN and RetinaNet needed $1.4$
seconds and $1.3$ seconds, respectively. Among the human annotators, the
expert identified cysts in $8.4$ seconds on average per image, but the non-
experts took as long as $24.818$ seconds. FasterRCNN, RetinaNet, and YOLOv8s
comprise $105$, $57$, and $11.2$ million parameters, respectively.

##  4 Discussion and Conclusion

In this study, we explored the possibility of using automatic parasite
detection in brightfield and smartphone microscopes for the (oo)cysts of
_Giardia_ and _Cryptosporidium_ in scenarios where experts are not available.
Two different datasets were prepared by separately capturing the images of
reference and actual vegetable samples using the smartphone and the
brightfield microscopes. Three object detection models were explored, and
their performance was compared against human non-experts while taking an
expert annotation as ground truth. Precision, recall, and F1 scores were used
as they are useful evaluation metrics when a target application requires
counting objects (Xue and Ray, 2017; Brhane Hagos et al., 2019).

The results show that for the same range of training samples models perform
better on reference samples than vegetable samples, brightfield microscopes
than smartphone microscopes, _Giardia_ than _Cryptosporidium_ cysts. Vegetable
samples have debris similar to _Giardia_ and _Cryptosporidium_ (Figure 1)
making the task more difficult. Smartphone images are more textured and noisy.
Additionally, due to the curvature effect of the ball lens in the smartphone
microscope, the objects get stretched toward the peripheral regions and appear
bigger than those at the center of the image. In such cases, the models could
falsely predict _Giardia_ as _Cryptosporidium_ and vice versa, as shown in
Figure 3. A larger annotated dataset and providing global context by using
transformer architectures instead of CNNs could in the future enable models to
correctly identify such stretched objects. Some smartphone images seem to be
blurry, which causes false negatives as shown in Figure 3a. Figure 3c
illustrates a scenario of multiple predictions where both classes were
predicted for a single object. However, it was only observed when using
RetinaNet. In other models, the problem was eliminated by increasing the
confidence threshold level for the prediction. _Giardia_ was better predicted
by all three models used in the study, which might be due to its larger size
and ellipse shape. Future works can also focus on developing robust models in
detecting tiny Cryptosporidium cysts.

This work shows the feasibility and promise of integrating deep learning-based
automated models into brightfield and smartphone microscopes, especially in
resource-constrained areas where experts are not readily available. Although
the models performed better than non-experts in _Cryptosporidium_ cysts, the
F1-scores for the models are still relatively low in test-sets. Future work
requires collecting a much larger dataset, which will improve the scores.
Similarly, assessing the variability among the experts by annotating a certain
subset and comparing this variability against AI models would also be
interesting. A larger dataset can be used for self-supervised pertaining on
unlabeled samples, followed by a supervised fine-tuning on annotated dataset
to get better object detection performance. Moreover, in this study, we have
not combined reference and vegetable sample images to train the models. The
mixed dataset could be used in future works hoping for better performance and
domain adaptation.

Figure 3: Three pairs of ground truth and predicted images (i.e., a, b, and c)
showing error in prediction for vegetable sample test set taken from
smartphone microscopy. (a) Prediction missed due to blurry image. (b) False
prediction due to similar size. (c) Multiple predictions for a single object.

In our experiments, YOLOv8s has decent performance in the real vegetable
samples. Considering its lightweight architecture (22 MB), and good
performance in detecting the cysts, YOLOv8s shows potential to be deployed on
mobile devices without the need for a server (Kuznetsova et al., 2021; Chen et
al., 2021).

This work provides the first step and shows the feasibility of a low-cost
smartphone-based automated detection of (oo)cysts or other microorganisms in
vegetables, water, stool, or other food products without the need for an
expert. More than specific deep learning models to choose, future work should
focus on larger dataset or semi-supervised approaches, and designing
experiments in prospective settings to compare against non-experts and experts
for diagnostic end-points.

##  5 Data and Code

The data and code for the experiments are available at
https://github.com/naamiinepal/smartphone_microscopy.

Acknowledgments

We thank Rabin Adhikari for helping us with formatting. The images used in
this research were taken with support from NAS and USAID (to BG and BBN)
through Partnerships for Enhanced Engagement in Research (PEER)
(AIDOAA-A-11-00012). The opinions, findings, conclusions, or recommendations
expressed in this article are those of the authors alone and do not
necessarily reflect the views of USAID or NAS.

Ethical Standards

The work follows appropriate ethical standards in conducting research and
writing the manuscript, following all applicable laws and regulations
regarding the treatment of animals or human subjects.

Conflicts of Interest

The authors declare no conflicts of interest.

## References

  * Adeyemo et al. (2018) Folasade Esther Adeyemo, Gulshan Singh, Poovendhree Reddy, and Thor Axel Stenström.  Methods for the detection of cryptosporidium and giardia: from microscopy to nucleic acid based tools in clinical and environmental regimes.  _Acta tropica_ , 184:15–28, 2018.
  * Baldursson and Karanis (2011) Selma Baldursson and Panagiotis Karanis.  Waterborne transmission of protozoan parasites: review of worldwide outbreaks–an update 2004–2010.  _Water research_ , 45(20):6603–6614, 2011.
  * Brhane Hagos et al. (2019) Yeman Brhane Hagos, Priya Lakshmi Narayanan, Ayse U Akarca, Teresa Marafioti, and Yinyin Yuan.  Concorde-net: Cell count regularized convolutional neural network for cell detection in multiplex immunohistochemistry images.  _arXiv e-prints_ , pages arXiv–1908, 2019.
  * Chavan and Sutkar (2014) Sneha Narayan Chavan and Ashok Manikchand Sutkar.  Malaria disease identification and analysis using image processing.  _Int. J. Latest Trends Eng. Technol_ , 3(3):218–223, 2014.
  * Chen et al. (2019) Kai Chen, Jiaqi Wang, Jiangmiao Pang, Yuhang Cao, Yu Xiong, Xiaoxiao Li, Shuyang Sun, Wansen Feng, Ziwei Liu, Jiarui Xu, et al.  Mmdetection: Open mmlab detection toolbox and benchmark.  _arXiv preprint arXiv:1906.07155_ , 2019.
  * Chen et al. (2021) Yuwen Chen, Chao Zhang, Tengfei Qiao, Jianlin Xiong, and Bin Liu.  Ship detection in optical sensing images based on yolov5.  In _Twelfth International Conference on Graphics and Image Processing (ICGIP 2020)_ , volume 11720, page 117200E. International Society for Optics and Photonics, 2021.
  * de Haan et al. (2020) Kevin de Haan, Hatice Ceylan Koydemir, Yair Rivenson, Derek Tseng, Elizabeth Van Dyne, Lissette Bakic, Doruk Karinca, Kyle Liang, Megha Ilango, Esin Gumustekin, et al.  Automated screening of sickle cells using a smartphone-based microscope and deep learning.  _NPJ Digital Medicine_ , 3(1):1–9, 2020.
  * Dixon et al. (2011) BR Dixon, Ronald Fayer, Mónica Santín, DE Hill, and JP Dubey.  Protozoan parasites: Cryptosporidium, giardia, cyclospora, and toxoplasma.  _Rapid detection, characterization, and enumeration of foodborne pathogens_ , pages 349–370, 2011.
  * Dutta and Zisserman (2019) Abhishek Dutta and Andrew Zisserman.  The VIA annotation software for images, audio and video.  In _Proceedings of the 27th ACM International Conference on Multimedia_ , MM ’19, New York, NY, USA, 2019. ACM.  ISBN 978-1-4503-6889-6/19/10.  doi: 10.1145/3343031.3350535.  URL https://doi.org/10.1145/3343031.3350535.
  * Feng et al. (2016) Steve Feng, Derek Tseng, Dino Di Carlo, Omai B Garner, and Aydogan Ozcan.  High-throughput and automated diagnosis of antimicrobial resistance using a cost-effective cellphone-based micro-plate reader.  _Scientific reports_ , 6(1):1–9, 2016.
  * Fricker et al. (2002) CR Fricker, GD Medema, and HV Smith.  Protozoan parasites (cryptosporidium, giardia, cyclospora).  _Guidelines for drinking-water quality_ , 2:70–118, 2002\.
  * Fuhad et al. (2020) KM Fuhad, Jannat Ferdousey Tuba, Md Sarker, Rabiul Ali, Sifat Momen, Nabeel Mohammed, and Tanzilur Rahman.  Deep learning based automatic malaria parasite detection from blood smear and its smartphone based application.  _Diagnostics_ , 10(5):329, 2020.
  * Gallardo-Caballero et al. (2019) Ramón Gallardo-Caballero, Carlos J García-Orellana, Antonio García-Manso, Horacio M González-Velasco, Rafael Tormo-Molina, and Miguel Macías-Macías.  Precise pollen grain detection in bright field microscopy using deep learning techniques.  _Sensors_ , 19(16):3583, 2019.
  * Girshick (2015) Ross Girshick.  Fast r-cnn.  In _Proceedings of the IEEE international conference on computer vision_ , pages 1440–1448, 2015.
  * Girshick et al. (2014) Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik.  Rich feature hierarchies for accurate object detection and semantic segmentation.  In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pages 580–587, 2014.
  * Guerrant et al. (1985) Richard L Guerrant, David S Shields, Stephen M Thorson, John B Schorling, and Dieter HM Groschel.  Evaluation and diagnosis of acute infectious diarrhea.  _The American journal of medicine_ , 78(6):91–98, 1985.
  * Guerrant et al. (2001) Richard L Guerrant, Thomas Van Gilder, Ted S Steiner, Nathan M Thielman, Laurence Slutsker, Robert V Tauxe, Thomas Hennessy, Patricia M Griffin, Herbert DuPont, R Bradley Sack, et al.  Practice guidelines for the management of infectious diarrhea.  _Clinical infectious diseases_ , 32(3):331–351, 2001.
  * Gupta et al. (2020) Ranjit Gupta, Binod Rayamajhee, Samendra P Sherchan, Ganesh Rai, Reena Kiran Mukhiya, Binod Khanal, and Shiba Kumar Rai.  Prevalence of intestinal parasitosis and associated risk factors among school children of saptari district, nepal: a cross-sectional study.  _Tropical medicine and health_ , 48(1):1–9, 2020\.
  * Jocher et al. (2023) Glenn Jocher, Ayush Chaurasia, and Jing Qiu.  YOLO by Ultralytics, 1 2023.  URL https://github.com/ultralytics/ultralytics.
  * Kim et al. (2015) Jung-Hyun Kim, Hong-Gu Joo, Tae-Hoon Kim, and Young-Gu Ju.  A smartphone-based fluorescence microscope utilizing an external phone camera lens module.  _BioChip Journal_ , 9(4):285–292, 2015.
  * Kobori et al. (2016) Yoshitomo Kobori, Peter Pfanner, Gail S Prins, and Craig Niederberger.  Novel device for male infertility screening with single-ball lens microscope and smartphone.  _Fertility and sterility_ , 106(3):574–578, 2016\.
  * Koydemir et al. (2015) Hatice Ceylan Koydemir, Zoltan Gorocs, Derek Tseng, Bingen Cortazar, Steve Feng, Raymond Yan Lok Chan, Jordi Burbano, Euan McLeod, and Aydogan Ozcan.  Rapid imaging, detection and quantification of giardia lamblia cysts using mobile-phone based fluorescent microscopy and machine learning.  _Lab on a Chip_ , 15(5):1284–1293, 2015.
  * Kuznetsova et al. (2021) Anna Kuznetsova, Tatiana Maleva, and Vladimir Soloviev.  Yolov5 versus yolov3 for apple detection.  _Cyber-Physical Systems: Modelling and Intelligent Control_ , pages 349–358, 2021.
  * Lin et al. (2017) Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollár.  Focal loss for dense object detection.  In _Proceedings of the IEEE international conference on computer vision_ , pages 2980–2988, 2017.
  * Luo et al. (2021) Shaobo Luo, Kim Truc Nguyen, Binh TT Nguyen, Shilun Feng, Yuzhi Shi, Ahmed Elsayed, Yi Zhang, Xiaohong Zhou, Bihan Wen, Giovanni Chierchia, et al.  Deep learning-enabled imaging flow cytometry for high-speed cryptosporidium and giardia detection.  _Cytometry Part A_ , 2021.
  * Masubuchi et al. (2020) Satoru Masubuchi, Eisuke Watanabe, Yuta Seo, Shota Okazaki, Takao Sasagawa, Kenji Watanabe, Takashi Taniguchi, and Tomoki Machida.  Deep-learning-based image segmentation integrated with optical microscopy for automatically searching for two-dimensional materials.  _npj 2D Materials and Applications_ , 4(1):1–9, 2020.
  * Nguyen et al. (2020) Nhat-Duy Nguyen, Tien Do, Thanh Duc Ngo, and Duy-Dinh Le.  An evaluation of deep learning methods for small object detection.  _Journal of Electrical and Computer Engineering_ , 2020, 2020.
  * Oliver (2005) James D Oliver.  The viable but nonculturable state in bacteria.  _Journal of microbiology_ , 43(spc1):93–100, 2005\.
  * Ren et al. (2016) Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun.  Faster r-cnn: Towards real-time object detection with region proposal networks.  _IEEE transactions on pattern analysis and machine intelligence_ , 39(6):1137–1149, 2016.
  * Saeed and Jabbar (2018) Muhammad A Saeed and Abdul Jabbar.  “smart diagnosis” of parasitic diseases by use of smartphones.  _Journal of clinical microbiology_ , 56(1), 2018.
  * Sherchand et al. (2004) JB Sherchand, PN Misra, DN Dhakal, et al.  Cryptosporidium parvum: An observational study in kanti children hospital, kathmandu, nepal.  _Journal of Nepal Health Research Council_ , 2004.
  * Shrestha et al. (2020) Retina Shrestha, Rojina Duwal, Sajeev Wagle, Samiksha Pokhrel, Basant Giri, and Bhanu Bhakta Neupane.  A smartphone microscopic method for simultaneous detection of (oo) cysts of cryptosporidium and giardia.  _PLoS Neglected Tropical Diseases_ , 14(9), 2020.
  * Tandukar et al. (2013) Sarmila Tandukar, Shamshul Ansari, Nabaraj Adhikari, Anisha Shrestha, Jyotshana Gautam, Binita Sharma, Deepak Rajbhandari, Shikshya Gautam, Hari Prasad Nepal, and Jeevan B Sherchand.  Intestinal parasitosis in school children of lalitpur district of nepal.  _BMC research notes_ , 6(1):449, 2013.
  * Van den Bossche et al. (2015) Dorien Van den Bossche, Lieselotte Cnops, Jacob Verschueren, and Marjan Van Esbroeck.  Comparison of four rapid diagnostic tests, elisa, microscopy and pcr for the detection of giardia lamblia, cryptosporidium spp. and entamoeba histolytica in feces.  _Journal of microbiological methods_ , 110:78–84, 2015\.
  * Vijayalakshmi et al. (2020) A Vijayalakshmi et al.  Deep learning approach to detect malaria from microscopic images.  _Multimedia Tools and Applications_ , 79(21):15297–15317, 2020.
  * Wang et al. (2020) Hongda Wang, Hatice Ceylan Koydemir, Yunzhe Qiu, Bijie Bai, Yibo Zhang, Yiyin Jin, Sabiha Tok, Enis Cagatay Yilmaz, Esin Gumustekin, Yair Rivenson, et al.  Early-detection and classification of live bacteria using time-lapse coherent imaging and deep learning.  _arXiv preprint arXiv:2001.10695_ , 2020.
  * Woolson (2007) RF Woolson.  Wilcoxon signed-rank test.  _Wiley encyclopedia of clinical trials_ , pages 1–3, 2007.
  * Xu et al. (2020) XF Xu, S Talbot, and T Selvaraja.  Deep learning based cell parasites detection.  _arXiv preprint arXiv:2002.11327_ , 2020.
  * Xue and Ray (2017) Yao Xue and Nilanjan Ray.  Cell detection in microscopy images with deep convolutional neural network and compressed sensing.  _arXiv preprint arXiv:1708.03307_ , 2017.
  * Yang et al. (2019) Feng Yang, Mahdieh Poostchi, Hang Yu, Zhou Zhou, Kamolrat Silamut, Jian Yu, Richard J Maude, Stefan Jaeger, and Sameer Antani.  Deep learning for smartphone-based malaria parasite detection in thick blood smears.  _IEEE Journal of Biomedical and Health Informatics_ , 24(5):1427–1438, 2019.
  * Zieliński et al. (2020) Bartosz Zieliński, Agnieszka Sroka-Oleksiak, Dawid Rymarczyk, Adam Piekarczyk, and Monika Brzychczy-Włoch.  Deep learning approach to describe and classify fungi microscopic images.  _PloS one_ , 15(6):e0234806, 2020.

##  A Supplementary Information

###  A.1 Implementation Details

The networks were implemented in Python $3.10.6$. The open source object
detection library mmdetection (Chen et al., 2019) was used with ResNeXt101
backbone accompanied with feature pyramid network (FPN) for Faster RCNN
(Nguyen et al., 2020), and ResNet101 backbone for RetinaNet. Similarly,
YOLOv8s was implemented by cloning the repository of Ultralytics (Jocher et
al., 2023). For Faster RCNN and RetinaNet, the shortest edge was resized with
sharp edge lengths of 640, 472, 704, 736, 768, and 800, and a random
horizontal flip with a probability of $0.5$ was used during data augmentation.
For YOLOv8s, random horizontal flips were applied along with mosaic
augmentation with probability $0.5$ and 1.0, respectively, for reference and
sample images. We adapted the learning rate, iterations, and the number of
classes for all three models with empirical experiments during training to get
the optimal performance. Additionally, for RetinaNet, the focal loss’s alpha
and gamma parameters were adjusted to improve the results from the default
settings. The hyperparameters used for these three models are summarized Table
5.

Table 5: Six detection models and hyperparameter details. $W/N$: Warm-up/Maximum Iteration; $LR$: Learning Rate; $FPN$: Feature Pyramid Network; $PPI$: Proposals per image; all other hyperparameters were left as default in mmdetection implementation. Microscope | Detector | Backbone | W/N | LR | Other
---|---|---|---|---|---
Brightfield | Faster RCNN | ResNeXt101 | 1200/1500 | $0.001$ | FPN, PPI = $64$
| RetinaNet | ResNet101 | 800/1200 | $0.001$ | $\alpha=0.93,\gamma=1$
| YOLOv8s | CSPDarknet | 3/100 | $0.01$ | batch size=16
Smartphone | Faster RCNN | ResNeXt101 | 1500/2000 | $0.01$ | FPN, PPI = 64
| RetinaNet | ResNet101 | 1200/1500 | $0.001$ | $\alpha=0.99,\gamma=1.7$
| YOLOv8s | CSPDarknet | 3/200 | $0.001$ | batch size = 16

###  A.2 Statistical Analysis

The Quantile-Quantile (Q-Q) plot was used to check if the data were normally
distributed. Since the data were not normally distributed, we selected paired
Wilcoxon signed-rank test (Woolson, 2007) to test the significance between the
predictions. A p-value of less than $0.05$ (i.e., $5$ $\%$) was considered
significant. We have assumed total images as the sample size (i.e., sample
size = $193$) and the count of parasites on each image as the scores. Since
the large sample size ($n>50$), we used normal approximation on the Wilcoxon
signed-rank test. Here, normal approximation does not mean the data
distribution is normal, but the Wilcoxon signed rank test statistic is assumed
to be approximately normal. We used
scipy444https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.wilcoxon.html
to perform the Wilcoxon signed-rank test.

The null hypothesis is that there is no difference between the cysts-count
predictions between the non-experts and models. The p-values are provided in
Table 6 for _Giardia_ and Table 7 for _Cryptosporidium_. We observed
significantly different results among all the non-experts and between Non-
expert $2$ and models. All three models significantly outperformed the non-
experts for the detection of _Cryptosporidium_. However, for _Giardia_ , only
Faster RCNN had a statistically significant difference in performance compared
to Non-expert 1 and Non-expert 2. In contrast, RetinaNet had a statistically
significant difference in performance compared to Non-expert 3. Faster RCNN
and RetinaNet were significantly better than non-expert human $3$ in
predicting _Giardia_ and _Cryptosporidium_.

Table 6: Table showing the p-values for _Giardia_ -using Wilcoxon signed rank
test- among expert humans, non-expert humans, and AI. (p-value threshold of
0.05)

| Expert | Non-expert 1 | Non-expert 2 | Non-expert 3 | Faster RCNN | RetinaNet
---|---|---|---|---|---|---
Non-expert 1 | 1.64E-04 |  |  |  |  |
Non-expert 2 | 4.72E-04 | 1.29E-08 |  |  |  |
Non-expert 3 | 1.98E-04 | 4.04E-08 | 7.62E-01 |  |  |
Faster RCNN | 2.19E-09 | 2.60E-02 | 5.71E-13 | 7.88E-12 |  |
RetinaNet | 1.08E-09 | 2.59E-02 | 1.02E-13 | 2.60E-12 | 7.79E-01 |
YOLOv8s | 1.10E-13 | 1.57E-05 | 5.18E-17 | 6.42E-15 | 4.50E-05 | 7.74E-05

Table 7: Table showing the p-values for _Cryptosporidium_ -using Wilcoxon
signed rank test- among expert humans, non-expert humans, and AI. (p-value
threshold of 0.05)

| Expert | Non-expert 1 | Non-expert 2 | Non-expert 3 | Faster RCNN | RetinaNet
---|---|---|---|---|---|---
Non-expert 1 | 1.14E-04 |  |  |  |  |
Non-expert 2 | 3.03E-21 | 5.52E-25 |  |  |  |
Non-expert 3 | 9.37E-03 | 8.51E-10 | 8.88E-21 |  |  |
Faster RCNN | 5.60E-04 | 2.62E-02 | 1.86E-24 | 4.33E-09 |  |
RetinaNet | 1.37E-04 | 1.56E-01 | 3.52E-26 | 6.40E-10 | 3.23E-01 |
YOLOv8s | 6.67E-02 | 8.97E-04 | 2.01E-23 | 1.82E-06 | 5.43E-03 | 6.33E-04

###  A.3 Choice of thresholds

To calculate the precision, recall, and f1-score of the object detection
models, we plotted the precision-recall of the respective detectors for
different values of iou thresholds and confidence scores, ranging from 0.1 to
1 with a step size of 0.1, as in Figure 4 Then, we selected the thresholds by
observing the respective plot to get the best precision and recall.

Figure 4: Precision-Recall scatterplot for different values of iou threshold
and confidence score for different samples and detection models