# How can I approximate the root of $\cos x = x$ with a Taylor series?

I want an expression to approximate the dottie number. The reason I want to use a Taylor series rather than, say, Newton's Method is because I want to guarantee that the approximation is within a certain percentage of error which is something that is easy to do with Taylor polynomials.

The problem is that the only way I seem to be able to do this is by setting the Taylor series for $\cos x$ equal to $x$. This leaves me with the following expression:

$$-x+\sum_{n=0}^{\infty} \frac{(-1)^nx^{2n}}{(2n)!}=0$$ Expanded this looks like: $$1-x-\frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} \cdots=0$$

I can solve for $x$ at $n=1,2$ but of course when $n>2$ the degree of the taylor polynomial is higher than a quartic and I can't solve the equation in general (Abel's Impossibility Theorem). To approximate those roots I would have to use something like Newton's method and we are back at square one.

Is it even possible to approximate the Dottie number to an arbitrary precision? Am I missing something?

• Pedantic nitpick, don't know if it's relevant: "no closed form solution exists" does not follow from Abel's theorem, and I don't even know if it's true. Abel's theorem states, when applied to $n=5$, that there is no closed-form algebraic solution to $ax^5+bx^4+cx^3+dx^2+ex+f = 0$. It does not rule out an algebraic solution to $\frac{x^5}{6!} - \frac{x^3}{4!} + \frac{x}{2!} = 0$. – Patrick Stevens Apr 7 '18 at 16:05
• Another thing: $\cos x - x$ does not have the Taylor series you gave. Its Taylor series is $1-x-\frac{x^2}{2!}+\frac{x^4}{4!}-\dots$. – Patrick Stevens Apr 7 '18 at 16:07
• My bad, I'll edit the question to reflect this. Thanks! – Ozaner Hansha Apr 7 '18 at 16:10
• For what it is worth, one of the solutions to $1-x-\frac{x^2}{2!}=0$ is about $0.7320508$, and with a lot of effort one of the real solutions to $1-x-\frac{x^2}{2!}+\frac{x^4}{4!}=0$ is about $0.739219$, while the real solution to $\cos(x)=x$ is about $0.739085$ – Henry Apr 7 '18 at 16:20
• You can do the same with Newton's method. If $f(x)$ is a convex, increasing function over the interval $[a,b]$ with a root $\zeta\in(a,b)$, Newton's method with starting point $b$ converges to $\zeta$ quadratically and monotonically. – Jack D'Aurizio Apr 7 '18 at 17:12

You can find a zero of $f(x)=\cos(x)-x$ to arbitrary precision, and have an upper bound of your error estimate, using the bisection method.
We know $f(0)=1>0$, $f(1)<0$, so we evaluate $f(1/2)$. We find $f(1/2)>0$, so we change our interval of interest from $[0,1]$ to $[1/2,1]$ and continue by evaluating $f(3/4)$. It turns out $f(3/4)<0$, so we are now in $[1/2,3/4]$.
First of all if you plan to use Taylor series you need to modify your equation to $$\sum_{n=0}^{\infty} \frac{(-1)^nx^{2n}}{(2n)!}= 1-\frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} \cdots=x$$ Which is not easy to solve for x.