# Nonparametric Probability Density Function Estimation Using the Pade Approximation
## 2 Mathematical Background
### The Theoretical Aspects of the Pade Transform  
The Pade approximation (or Transform) is a significant mathematical tool developed by [PERSON] around 1890 [26]. It finds numerous applications in engineering [27], but in the interest of brevity these are not detailed here. The concept of the Pade approximation involves representing a function in a rational form of the corresponding Taylor series expansion. There are several compelling reasons to use the Pade approximation. Firstly, it can be applied to accelerate the convergence of series. More interestingly, even in cases where a series does not converge, the Pade approximation can be employed and yields a good approximation that does converge. Secondly, the Pade approximation represents a _rational_ form of a function, simplifying the problem in many instances. In this regard, the Pade approximation is a valuable tool for approximating functions [28], which is precisely the arena in which we are operating. It is fascinating that the existence of this rational function is derived from [PERSON]'s representation of analytic functions [24], and there is an equivalence of the Cauchy integral with the Riemann integral. \[h(u)=\frac{1}{2\pi i}\int_{C}\frac{h(u^{\prime})}{u^{\prime}-u}\,du^{\prime}. \tag{4}\]  
In this equation, \(C\) represents a contour in the complex plane, over which the integration is performed. This equation holds true for all analytic functions. When employing the Riemann integral, this equation transforms into a rational function, as shown below:  
\[h(u)=\frac{1}{2\pi i}\sum_{n}\frac{h(u_{n})}{u_{n}-u}\Delta u_{n}, \tag{5}\]  
where \(n\) is an index that runs over a set of discrete points, \(u_{n}\), in the complex plane. Each point, \(u_{n}\), corresponds to a specific value in this set, and the sum \(\sum_{n}\) represents the contribution of all these points to the value of the function \(h(u)\). We can thus see that all analytic functions can be transformed into rational functions. Later, we will observe that this conversion is essential for the convergence of \(f(x)\) and for finding the inverse Laplace transformation. But for the present, we assume that we are given a power series representing an analytic function \(f(u)\):  
\[f(u)=\sum_{i=0}^{\infty}c_{i}u^{n}. \tag{6}\]  
Our goal is to find a rational function, \(P^{(L/M)}(u)\), to represent the series in the form of the Pade approximation function:  
\[P^{(L/M)}(u)=\frac{\sum_{n=0}^{L}a_{n}u^{n}}{\sum_{n=0}^{M}b_{n}u^{n}}, \tag{7}\]  
where \(L\) and \(M\) are the maximum degrees of the denominator and numerator, respectively. Now, to find \(a_{n}\) and \(b_{n}\), we equate the RHSs of Equations (6) and (7) as:  
\[\sum_{i=0}^{\infty}a_{i}u^{n}=\frac{\sum_{n=0}^{L}a_{n}u^{n}}{\sum_{n=0}^{M}b_ {n}u^{n}}=\sum_{i=0}^{L+M}c_{i}u^{n}+O(u^{L+M+1}). \tag{8}\]  
For this equation, we need \(L+M\) coefficients [22]. Since we are dealing with practical problems, we assume that we have a finite number of available coefficients, and ignore the others. More specifically, \(O(u^{L+M+1})\) represents the remaining terms that we have ignored in Equation (8). To obtain coefficients, we equate the two sides as:\[\left(\sum_{n=0}^{M}b_{n}u^{n}\right)\left(\sum_{n=0}^{L+M}c_{i}u^{n}\right)= \sum_{n=0}^{L}a_{n}u^{n}. \tag{9}\]  
By matching the coefficients, this system of linear equations can be solved easily using the so-called Hankel matrix:  
\[ \begin{bmatrix}C_{(L-M+1)}&C_{(L+M+2)}&\dots&C_{L}\\ \vdots&\vdots&\vdots&\vdots\\ C_{(L-M+K)}&C_{(L-M+K+1)}&\dots&C_{(L+K-1)}\\ \vdots&\vdots&\vdots&\vdots\\ C_{L}&C_{(L+M)}&\dots&C_{(L+M-1)}\end{bmatrix}\begin{bmatrix}b_{M}\\ \vdots\\ b_{K}\\ \vdots\\ b_{1}\end{bmatrix} =- \begin{bmatrix}C_{(L+1)}\\ \vdots\\ C_{(L+K+1)}\\ \vdots\\ C_{(L+M)}\end{bmatrix}  \tag{10}\]  
These equations calculate the coefficients of the denominator of Equation (8).