Maths WorkshopMaths problems with full solutions
Exercise 1524Calculus › Single-variable calculus › Differentiation › Taylor expansionsL2Added 3 Nov 2026

A rational approximation of cosine

#Padé approximant#undetermined coefficients#approximation

Statement

Find real numbers a,ba,b such that
cos⁡x−1+ax21+bx2=o(x4)as x→0,\cos x-\frac{1+ax^2}{1+bx^2}=o(x^4)\quad\text{as }x\to0,
and compute the next term of the difference. Compare cos⁡1\cos 1 with the approximation.

Hint

Expand 1+ax21+bx2=(1+ax2)(1−bx2+b2x4+o(x4))\dfrac{1+ax^2}{1+bx^2}=(1+ax^2)\bigl(1-bx^2+b^2x^4+o(x^4)\bigr).

Show solutionHide solution

Solution

Expansion of the fraction.
1+ax21+bx2=1+(a−b)x2−b(a−b)x4+o(x4).\frac{1+ax^2}{1+bx^2}=1+(a-b)x^2-b(a-b)x^4+o(x^4).

Matching with cos⁡x=1−x22+x424+o(x4)\cos x=1-\frac{x^2}2+\frac{x^4}{24}+o(x^4).
a−b=−12,−b(a−b)=b2=124 ⟹ b=112, a=−512.a-b=-\frac12,\qquad -b(a-b)=\frac b2=\frac1{24}\ \Longrightarrow\ b=\frac1{12},\ a=-\frac5{12}.

Result. cos⁡x≈1−512x21+112x2=12−5x212+x2\cos x\approx\dfrac{1-\frac5{12}x^2}{1+\frac1{12}x^2}=\dfrac{12-5x^2}{12+x^2}. Pushing the computation to order 66 gives
cos⁡x−12−5x212+x2=x6480+o(x6).\cos x-\frac{12-5x^2}{12+x^2}=\frac{x^6}{480}+o(x^6).

Test. At x=1x=1: 713=0.5385\frac7{13}=0.5385 while cos⁡1=0.5403\cos1=0.5403, an error of 1.8⋅10−31.8\cdot10^{-3}, close to 1480≈2⋅10−3\frac1{480}\approx2\cdot10^{-3}. The Taylor polynomial of degree 44 gives 0.541670.54167, with a similar error.

Remark. With the same number of coefficients (three), the rational approximation has the same order of accuracy as the polynomial. Padé approximants shine for functions with poles, where polynomials do badly.