Like $\log(1+x)$? Is there any algorithms? I have read many materials but doesn't have an idea
1 Answers
The Pade approximation of order $(m,n)$ to a function $f$ is a local rational approximation of the form
$$f(x) \approx \frac{P_m(x)}{Q_n(x)}= \frac{\sum_{j=0}^{m}p_jx^j}{\sum_{j=0}^{n}q_jx^j}.$$
Expand $f(x)$ in a Maclaurin series
$$f(x) = \sum_{j=0}^{\infty}a_jx^j$$ and look at the difference
$$f(x) - \frac{P_m(x)}{Q_n(x)}= \frac{\left(\sum_{j=0}^{\infty}a_jx^j\right)\left(\sum_{j=0}^{n}q_jx^j\right)-\sum_{j=0}^{m}p_jx^j}{\sum_{j=0}^{n}q_jx^j}.$$
Let $q_0 = 1$ so the denominator does not vanish at $x=0$ and solve for the remaining $m+n+1$ coefficients $p_j$ and $q_j$ such that the left-hand side and its first $m+n$ derivatives equal $0$ at $x=0$. This leads to $m+n+1$ linear equations for the unknown coefficients.
$$p_0 = a_0q_0\\p_1 = a_1q_0+a_0q_1\\ \ldots \\p_m = a_mq_0+a_{m-1}q_1+ \,\ldots +a_{m-n}q_n\\a_{m+1}q_0+a_mq_1+ \, \ldots a_{m-n+1}q_n = 0\\a_{m+2}q_0+a_{m+1}q_1+ \, \ldots a_{m-n+2}q_n = 0\\ \ldots \\a_{m+n}q_0+a_{m+n-1}q_1+ \, \ldots a_{m}q_n = 0$$
An advantage of the Pade approximation is that it is relatively easy to compute. In some cases, the approximation is good outside the radius of convergence of the Maclaurin series. A disadvantage is there is no general closed form bound on the error.
For $\log(1+x)$ start with the expansion
$$\log(1+x) = \sum_{j=1}^{\infty}\frac{(-1)^{j+1}x^{j}}{j}$$
For the order $(2,2)$ approximant
$$q_0 = 1 \\\\ p_0 = a_0q_0\\\\p_1 = a_1q_0+a_0q_1 \\\\p_2 = a_2q_0+a_1q_1+a_0q_2 \\\\a_3q_0+a_2q_1+a_1q_2=0\\\ a_4q_0+a_3q_1+a_2q_2=0.$$
The approximation is
$$\log(1+x) \approx \frac{x+\frac1{2}x^2}{1+x+\frac1{6}x^2}$$

- 90,707
-
sorry I found your answer just now. Is there any rule to transform the series to pade approximation?I heard Euclidean algorithm is a way but i do not know how to implement it. – Lookout Jul 11 '14 at 13:27
-
I wrote out the system of equations for the coeFficients. – RRL Jul 11 '14 at 14:04
-
So its a simple exercise in solving some linear equations as I show. Also there are recurrence relations that generate higher order approximations from lower order approximations. – RRL Jul 11 '14 at 14:29
-
Is there something wrong with the fifth line and the last? fifth: lhs missed a0q3, rhs missed p3? @RRL – Lookout Jul 11 '14 at 14:45
-
Are you asking about the $(2,2)$ approximation for log? The highest order coeffiicents we need here are $p_2$ and $q_2$. – RRL Jul 11 '14 at 14:48
-
oh I see ,thank you very much. – Lookout Jul 11 '14 at 14:51
-
You're welcome. – RRL Jul 11 '14 at 14:53
-
@RRL where can I find these "recurrence relations that generate higher order approximations from lower order approximations"? Is this simply Levinson–Durbin, or is there something more compact/elegant? – Aaron Voelker Feb 25 '17 at 06:55
-
1@AaronVoelker: I have not looked at this for a while as evidenced by the date of this post. I need to check some references and get back to you. Thanks. – RRL Feb 25 '17 at 07:14
-
I think Shank's transformation in the case of Wynn's epsilon algorithm might be relevant here. There is also Rutishauser’s quotient-difference (QD) algorithm. Looking at the text Practical Extrapolation Methods (2003) concurrently as well. – Aaron Voelker Feb 25 '17 at 07:26