[Math] why are there two different Pade approximation of delay
pade approximation
There are 2 different second order pade approximations of delay given in internet
What is the difference between these two approximation? Which one is the correct Pade approximation
Best Answer
The first one is not a Padé approximant but the ratio of two Taylor series.
Written as
$$e^{-x}=\frac{e^{-x/2}}{e^{x/2}}=\frac{1-\frac{x}{2}+\frac{x^2}{8}+O\left(x^3\right)}{1+\frac{x}{2}+\frac{x^2}{8}+O\left(x^3\right) }$$
This does not have anything to do with the second one which is the $[2,2]$ Padé approximant of $e^{-x}$
To show how is better the Padé approximant, let us compute
$$\Phi_1=\int_0^1 \left(e^{-x}-\frac{1-\frac{x}{2}+\frac{x^2}{8}}{1+\frac{x}{2}+\frac{x^2}{8}}\right)^2\,dx\approx 5.033\times 10^{-5}$$ which, for sure, is better than
$$\Phi_0=\int_0^1 \left(e^{-x}-\left(1-x+\frac{x^2}{2}-\frac{x^3}{6}\right)\right)^2\,dx\approx 1.375\times 10^{-4}$$
but so worse than
$$\Phi_2=\int_0^1 \left(e^{-x}-\frac{1-\frac{x}{2}+\frac{x^2}{12}} {1+\frac{x}{2}+\frac{x^2}{12} }\right)^2\,dx\approx 3.127\times 10^{-8}$$
Edit
Developed at a point $x=a$, for a given function $f(x)$, the $[m,n]$ Padé approximant write
$$p_{m,n}=\frac{\sum _{i=0}^m a_i (x-a)^i } {1+\sum _{i=1}^n b_i (x-a)^i }$$ Then, let us write in a first step
$$\left(1+\sum _{i=1}^n b_i (x-a)^i \right)\,f(x)=\sum _{i=0}^m a_i (x-a)^i $$ and replace $f(x)$ by its corresponding Taylor expansion
$$f(x)= \sum_{k=0} ^ {\infty} \frac {f^{(k)}(a)}{n!} (x-a)^{n}=\sum _{k=0}^{\infty} c_k (x-a)^k$$ which will be truncated to "some" order.
Now, expanding the summations and grouping for a given power of $(x-a)^j$, we have a series of linear equations in $a,b,c$ easy to solve for the $a$'s and $b$'s where the $c$'s are known. All of this is quite simple.
For illustration, let us do it for $f(x)=e^{-x}$ using the $[2,2]$ Padé approximant. We then have
$$(1+b_1 x+b_2 x^2)\left(1-x+\frac{x^2}{2}-\frac{x^3}{6}+\frac{x^4}{24}\right)=a_0+a_1 x+a_2x^2$$
Expanding and grouping, this will give
$$(1-a_0)+ (-a_1+b_1-1)x+
\left(-a_2-b_1+b_2+\frac{1}{2}\right)x^2+\left(\frac{b_1}{2}-b_2-\frac{1}{6}\right) x^3+\frac{1}{24} (-4 b_1+12 b_2+1) x^4=0$$ Cancelling all coefficients, the gives the equations
$$1-a_0=0 \qquad -a_1+b_1-1=0 \qquad -a_2-b_1+b_2+\frac{1}{2}=0$$$$ \frac{b_1}{2}-b_2-\frac{1}{6}=0\qquad -4 b_1+12 b_2+1=0$$ the solutions of which being
$$a_0= 1\qquad a_1=-\frac 12 \qquad a_2=\frac 1 {12} \qquad b_1=\frac 12 \qquad b_2= \frac 1 {12}$$ which is your second expression.
Back to the two formulations given in your post, let us make the long divisions to get
$$\frac{1-\frac{x}{2}+\frac{x^2}{8}}{1+\frac{x}{2}+\frac{x^2}{8} }=1-x+\frac{x^2}{2}-\frac{x^3}{8}+\frac{x^5}{64}+O\left(x^6\right)=1-x+\frac{x^2}{2}+O\left(x^\color{red}{3}\right)$$ while
$$\frac{1-\frac{x}{2}+\frac{x^2}{12}}{1+\frac{x}{2}+\frac{x^2}{12}}=1-x+\frac{x^2}{2}-\frac{x^3}{6}+\frac{x^4}{24}-\frac{x^5}{144}+O\left(x^6\right)=1-x+\frac{x^2}{2}-\frac{x^3}{6}+\frac{x^4}{24}+O\left(x^\color{red}{5}\right)$$ when compared to the Taylor expansion of $e^{-x}$.
I hope and wish that this makes things clearer for you. If not, just post.
Suppose that you expand your function $f(x)$ around a given point $x=a$ and that the first term corresponds to a degree $p$. Then I choose the $[p+n,n]$ Padé approximant. This exactly coincides with @SV-97 comment.
If you look at this question of mine, which never recieved any answer, you will see one example and a similar concern.
Best Answer
The first one is not a Padé approximant but the ratio of two Taylor series.
Written as $$e^{-x}=\frac{e^{-x/2}}{e^{x/2}}=\frac{1-\frac{x}{2}+\frac{x^2}{8}+O\left(x^3\right)}{1+\frac{x}{2}+\frac{x^2}{8}+O\left(x^3\right) }$$
This does not have anything to do with the second one which is the $[2,2]$ Padé approximant of $e^{-x}$
To show how is better the Padé approximant, let us compute $$\Phi_1=\int_0^1 \left(e^{-x}-\frac{1-\frac{x}{2}+\frac{x^2}{8}}{1+\frac{x}{2}+\frac{x^2}{8}}\right)^2\,dx\approx 5.033\times 10^{-5}$$ which, for sure, is better than $$\Phi_0=\int_0^1 \left(e^{-x}-\left(1-x+\frac{x^2}{2}-\frac{x^3}{6}\right)\right)^2\,dx\approx 1.375\times 10^{-4}$$ but so worse than $$\Phi_2=\int_0^1 \left(e^{-x}-\frac{1-\frac{x}{2}+\frac{x^2}{12}} {1+\frac{x}{2}+\frac{x^2}{12} }\right)^2\,dx\approx 3.127\times 10^{-8}$$
Edit
Developed at a point $x=a$, for a given function $f(x)$, the $[m,n]$ Padé approximant write $$p_{m,n}=\frac{\sum _{i=0}^m a_i (x-a)^i } {1+\sum _{i=1}^n b_i (x-a)^i }$$ Then, let us write in a first step $$\left(1+\sum _{i=1}^n b_i (x-a)^i \right)\,f(x)=\sum _{i=0}^m a_i (x-a)^i $$ and replace $f(x)$ by its corresponding Taylor expansion $$f(x)= \sum_{k=0} ^ {\infty} \frac {f^{(k)}(a)}{n!} (x-a)^{n}=\sum _{k=0}^{\infty} c_k (x-a)^k$$ which will be truncated to "some" order.
Now, expanding the summations and grouping for a given power of $(x-a)^j$, we have a series of linear equations in $a,b,c$ easy to solve for the $a$'s and $b$'s where the $c$'s are known. All of this is quite simple.
For illustration, let us do it for $f(x)=e^{-x}$ using the $[2,2]$ Padé approximant. We then have $$(1+b_1 x+b_2 x^2)\left(1-x+\frac{x^2}{2}-\frac{x^3}{6}+\frac{x^4}{24}\right)=a_0+a_1 x+a_2x^2$$
Expanding and grouping, this will give $$(1-a_0)+ (-a_1+b_1-1)x+ \left(-a_2-b_1+b_2+\frac{1}{2}\right)x^2+\left(\frac{b_1}{2}-b_2-\frac{1}{6}\right) x^3+\frac{1}{24} (-4 b_1+12 b_2+1) x^4=0$$ Cancelling all coefficients, the gives the equations $$1-a_0=0 \qquad -a_1+b_1-1=0 \qquad -a_2-b_1+b_2+\frac{1}{2}=0$$ $$ \frac{b_1}{2}-b_2-\frac{1}{6}=0\qquad -4 b_1+12 b_2+1=0$$ the solutions of which being $$a_0= 1\qquad a_1=-\frac 12 \qquad a_2=\frac 1 {12} \qquad b_1=\frac 12 \qquad b_2= \frac 1 {12}$$ which is your second expression.
Back to the two formulations given in your post, let us make the long divisions to get $$\frac{1-\frac{x}{2}+\frac{x^2}{8}}{1+\frac{x}{2}+\frac{x^2}{8} }=1-x+\frac{x^2}{2}-\frac{x^3}{8}+\frac{x^5}{64}+O\left(x^6\right)=1-x+\frac{x^2}{2}+O\left(x^\color{red}{3}\right)$$ while $$\frac{1-\frac{x}{2}+\frac{x^2}{12}}{1+\frac{x}{2}+\frac{x^2}{12}}=1-x+\frac{x^2}{2}-\frac{x^3}{6}+\frac{x^4}{24}-\frac{x^5}{144}+O\left(x^6\right)=1-x+\frac{x^2}{2}-\frac{x^3}{6}+\frac{x^4}{24}+O\left(x^\color{red}{5}\right)$$ when compared to the Taylor expansion of $e^{-x}$.
I hope and wish that this makes things clearer for you. If not, just post.