# Newton-type methods of high order from a Taylor expansion

J.S.C. Prentice

► To cite this version:

J.S.C. Prentice. Newton-type methods of high order from a Taylor expansion. 2023. hal-04176347v2

HAL Id: hal-04176347

https://hal.science/hal-04176347v2

Preprint submitted on 21 Sep 2023

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Newton-type methods of high order from a Taylor expansion

J.S.C. Prentice

► To cite this version:

J.S.C. Prentice. Newton-type methods of high order from a Taylor expansion. 2023. hal-04176347v3

HAL Id: hal-04176347

https://hal.science/hal-04176347v3

Preprint submitted on 21 Jul 2024 (v3), last revised 31 Jan 2025 (v4)

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_2.png" /></figure>

# Newton-type methods of high order from a Taylor expansion

J. S. C. Prentice

Senior Research Officer
Mathsophical Ltd.
Johannesburg, South Africa
jpmsro@mathsophical.com

September 21, 2023

## Abstract

The well-known second-order Newton's Method can be derived using an appropriate Taylor expansion. However, it is possible to construct Newton-type methods of even higher order using the same Taylor expansion. We provide an insight into how this is done. The paper is aimed at undergraduate students and teachers of numerical analysis.

## 1 Introduction

Most undergraduate students are probably aware that an equation

$$f(x) = 0, \quad f: \mathbb{R} \to \mathbb{R}$$

can be solved numerically, if possible, using Newton's Method [1][2]. If we denote the solution to this equation by $p$ (i.e. $f(p) = 0$), then we can show, via a Taylor expansion (which we will do shortly) that

$$p = x_0 - \frac{f(x_0)}{f'(x_0)} - R, \quad (1)$$

where $R$ denotes a *residual* term. From this expression we derive the iterative scheme

$$x_{i+1} = x_i - \frac{f(x_i)}{f'(x_i)},$$

i.e. Newton's Method, with residual term

$$R \propto (p - x_i)^2.$$
<figure><img src="image_2.png" /></figure>

# Newton-type methods of high order from a Taylor expansion

J. S. C. Prentice

Faculty of Information Technology

Eduvos

Bedfordview, South Africa

justin.prentice@eduvos.com

July 12, 2024

## Abstract

The well-known second-order Newton's Method can be derived using an appropriate Taylor expansion. However, it is possible to construct Newton-type methods of even higher order using the same Taylor expansion. We provide an insight into how this is done. The paper is aimed at undergraduate students and teachers of numerical analysis.

## 1 Introduction

Most undergraduate students are probably aware that an equation

$$f(x) = 0, \quad f: \mathbb{R} \to \mathbb{R}$$

can be solved numerically, if possible, using Newton's Method [1][2]. If we denote the solution to this equation by $p$ (i.e. $f(p) = 0$), then we can show, via a Taylor expansion (which we will do shortly) that

$$p = x_0 - \frac{f(x_0)}{f'(x_0)} - R, \quad (1)$$

where $R$ denotes a *residual* term. From this expression we derive the iterative scheme

$$x_{i+1} = x_i - \frac{f(x_i)}{f'(x_i)},$$

i.e. Newton's Method, with residual term

$$R \propto (p - x_i)^2.$$
We say that Newton's Method is of second-order, because of the quadratic nature of $R$, and the expression (1) is sufficient to represent it.

It is possible to derive Newton-type methods that are of higher order using a Taylor expansion. The way in which this is done is the topic of this paper. It is not our intention to reinvent the wheel - Newton's Method has been well-studied over the years. Rather, we wish to describe a technique, for deriving higher-order versions, that may be unfamiliar to students and even teachers of the subject. We intend for this paper to be pedagogical, with the emphasis on method rather than result.

## 2 Derivation

We will use the following notation

$$h \equiv p - x_0$$
$$A_k \equiv \sum_{j=k}^{\infty} \frac{h^j f^{(j)}(x_0)}{j! f'(x_0)} = O(h^k), \quad k = 2, 3, \dots$$

where the $O(\cdot)$ notation indicates the lowest order term (in $h$) in the series. We refer to a term $O(h^m)$ as being of order $m$, or $m$th order. If we have a case where a term has the form $O(h^m) + O(h^n)$, we say the term is of order $O(h^{\min(m,n)})$. Moreover, if $T = O(h^m)$ and $C \neq h$, then $CT = O(h^m)$. We use the prime notation for derivatives of $f$ (as in $f', f'', f''$ etc.), and we note that

$$A_k \equiv \frac{h^k f^{(k)}(x_0)}{k! f'(x_0)} + \sum_{j=k+1}^{\infty} \frac{h^j f^{(j)}(x_0)}{j! f'(x_0)} = \frac{h^k f^{(k)}(x_0)}{k! f'(x_0)} + A_{k+1}, \quad (2)$$

a fact that we will use later.

The Taylor expansion of $f(p)$ about $x_0$ gives

$$\begin{aligned}
f(p) &= f(x_0 + h) = f(x_0) + h f'(x_0) + \frac{h^2 f''(x_0)}{2} + \frac{h^3 f'''(x_0)}{6} + \dots \\
&= f(x_0) + h f'(x_0) + \sum_{j=2}^{\infty} \frac{h^j f^{(j)}(x_0)}{j!},
\end{aligned}$$

so that

$$\begin{aligned}
0 &= f(x_0) + (p - x_0) f'(x_0) + \sum_{j=2}^{\infty} \frac{h^j f^{(j)}(x_0)}{j!} \\
\Rightarrow p &= x_0 - \frac{f(x_0)}{f'(x_0)} - \sum_{j=2}^{\infty} \frac{h^j f^{(j)}(x_0)}{j! f'(x_0)} \\
&= x_0 - \frac{f(x_0)}{f'(x_0)} - A_2.
\end{aligned} \quad (3)$$
We say that Newton's Method is of second-order, because of the quadratic nature of $R$, and the expression (1) is sufficient to represent it.

It is possible to derive Newton-type methods that are of higher order using a Taylor expansion. The way in which this is done is the topic of this paper. It is not our intention to reinvent the wheel - Newton's Method has been well-studied over the years. Rather, we wish to describe a technique, for deriving higher-order versions, that may be unfamiliar to students and even teachers of the subject. We intend for this paper to be pedagogical, with the emphasis on method rather than result.

## 2 Derivation

We will use the following notation

$$h \equiv p - x_0$$
$$A_k \equiv \sum_{j=k}^{\infty} \frac{h^j f^{(j)}(x_0)}{j! f'(x_0)} = O(h^k), \quad k = 2, 3, \dots$$

where the $O(\cdot)$ notation indicates the lowest order term (in $h$) in the series. We refer to a term $O(h^m)$ as being of order $m$, or $m$th order. If we have a case where a term has the form $O(h^m) + O(h^n)$, we say the term is of order $O(h^{\min(m,n)})$. Moreover, if $T = O(h^m)$ and $C \neq h$, then $CT = O(h^m)$. We use the prime notation for derivatives of $f$ (as in $f', f'', f''$ etc.), and we note that

$$A_k \equiv \frac{h^k f^{(k)}(x_0)}{k! f'(x_0)} + \sum_{j=k+1}^{\infty} \frac{h^j f^{(j)}(x_0)}{j! f'(x_0)} = \frac{h^k f^{(k)}(x_0)}{k! f'(x_0)} + A_{k+1}, \quad (2)$$

a fact that we will use later.

The Taylor expansion of $f(p)$ about $x_0$ gives

$$\begin{aligned} f(p) &= f(x_0 + h) = f(x_0) + h f'(x_0) + \frac{h^2 f''(x_0)}{2} + \frac{h^3 f'''(x_0)}{6} + \dots \\ &= f(x_0) + h f'(x_0) + \sum_{j=2}^{\infty} \frac{h^j f^{(j)}(x_0)}{j!}, \end{aligned}$$

so that

$$\begin{aligned} 0 &= f(x_0) + (p - x_0) f'(x_0) + \sum_{j=2}^{\infty} \frac{h^j f^{(j)}(x_0)}{j!} \\ \Rightarrow p &= x_0 - \frac{f(x_0)}{f'(x_0)} - \sum_{j=2}^{\infty} \frac{h^j f^{(j)}(x_0)}{j! f'(x_0)} \\ &= x_0 - \frac{f(x_0)}{f'(x_0)} - A_2. \end{aligned} \quad (3)$$
The expression on the RHS of (3) represents Newton's Method with residual term $A_2$ (which is $O(h^2)$). Using

$$h = p - x_0 = -\frac{f}{f'} - A_2 \Rightarrow \begin{cases} \frac{f}{f'} = -h - A_2 \\ h^2 = \left(\frac{f}{f'}\right)^2 + \frac{2A_2f}{f'} + A_2^2 = \left(\frac{f}{f'}\right)^2 + 2A_2(-h - A_2) + A_2^2 \end{cases}$$

(where we have dropped the argument $(x_0)$, for notational convenience), we find

$$\begin{align*} p = x_0 - \frac{f}{f'} - A_2 &= x_0 - \frac{f}{f'} - \left(\frac{h^2 f''}{2f'} + A_3\right) \quad (\text{using (2)}) \\ &= x_0 - \frac{f}{f'} - \frac{f''f^2}{2(f')^3} - \frac{A_2 f''}{f'} (-h - A_2) - \frac{A_2^2 f''}{2f'} - A_3 \\ &= x_0 - \frac{f}{f'} - \frac{f''f^2}{2(f')^3} + \underbrace{\left(\frac{hA_2 f''}{f'} - A_3 + \frac{A_2^2 f''}{f'} - \frac{A_2^2 f''}{2f'}\right)}_{O(h^3)} \\ &= x_0 - \frac{f}{f'} - \frac{f''f^2}{2(f')^3} + \underbrace{\frac{hA_2 f''}{f'} - A_3}_{O(h^4)} + \underbrace{\frac{A_2^2 f''}{2f'}}_{O(h^4)} \tag{4} \\ &= x_0 - \frac{f}{f'} - \frac{f''f^2}{2(f')^3} + O(h^3). \end{align*}$$

This is the *third-order* extension of Newton's Method. The residual term is $O(h^3)$. Furthermore,

$$\begin{align*} \frac{hA_2 f''}{f'} - A_3 &= \frac{f''}{f'} h \sum_{j=2}^{\infty} \frac{h^j f^{(j)}(x_0)}{j! f'(x_0)} - \frac{h^3 f'''}{6f'} - \sum_{j=4}^{\infty} \frac{h^j f^{(j)}(x_0)}{j! f'(x_0)} \\ &= \frac{h^3 (f'')^2}{2(f')^2} + \frac{f''}{f'} h \underbrace{\sum_{j=3}^{\infty} \frac{h^j f^{(j)}(x_0)}{j! f'(x_0)}}_{A_3} - \frac{h^3 f'''}{6f'} - \underbrace{\sum_{j=4}^{\infty} \frac{h^j f^{(j)}(x_0)}{j! f'(x_0)}}_{A_4} \\ &= \frac{h^3 (f'')^2}{2(f')^2} - \frac{h^3 f'''}{6f'} + \frac{f''}{f'} h A_3 - A_4 \\ &= \left( \frac{(f'')^2}{2(f')^2} - \frac{f'''}{6f'} \right) h^3 + \left( \frac{f''}{f'} h A_3 - A_4 \right). \end{align*}$$

Using

$$h^3 = -\frac{f^3}{(f')^3} - 3 \left(\frac{f}{f'}\right)^2 A_2 - \frac{3A_2^2 f}{f'} - A_2^3$$

and

$$\begin{align*} -3 \left(\frac{f}{f'}\right)^2 A_2 &= -3A_2 (-h - A_2)^2 \\ &= -3A_2 (h^2 + 2hA_2 + A_2^2) \end{align*}$$
The expression on the RHS of (3) represents Newton's Method with residual term $A_2$ (which is $O(h^2)$). Using

$$h = p - x_0 = -\frac{f}{f'} - A_2 \Rightarrow \begin{cases} \frac{f}{f'} = -h - A_2 \\ h^2 = \left(\frac{f}{f'}\right)^2 + \frac{2A_2f}{f'} + A_2^2 = \left(\frac{f}{f'}\right)^2 + 2A_2(-h - A_2) + A_2^2 \end{cases}$$

(where we have dropped the argument $(x_0)$, for notational convenience), we find

$$\begin{aligned} p = x_0 - \frac{f}{f'} - A_2 &= x_0 - \frac{f}{f'} - \left(\frac{h^2 f''}{2f'} + A_3\right) \quad (\text{using (2)}) \\ &= x_0 - \frac{f}{f'} - \frac{f''f^2}{2(f')^3} - \frac{A_2 f''}{f'} (-h - A_2) - \frac{A_2^2 f''}{2f'} - A_3 \\ &= x_0 - \frac{f}{f'} - \frac{f''f^2}{2(f')^3} + \underbrace{\left(\frac{hA_2 f''}{f'} - A_3 + \frac{A_2^2 f''}{f'} - \frac{A_2^2 f''}{2f'}\right)}_{O(h^3)} \\ &= x_0 - \frac{f}{f'} - \frac{f''f^2}{2(f')^3} + \underbrace{\frac{hA_2 f''}{f'} - A_3}_{O(h^4)} + \underbrace{\frac{A_2^2 f''}{2f'}}_{O(h^4)} \quad (4) \\ &= x_0 - \frac{f}{f'} - \frac{f''f^2}{2(f')^3} + O(h^3). \end{aligned}$$

This is the *third-order* extension of Newton's Method. The residual term is $O(h^3)$. Furthermore,

$$\begin{aligned} \frac{hA_2 f''}{f'} - A_3 &= \frac{f''}{f'} h \sum_{j=2}^{\infty} \frac{h^j f^{(j)}(x_0)}{j! f'(x_0)} - \frac{h^3 f'''}{6f'} - \sum_{j=4}^{\infty} \frac{h^j f^{(j)}(x_0)}{j! f'(x_0)} \\ &= \frac{h^3 (f'')^2}{2(f')^2} + \frac{f''}{f'} h \underbrace{\sum_{j=3}^{\infty} \frac{h^j f^{(j)}(x_0)}{j! f'(x_0)}}_{A_3} - \frac{h^3 f'''}{6f'} - \underbrace{\sum_{j=4}^{\infty} \frac{h^j f^{(j)}(x_0)}{j! f'(x_0)}}_{A_4} \\ &= \frac{h^3 (f'')^2}{2(f')^2} - \frac{h^3 f'''}{6f'} + \frac{f''}{f'} h A_3 - A_4 \\ &= \left( \frac{(f'')^2}{2(f')^2} - \frac{f'''}{6f'} \right) h^3 + \left( \frac{f''}{f'} h A_3 - A_4 \right). \end{aligned}$$

Using

$$h^3 = -\frac{f^3}{(f')^3} - 3 \left(\frac{f}{f'}\right)^2 A_2 - \frac{3A_2^2 f}{f'} - A_2^3$$

and

$$\begin{aligned} -3 \left(\frac{f}{f'}\right)^2 A_2 &= -3A_2(-h - A_2)^2 \\ &= -3A_2(h^2 + 2hA_2 + A_2^2) \end{aligned}$$
gives

$$
\begin{align}
\frac{h A_2 f''}{f'} - A_3 &= \left( \frac{(f'')^2}{2(f')^2} - \frac{f'''}{6f'} \right) \left( -\frac{f^3}{(f')^3} - 3 \left(\frac{f}{f'}\right)^2 A_2 - \frac{3A_2^2 f}{f'} - A_2^3 \right) + \left( \frac{f''}{f'} h A_3 - A_4 \right) \nonumber \\
&= \left( -\frac{f^3}{(f')^3} \frac{(f'')^2}{2(f')^2} + \frac{f^3}{(f')^3} \frac{f'''}{6f'} \right) \nonumber \\
&\quad + \left( \underbrace{-3 \left(\frac{f}{f'}\right)^2 A_2}_{-3A_2(h^2+2hA_2+A_2^2)} - \frac{3A_2^2 f}{f'} - A_2^3 \right) + \left( \underbrace{\frac{f''}{f'} h A_3 - A_4}_{O(h^4)} \right) \tag{5} \\
&= \left( -\frac{f^3}{(f')^3} \frac{(f'')^2}{2(f')^2} + \frac{f^3}{(f')^3} \frac{f'''}{6f'} \right) + O(h^4) + O(h^5) + O(h^6) \tag{6} \\
&= \frac{-3 (f'')^2 f^3 + f''' f' f^3}{6 (f')^5} + O(h^4), \nonumber
\end{align}
$$

so that

$$
\begin{align}
p &= x_0 - \frac{f}{f'} - \frac{f'' f^2}{2 (f')^3} - \frac{(3 (f'')^2 - f' f''') f^3}{6 (f')^5} + \underbrace{O(h^4) + \frac{A_2^2 f''}{2 f'}}_{O(h^4)} \quad \text{(from (4))} \nonumber \\
&= x_0 - \frac{f}{f'} - \frac{f'' f^2}{2 (f')^3} - \frac{(3 (f'')^2 - f' f''') f^3}{6 (f')^5} + O(h^4). \tag{7}
\end{align}
$$

This is the *fourth-order* extension of Newton’s Method. The residual term is $O(h^4)$. We explain the $O(h^4) + O(h^5) + O(h^6)$ term in (6) in Appendix A.

Following this scheme, even higher-order methods can be constructed. Also, if we are willing to work with multidimensional Taylor expansions, we can derive analogous methods for systems of equations. Those, however, are topics for another day.

Nevertheless, we leave the interested reader with a challenge: show that the *fifth-order* extension of Newton’s Method is given by

$$
p = x_0 - \frac{f}{f'} - \frac{f'' f^2}{2 (f')^3} - \frac{(3 (f'')^2 - f' f''') f^3}{6 (f')^5} \\
\qquad - \frac{\left(15 (f'')^3 - 10 f' f'' f''' + (f')^2 f^{(iv)}\right) f^4}{24 (f')^7} + O(h^5).
$$

The solution is sketched in Appendix B.

We hope you have found this paper interesting and informative, and we refer you to our related work [3] where we discuss the derivation of the same expressions using *functional iteration*.
gives

$$ 
\begin{aligned}
\frac{h A_2 f''}{f'} - A_3 &= \left( \frac{(f'')^2}{2(f')^2} - \frac{f'''}{6f'} \right) \left( -\frac{f^3}{(f')^3} - 3 \left( \frac{f}{f'} \right)^2 A_2 - \frac{3A_2^2 f}{f'} - A_2^3 \right) + \left( \frac{f''}{f'} h A_3 - A_4 \right) \\
&= \left( \frac{f^3}{(f')^3} \frac{(f'')^2}{2(f')^2} + \frac{f^3}{(f')^3} \frac{f'''}{6f'} \right) \\
&\quad + \left( \frac{(f'')^2}{2(f')^2} - \frac{f'''}{6f'} \right) \underbrace{-3 \left( \frac{f}{f'} \right)^2 A_2 - \frac{3A_2^2 f}{f'} - A_2^3}_{-3A_2(h^2+2hA_2+A_2^2)} + \underbrace{\left( \frac{f''}{f'} h A_3 - A_4 \right)}_{O(h^4)} \quad (5) \\
&= \left( -\frac{f^3}{(f')^3} \frac{(f'')^2}{2(f')^2} + \frac{f^3}{(f')^3} \frac{f'''}{6f'} \right) + O(h^4) + O(h^5) + O(h^6) \quad (6) \\
&= \frac{-3 (f'')^2 f^3 + f''' f' f^3}{6 (f')^5} + O(h^4),
\end{aligned}
$$

so that

$$ 
\begin{aligned}
p &= x_0 - \frac{f}{f'} - \frac{f'' f^2}{2 (f')^3} - \frac{(3 (f'')^2 - f' f''') f^3}{6 (f')^5} + \underbrace{O(h^4) + \frac{A_2^2 f''}{2 f'}}_{O(h^4)} \quad (\text{from (4)}) \\
&= x_0 - \frac{f}{f'} - \frac{f'' f^2}{2 (f')^3} - \frac{(3 (f'')^2 - f' f''') f^3}{6 (f')^5} + O(h^4). \quad (7)
\end{aligned}
$$

This is the *fourth-order* extension of Newton's Method. The residual term is $O(h^4)$. We explain the $O(h^4) + O(h^5) + O(h^6)$ term in (6) in Appendix A.

Following this scheme, even higher-order methods can be constructed. Also, if we are willing to work with multidimensional Taylor expansions, we can derive analogous methods for systems of equations. Those, however, are topics for another day.

Nevertheless, we leave the interested reader with a challenge: show that the *fifth-order* extension of Newton's Method is given by

$$ 
\begin{aligned}
p = x_0 & - \frac{f}{f'} - \frac{f'' f^2}{2 (f')^3} - \frac{(3 (f'')^2 - f' f''') f^3}{6 (f')^5} \\
& - \frac{(15 (f'')^3 - 10 f' f'' f''' + (f')^2 f^{(iv)}) f^4}{24 (f')^7} + O(h^5).
\end{aligned}
$$

The solution is sketched in Appendix B.

We hope you have found this paper interesting and informative, and we refer you to our related work [3] where we discuss the derivation of the same expressions using *functional iteration*.
## References

[1] Burden, R. L., & Faires, J. D. (2011). *Numerical Analysis 9th ed.* Pacific Grove, CA: Brooks/Cole.

[2] Kincaid, D. and Cheney, W. (2002). *Numerical Analysis: Mathematics of Scientific Computing, 3rd ed.*, Pacific Grove, CA: Brooks/Cole.

[3] Prentice, J. S. C., Newton-type methods of high order via functional iteration, *HAL open science*, 2023, (https://hal.science/hal-04177941)

---

## Appendix A

We have

$$3A_2(h^2 + 2hA_2 + A_2^2) = 3A_2h^2 + 6hA_2^2 + 3A_2^3 = O(h^4) + O(h^5) + O(h^6)$$

$$\frac{3A_2^2 f}{f'} = 3A_2^2(-h - A_2) = -3A_2^2h - 3A_2^3 = O(h^5) + O(h^6)$$

$$A_2^3 = O(h^6)$$

$$\frac{f''}{f'}hA_3 - A_4 = O(h^4) + O(h^4)$$

and so

$$\left(\frac{(f'')^2}{2(f')^2} - \frac{f'''}{6f'}\right) \left(\underbrace{-3\left(\frac{f}{f'}\right)^2 A_2 - \frac{3A_2^2 f}{f'} - A_2^3}_{-3A_2(h^2+2hA_2+A_2^2)}\right) + \left(\underbrace{\frac{f''}{f'}hA_3 - A_4}_{O(h^4)}\right) \\
= O(h^4) + O(h^5) + O(h^6) + O(h^5) + O(h^6) + O(h^6) + O(h^4) + O(h^4) \\
= O(h^4) + O(h^5) + O(h^6) \\
= O(h^4).$$
## References

[1] Burden, R. L., & Faires, J. D. (2011). *Numerical Analysis 9th ed.* Pacific Grove, CA: Brooks/Cole.

[2] Kincaid, D. and Cheney, W. (2002). *Numerical Analysis: Mathematics of Scientific Computing, 3rd ed.*, Pacific Grove, CA: Brooks/Cole.

[3] Prentice, J. S. C., Newton-type methods of high order via functional iteration, *HAL open science*, 2023, (https://hal.science/hal-04177941)

---

## Appendix A

We have

$$3A_2(h^2 + 2hA_2 + A_2^2) = 3A_2h^2 + 6hA_2^2 + 3A_2^3 = O(h^4) + O(h^5) + O(h^6)$$

$$\frac{3A_2^2 f}{f'} = 3A_2^2 (-h - A_2) = -3A_2^2 h - 3A_2^3 = O(h^5) + O(h^6)$$

$$A_2^3 = O(h^6)$$

$$\frac{f''}{f'}hA_3 - A_4 = O(h^4) + O(h^4)$$

and so

$$\left( \frac{(f'')^2}{2(f')^2} - \frac{f''''}{6f'} \right) \left( \underbrace{-3 \left( \frac{f}{f'} \right)^2 A_2}_{-3A_2(h^2+2hA_2+A_2^2)} - \frac{3A_2^2 f}{f'} - A_2^3 \right) + \left( \underbrace{\frac{f''}{f'}hA_3 - A_4}_{O(h^4)} \right) \\
= O(h^4) + O(h^5) + O(h^6) + O(h^5) + O(h^6) + O(h^6) + O(h^4) + O(h^4) \\
= O(h^4) + O(h^5) + O(h^6) \\
= O(h^4).$$
# Appendix B

We gather all the $O(h^4)$ terms from the fourth-order extension (7) and expand as follows:

$$-3A_2h^2 = -3h^2 \sum_{j=2}^{\infty} \frac{h^j f^{(j)}}{j!f'} = -3h^2 \left(\frac{h^2 f''}{2f'}\right) - [3h^2 A_3] \\ \frac{f''}{f'} h A_3 = \frac{f''}{f'} h \left(\frac{h^3 f'''}{6f'}\right) + \left[\frac{f''}{f'} h A_4\right]$$

$$-A_4 = -\frac{h^4 f^{(iv)}}{24f'} - [A_5]$$

$$\frac{A_2^2 f''}{2f'} = \frac{f''}{2f'} \left( \sum_{j=2}^{\infty} \frac{h^j f^{(j)}}{j!f'} \right)^2 = \frac{f''}{2f'} \left( \frac{h^2 f''}{2f'} + A_3 \right)^2 \\ = \frac{f''}{2f'} \left( \frac{h^2 f''}{2f'} \right)^2 + \left[ \frac{f''}{2f'} \left( \frac{h^2 f'' A_3}{f'} + A_3^2 \right) \right]$$

In each case, the term in square brackets on the RHS is $O(h^5)$. Collecting only the terms in $h^4$ gives

$$-3h^2 \left( \frac{h^2 f''}{2f'} \right) \left( \frac{(f'')^2}{2(f')^2} - \frac{f'''}{6f'} \right) + \frac{f''}{f'} h \left( \frac{h^3 f'''}{6f'} \right) - \frac{h^4 f^{(iv)}}{24f'} + \frac{f''}{2f'} \left( \frac{h^2 f''}{2f'} \right)^2 \\ = \left( -\frac{3f''}{2f'} \left( \frac{(f'')^2}{2(f')^2} - \frac{f'''}{6f'} \right) + \frac{f''f'''}{6(f')^2} - \frac{f^{(iv)}}{24f'} + \left( \frac{f''}{2f'} \right)^3 \right) h^4$$

as the component of the $O(h^4)$ term in (7) that is proportional to $h^4$ (the factor $(\frac{(f'')^2}{2(f')^2} - \frac{f'''}{6f'})$ arises from (5)).

Now, we have

$$h^4 = \left(-\frac{f}{f'} - A_2\right)^4 = \left(\frac{f}{f'}\right)^4 + \left(4A_2 \left(\frac{f}{f'}\right)^3 + 6A_2^2 \left(\frac{f}{f'}\right)^2 + 4A_2^3 \left(\frac{f}{f'}\right) + A_2^4\right) \\ = \left(\frac{f}{f'}\right)^4 + \underbrace{O(h^5) + O(h^6) + O(h^7) + O(h^8)}_{O(h^5)}$$

where we have used $\frac{f}{f'} = -h - A_2$ to obtain the last line.
# Appendix B

We gather all the $O(h^4)$ terms from the fourth-order extension (7) and expand as follows:

$$ 
\begin{aligned}
-3A_2h^2 &= -3h^2 \sum_{j=2}^{\infty} \frac{h^j f^{(j)}}{j!f'} = -3h^2 \left(\frac{h^2 f''}{2f'}\right) - [3h^2 A_3] \\
\frac{f''}{f'} h A_3 &= \frac{f''}{f'} h \left(\frac{h^3 f'''}{6f'}\right) + \left[\frac{f''}{f'} h A_4\right] \\
-A_4 &= -\frac{h^4 f^{(iv)}}{24f'} - [A_5] \\
\frac{A_2^2 f''}{2f'} &= \frac{f''}{2f'} \left(\sum_{j=2}^{\infty} \frac{h^j f^{(j)}}{j!f'}\right)^2 = \frac{f''}{2f'} \left(\frac{h^2 f''}{2f'} + A_3\right)^2 \\
&= \frac{f''}{2f'} \left(\frac{h^2 f''}{2f'}\right)^2 + \left[\frac{f''}{2f'} \left(\frac{h^2 f'' A_3}{f'} + A_3^2\right)\right]
\end{aligned}
$$

In each case, the term in square brackets on the RHS is $O(h^5)$. Collecting only the terms in $h^4$ gives

$$ 
\begin{aligned}
& -3h^2 \left(\frac{h^2 f''}{2f'}\right) \left(\frac{(f'')^2}{2(f')^2} - \frac{f'''}{6f'}\right) + \frac{f''}{f'} h \left(\frac{h^3 f'''}{6f'}\right) - \frac{h^4 f^{(iv)}}{24f'} + \frac{f''}{2f'} \left(\frac{h^2 f''}{2f'}\right)^2 \\
& = \left(-\frac{3f''}{2f'} \left(\frac{(f'')^2}{2(f')^2} - \frac{f'''}{6f'}\right) + \frac{f'' f'''}{6(f')^2} - \frac{f^{(iv)}}{24f'} + \left(\frac{f''}{2f'}\right)^3\right) h^4
\end{aligned}
$$

as the component of the $O(h^4)$ term in (7) that is proportional to $h^4$ (the factor $(\frac{(f'')^2}{2(f')^2} - \frac{f'''}{6f'})$ arises from (5)).

Now, we have

$$ 
\begin{aligned}
h^4 &= \left(-\frac{f}{f'} - A_2\right)^4 = \left(\frac{f}{f'}\right)^4 + \left(4A_2 \left(\frac{f}{f'}\right)^3 + 6A_2^2 \left(\frac{f}{f'}\right)^2 + 4A_2^3 \left(\frac{f}{f'}\right) + A_2^4\right) \\
&= \left(\frac{f}{f'}\right)^4 + \underbrace{O(h^5) + O(h^6) + O(h^7) + O(h^8)}_{O(h^5)}
\end{aligned}
$$

where we have used $\frac{f}{f'} = -h - A_2$ to obtain the last line.
Hence,

$$ 
\begin{aligned}
& \left( -\frac{3f''}{2f'} \left( \frac{(f'')^2}{2(f')^2} - \frac{f'''}{6f'} \right) + \frac{f''f'''}{6(f')^2} - \frac{f^{(iv)}}{24f'} + \left( \frac{f''}{2f'} \right)^3 \right) h^4 \\
&= \left( -\frac{3f''}{2f'} \left( \frac{(f'')^2}{2(f')^2} - \frac{f'''}{6f'} \right) + \frac{f''f'''}{6(f')^2} - \frac{f^{(iv)}}{24f'} + \left( \frac{f''}{2f'} \right)^3 \right) \left( \left( \frac{f}{f'} \right)^4 + O(h^5) \right) \\
&= - \frac{\left( 15(f'')^3 - 10f'f''f''' + (f')^2 f^{(iv)} \right) f^4}{24(f')^7} + O(h^5)
\end{aligned}
$$

after performing the appropriate algebra.

<figure><img src="image_3.png" /></figure>
Hence,

$$ 
\begin{aligned}
& \left( -\frac{3f''}{2f'} \left( \frac{(f'')^2}{2(f')^2} - \frac{f'''}{6f'} \right) + \frac{f''f'''}{6(f')^2} - \frac{f^{(iv)}}{24f'} + \left( \frac{f''}{2f'} \right)^3 \right) h^4 \\
&= \left( -\frac{3f''}{2f'} \left( \frac{(f'')^2}{2(f')^2} - \frac{f'''}{6f'} \right) + \frac{f''f'''}{6(f')^2} - \frac{f^{(iv)}}{24f'} + \left( \frac{f''}{2f'} \right)^3 \right) \left( \left( \frac{f}{f'} \right)^4 + O(h^5) \right) \\
&= - \frac{\left( 15(f'')^3 - 10f'f''f''' + (f')^2 f^{(iv)} \right) f^4}{24(f')^7} + O(h^5)
\end{aligned}
$$

after performing the appropriate algebra.