Next Article in Journal
Study of Second-Order Differential Operators on Graphs with Small Edges
Next Article in Special Issue
A Weight Function Generalization of Singh–Sharma Fifth-Order Method for Systems of Nonlinear Equations, with Application to a Discretized Stationary Viscous Burgers Problem
Previous Article in Journal
The Structure of a Prestack over the Complex Plane on the Set of All Spaces of Pseudoanalytic Functions
Previous Article in Special Issue
Fibonacci Wavelet Collocation Method for Solving Dengue Fever SIR Model
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Posteriori Error Estimation and Adaptive Taylor Series Methods for Nonlinear Function Approximation

Department of Mathematical and Statistical Sciences, University of Nebraska at Omaha, Omaha, NE 68182, USA
Mathematics 2026, 14(5), 805; https://doi.org/10.3390/math14050805
Submission received: 1 February 2026 / Revised: 18 February 2026 / Accepted: 25 February 2026 / Published: 27 February 2026

Abstract

The Taylor approximation theorem is a fundamental tool in numerical analysis, providing a local polynomial representation of smooth functions. In practical computations, a function f is approximated by a finite Taylor polynomial P n , and controlling the resulting truncation error is of central importance. In this paper, we introduce two novel a posteriori error estimation techniques for Taylor polynomial approximations. The proposed estimators are fully computable and do not require prior bounds on the ( n + 1 ) st derivatives of f. We prove that the estimators converge to the exact error both pointwise and in the L 2 -norm as n , and we establish their asymptotic sharpness through effectivity analysis. Based on these results, we develop two adaptive algorithms that automatically determine the minimal degree n required to achieve a prescribed tolerance, either at a specific point or over a domain. We further extend the analysis to multivariate functions and show that analogous estimators and effectivity properties hold in higher dimensions. Numerical experiments are presented to validate the theoretical results and demonstrate the practical performance of the proposed methods.

1. Introduction

Taylor’s Theorem plays a fundamental role in numerical analysis and approximation theory. At its core, the theorem states that any sufficiently smooth (analytic) function can be locally approximated by a polynomial expansion about a given point. This principle underlies a wide range of numerical algorithms and theoretical developments, including interpolation, quadrature, the numerical solution of differential equations, and the implementation of transcendental functions in finite-precision arithmetic; see, for example [1]. Because of its central importance, Taylor’s Theorem is often one of the first analytical tools used to understand both the construction and the accuracy of numerical approximations.
For the sake of completeness, let us recall Taylor’s theorem with the Lagrange remainder; see, for example [2,3].
Theorem 1 (Taylor’s Theorem with Lagrange Remainder).
Suppose that f C n [ a , b ] , f ( n + 1 ) exists on ( a , b ) , and x 0 [ a , b ] . Then, for every x [ a , b ] , there exists a number ξ = ξ ( x ) between x 0 and x such that
f ( x ) = P n ( x ) + R n ( x ) ,
where P n ( x ) is the nth Taylor polynomial for f about x 0 and R n ( x ) is the truncation error term associated with P n ( x ) . They are give explicitly by
P n ( x ) = k = 0 n f ( k ) ( x 0 ) k ! ( x x 0 ) k , R n ( x ) = f ( n + 1 ) ( ξ ) ( n + 1 ) ! ( x x 0 ) n + 1 .
This classical result provides an explicit representation of the approximation error incurred when a function f is replaced by its Taylor polynomial P n ; see [4]. In particular, it expresses the error in terms of higher-order derivatives of the function evaluated at an unknown intermediate point. This formulation not only justifies the use of Taylor polynomials as local approximations, but also yields a natural a priori estimate for the truncation error.
Taylor’s Theorem asserts that any sufficiently smooth function f ( x ) can be locally approximated by its Taylor polynomial P n ( x ) . In general, this approximation only holds for x close enough to x 0 , and as x moves away from the center x 0 , the truncation error, f ( x ) P n ( x ) , generally increases, emphasizing the local nature of the approximation. From a numerical perspective, Taylor’s Theorem may be viewed as a basic numerical method to approximate a complicated function f ( x ) by its Taylor polynomial P n ( x ) . It gives an estimate for the truncation error f ( x ) P n ( x ) made when approximating the function f ( x ) with P n ( x ) . Depending on whether x is a fixed value or a variable in the interval [ a , b ] , there are two cases:
1.
When approximating f ( x ) at a fixed point x [ a , b ] , the truncation error can be bounded as
f ( x ) P n ( x ) | x x 0 | n + 1 ( n + 1 ) ! max ξ [ a , b ] | f ( n + 1 ) ( ξ ) | .
2.
If the approximation is considered over an entire interval [ a , b ] , a uniform bound follows as
| f ( x ) P n ( x ) | 1 ( n + 1 ) ! max x [ a , b ] x x 0 n + 1 max ξ [ a , b ] | f ( n + 1 ) ( ξ ) | ,
where, in both cases, we used that fact that ξ [ a , b ] since x , x 0 [ a , b ] and ξ is between x 0 and x.
In both cases, the error estimate relies crucially on global information about the ( n + 1 ) st derivative of f. Hence, provided that f ( n + 1 ) ( x ) is bounded on [ a , b ] , one can derive an explicit upper bound for the remainder term, yielding a worst-case estimate for the approximation error. To illustrate this classical error analysis, we consider the function f ( x ) = e x and x 0 = 0 , then Taylor’s Theorem gives
f ( x ) = k = 0 n ( 1 ) k k ! x k + ( 1 ) n + 1 e ξ ( n + 1 ) ! x n + 1 , ξ is between 0 and x .
If x [ 0 , 1 ] , then ξ ( 0 , 1 ) since ξ is between 0 and x. Thus, x [ 0 , 1 ] , we have the following estimate
f ( x ) P n ( x ) = R n ( x ) = | ( 1 ) n + 1 e ξ ( n + 1 ) ! x n + 1 | = e ξ ( n + 1 ) ! x n + 1 1 ( n + 1 ) ! .
If we desire the error to be within a certain specified tolerance ϵ then we simply need 1 ( n + 1 ) ! ϵ , which can be used to find the degree n required to ensure f ( x ) P n ( x ) ϵ , x [ 0 , 1 ] .
The application of Taylor series expansions of functions is well known in pure and applied mathematics. In practical computation, mathematical functions f ( x ) are frequently approximated by Taylor polynomials P n ( x ) . This occurs in various contexts, such as implementing elementary functions in floating-point arithmetic, conducting quadrature, or performing theoretical analysis involving transcendental functions. In addition, many numerical schemes for solving various mathematical problems are based on Taylor’s Theorem; see e.g., [5,6,7,8,9,10,11,12] and the references therein.
Despite their widespread use, Taylor-based approximations present a fundamental challenge: classical error estimates require knowledge of f ( n + 1 ) over the entire interval of interest. In many applications, this information is unavailable or expensive to compute, especially when only local data (such as function values and derivatives at a single point) are known. This limitation motivates the development of a posteriori error estimation techniques, which aim to assess the accuracy of an approximation using only computable quantities. Moreover, achieving a prescribed level of accuracy in numerical computations typically necessitates adaptive procedures, for which a posteriori estimates are indispensable. A posteriori error estimates play a critical role in adaptive methods. They are used to assess the accuracy of computed solutions and to control the actual error. While a posteriori error estimation is well established for differential equations and finite element methods, analogous results for Taylor series approximations remain largely unexplored.
The main objective of this paper is to address this gap. We develop and analyze, for the first time, a posteriori error estimators for Taylor series approximations that do not rely on knowledge of the ( n + 1 ) st derivative of the function i.e., | f ( n + 1 ) ( ξ ) | . To be more precise, we only assume that the derivatives f ( k ) ( x 0 ) , k = 0 , 1 , are available at a single expansion point x 0 , and we construct computable error bounds that converge to 0 as the polynomial degree n without using the information of | f ( n + 1 ) ( ξ ) | over [ a , b ] . The proposed error estimates are computationally simple to evaluate, and they converge to 0 as n . Building on these estimators, we propose two adaptive algorithms that automatically select the Taylor polynomial degree n required to achieve a prescribed accuracy, either at a fixed point or over a domain. Several numerical examples are presented to demonstrate the convergence of the proposed estimators. To the best of our knowledge, this work represents the first systematic development of efficient a posteriori error estimators for Taylor series expansion methods.
The rest of the paper is organized as follows. In Section 2, we derive a priori error estimates for the approximation error f P n in both the maximum-norm and the L 2 -norm. In Section 3, we present and analyze two a posteriori error estimation procedures. In Section 4, we propose two adaptive algorithms that can be used to approximate f ( x ) with P n ( x ) at a specified value of x or over an interval [ a , b ] . Section 5 extends our approach to functions of two and more variables. Several numerical examples are provided in Section 6 to validate the theoretical findings. Finally, Section 7 is devoted to some concluding remarks.

2. A Priori Error Estimates

We first introduce some definitions and notations. The L 2 -norm of f ( x ) over the interval I = [ a , b ] is denoted by f L 2 [ a , b ] = a b f 2 ( x ) d x 1 / 2 . Let
H s [ a , b ] = f : a b | f ( k ) ( x ) | 2 d x < , 0 k s , s = 0 , 1 , ,
be the standard Sobolev space. The H s [ a , b ] -norm for s 1 is defined as u H s [ a , b ] = k = 0 s f ( k ) L 2 [ a , b ] 2 1 / 2 . Let e n ( x ) = f ( x ) P n ( x ) be the truncation error between the exact function f ( x ) and the Taylor polynomial P n ( x ) .
In the next theorem, we show that P n ( x ) converges to f ( x ) uniformly; see, for example [2,3].
Theorem 2.
Suppose that f is an analytic function on [ a , b ] and x 0 [ a , b ] . If there exists a constant M independent of k such that max x [ a , b ] | f ( k ) ( x ) | M , for all k, then for every x [ a , b ] ,
max x [ a , b ] f ( x ) P n ( x ) M ( b a ) n + 1 ( n + 1 ) ! .
Furthermore lim n P n ( x ) = f ( x ) for all x [ a , b ] .
Proof. 
From Theorem 1, we have
f ( x ) P n ( x ) = | x x 0 | n + 1 ( n + 1 ) ! | f ( n + 1 ) ( ξ ) | .
Since x , x 0 [ a , b ] , we have | x x 0 | n + 1 ( b a ) n + 1 . Also, if | f ( n + 1 ) ( x ) | is bounded on [ a , b ] for all n by M = max x [ a , b ] | f ( n + 1 ) ( x ) | then (6) gives
f ( x ) P n ( x ) M ( b a ) n + 1 ( n + 1 ) ! ,
which completes the proof of (5). Next, we show lim n P n ( x ) = f ( x ) for all x [ a , b ] . It is sufficient to show that
lim n ( b a ) n + 1 ( n + 1 ) ! = 0 .
Let a n = ( b a ) n + 1 ( n + 1 ) ! , then a n + 1 a n = b a n + 2 < 1 for n > b a 2 , which shows that the sequence { a n } is eventually decreasing. Since the sequence { a n } is bounded below by 0, it converges. If lim n a n = L then from a n + 1 = b a n + 2 a n , we have L = lim n b a n + 2 L = 0 ( L ) = 0 . □
To estimate the error e n in the L 2 -norm, we use Taylor’s Theorem with Integral Remainder.
Theorem 3
(Taylor’s Theorem with Integral Remainder). Let f C n + 1 [ a , b ] and x 0 [ a , b ] , then, for all x [ a , b ] ,
f ( x ) = P n ( x ) + R n ( x ) ,
where
P n ( x ) = k = 0 n f ( k ) ( x 0 ) k ! ( x x 0 ) k , R n ( x ) 1 n ! x 0 x ( x t ) n f ( n + 1 ) ( t ) d t .
Proof. 
See [13]. □
Now, we are ready to prove the following theorem.
Theorem 4.
Let f be an analytic function on [ a , b ] . If there exists a constant M independent of k such that max x [ a , b ] | f ( k ) ( x ) | M , for all k, then
f P n L 2 [ a , b ] M ( b a ) n + 1 n ! 2 n + 1 .
Furthermore, lim n f P n L 2 [ a , b ] 2 = 0 .
Proof. 
From Theorem 3, we have
f ( x ) P n ( x ) = 1 n ! x 0 x ( x t ) n f ( n + 1 ) ( t ) d t .
Applying the Cauchy–Schwarz inequality, we obtain
f ( x ) P n ( x ) 1 n ! x 0 x x t 2 n d t 1 / 2 x 0 x f ( n + 1 ) ( t ) 2 d t 1 / 2 .
Since x 0 x x t 2 n d t = 1 2 n + 1 ( x x 0 ) 2 n + 1 and x 0 , x [ a , b ] , we have
f ( x ) P n ( x ) f ( n + 1 ) L 2 [ a , b ] n ! ( 2 n + 1 ) 1 / 2 x x 0 n + 1 / 2 .
Squaring both sides and integrating over [ a , b ] , we get
f P n L 2 [ a , b ] 2 f ( n + 1 ) L 2 [ a , b ] 2 ( n ! ) 2 ( 2 n + 1 ) a b x x 0 2 n + 1 d x .
Since x x 0 b a , we have x x 0 2 n + 1 ( b a ) 2 n + 1 and consequently
f P n L 2 [ a , b ] 2 ( b a ) 2 n + 2 ( n ! ) 2 ( 2 n + 1 ) f ( n + 1 ) L 2 [ a , b ] 2 ,
which completes the proof of (10). Finally, we show that P n ( x ) converges f ( x ) in the L 2 -nom provided that f is smooth. From Equation (10), we observe that it is sufficient to prove that ( b a ) n + 1 n ! 2 n + 1 0 as n . Using the same technique used to show (7), one can establish the desired limit. □

3. A Posteriori Error Estimates

In this section, we construct a posteriori error estimates when approximating f ( x ) with its Taylor polynomial P n ( x ) . The proposed error estimators are computable quantities independent of the upper bound for f ( n + 1 ) ( x ) , x [ a , b ] . We further show that the error estimate converges to the exact error f ( x ) P n ( x ) pointwise and in the L 2 -norm as n . We first present a procedure to compute the a posteriori error estimate, which can be used when approximating f ( x ) for a specific value of x.

3.1. A Posteriori Error Estimation Procedure 1

Let ϵ > 0 be a specified tolerance. Suppose f and its derivatives at x 0 [ a , b ] are known (e.g., f ( x ) = cos ( x ) at x 0 = 0 ). We would like to find the degree n needed to ensure that f ( x ) P n ( x ) ϵ , for all x [ a , b ] , but without knowing an upper bound of f ( n + 1 ) ( x ) , x [ a , b ] .
We first present a procedure to compute the a posteriori error estimate. Let P n + 1 ( x ) be the unique Taylor polynomial of degree at most n + 1 satisfying the n + 2 conditions
P n + 1 ( k ) ( x 0 ) = f ( k ) ( x 0 ) , k = 0 , 1 , , n + 1 .
The polynomial P n + 1 ( x ) can be written as
P n + 1 ( x ) = P n ( x ) + f ( n + 1 ) ( x 0 ) ( n + 1 ) ! ( x x 0 ) n + 1 .
From Taylor’s Theorem, we have
f ( x ) = P n + 1 ( x ) + f ( n + 2 ) ( η ) ( n + 2 ) ! ( x x 0 ) n + 2 ,
where η is between x 0 and x. Suppose f ( k ) ( x 0 ) , k = 0 , 1 , are known. For fixed x [ a , b ] , we define the computable quantity
E n + 1 ( x ) = P n + 1 ( x ) P n ( x ) = f ( n + 1 ) ( x 0 ) ( n + 1 ) ! ( x x 0 ) n + 1 .
We observe that, for a given x [ a , b ] , the quantity E n + 1 ( x ) solely relies on n as f ( n + 1 ) ( x 0 ) is assumed to be available. The quantity E n + 1 ( x ) can be used to estimate the error f ( x ) P n ( x ) for any specific value of x [ a , b ] .
Next, we will show that the error estimator E n + 1 ( x ) converges to the true error f ( x ) P n ( x ) , for any fixed x [ a , b ] , as n .
Theorem 5.
Suppose f is an analytic function and e n ( x ) = f ( x ) P n ( x ) . We further assume that there exists a constant M independent of k such that max x [ a , b ] | f ( k ) ( x ) | M , for all k. If E n + 1 ( x ) is given by (15), then
lim n max x [ a , b ] E n + 1 ( x ) = 0 , x [ a , b ] .
Furthermore, we have
e n ( x ) E n + 1 ( x ) M ( b a ) n + 2 ( n + 2 ) ! , x [ a , b ] .
Consequently, we can bound the error from above and below as: x [ a , b ] ,
E n + 1 ( x ) M ( b a ) n + 2 ( n + 2 ) ! f ( x ) P n ( x ) E n + 1 ( x ) + M ( b a ) n + 2 ( n + 2 ) ! .
Proof. 
First, we will prove (16). Since max x [ a , b ] E n + 1 ( x ) M ( b a ) n + 1 ( n + 1 ) ! and lim n ( b a ) n + 1 ( n + 1 ) ! = 0 , we have lim n max x [ a , b ] E n + 1 ( x ) = 0 . Next, we will show (17). Using (13) and (15), we rewrite the polynomial P n + 1 ( x ) as
P n + 1 ( x ) = P n ( x ) + E n + 1 ( x ) .
Combining (19) and (14), we get
e n ( x ) E n + 1 ( x ) = f ( n + 2 ) ( η ) ( n + 2 ) ! ( x x 0 ) n + 2 ,
where η is between x 0 and x. Since f ( n + 2 ) ( η ) is bounded on [ a , b ] , we have
e n ( x ) E n + 1 ( x ) M | x x 0 | n + 2 ( n + 2 ) ! M ( b a ) n + 2 ( n + 2 ) ! , x [ a , b ] ,
which completes the proof of (17). Using the reverse triangle inequality | a | | b | a b , we establish (18). □
In the previous theorem, we proved that the a posteriori error estimator E n + 1 ( x ) converges to the true error f ( x ) P n ( x ) for any fixed x [ a , b ] .
An accepted efficiency measure of a posteriori error estimate is the effectivity index. In this paper, we use the effectivity index θ n = E n + 1 ( x ) f ( x ) P n ( x ) for fixed x [ a , b ] . Ideally, the effectivity index should stay close to one.

3.2. A Posteriori Error Estimation Procedure 2

Given a tolerance ϵ > 0 . Again, we assume that f and its derivatives at x 0 [ a , b ] are given. We would like to find the degree n needed to ensure that f P n L 2 [ a , b ] ϵ , but without knowing an upper bound for f ( n + 1 ) L 2 [ a , b ] .
We first present a procedure to compute the a posteriori error estimate. Let P n + 1 ( x ) be the polynomial of degree at most n + 1 defined in (13) and E n + 1 ( x ) the quantity defined in (15). Then, we have
f ( x ) = P n + 1 ( x ) + 1 ( n + 1 ) ! x 0 x ( x t ) n + 1 f ( n + 2 ) ( t ) d t .
Since P n + 1 ( x ) = P n ( x ) + E n + 1 ( x ) , we have
f ( x ) P n ( x ) = E n + 1 ( x ) + 1 ( n + 1 ) ! x 0 x ( x t ) n + 1 f ( n + 2 ) ( t ) d t .
Our error estimation procedure consists of approximating f P n L 2 [ a , b ] with the computable quantity E n + 1 L 2 [ a , b ] , which is given by
E n + 1 L 2 [ a , b ] = f ( n + 1 ) ( x 0 ) ( n + 1 ) ! 2 n + 3 ( b x 0 ) 2 n + 3 ( a x 0 ) 2 n + 3 .
Next, we will show that the error estimator E n + 1 L 2 [ a , b ] converges to the true error f P n L 2 [ a , b ] as n as h 0 .
Theorem 6.
Suppose f is an analytic function and e n = f P n . We further assume that there exists a constant M independent of k such that max x [ a , b ] | f ( k ) ( x ) | M , for all k. If E n + 1 is given by (15), then
lim n E n + 1 L 2 [ a , b ] = 0 .
Furthermore, there exists a positive constant C independent of h such that
e n E n + 1 L 2 [ a , b ] C ( b a ) n + 2 ( n + 1 ) ! 2 n + 3 ,
where C = M b a . Consequently, we can bound the error from above and below as
E n + 1 L 2 [ a , b ] C ( b a ) n + 2 ( n + 1 ) ! 2 n + 3 f P n L 2 [ a , b ] E n + 1 L 2 [ a , b ] + C ( b a ) n + 2 ( n + 1 ) ! 2 n + 3 .
Proof. 
First, we will prove (25). Since E n + 1 ( x ) = f ( n + 1 ) ( x 0 ) | x x 0 | n + 1 ( n + 1 ) ! f ( n + 1 ) ( x 0 ) ( b a ) n + 1 ( n + 1 ) ! , we have
E n + 1 L 2 [ a , b ] M ( b a ) n + 3 / 2 ( n + 1 ) ! ,
since max x [ a , b ] | f ( k ) ( x ) | M , for all k. Thus, lim n E n + 1 L 2 [ a , b ] = 0 since lim n ( b a ) n + 3 / 2 ( n + 1 ) ! = 0 .
Next, we will prove (26). From (23), we have
e n ( x ) E n + 1 ( x ) = 1 ( n + 1 ) ! x 0 x ( x t ) n + 1 f ( n + 2 ) ( t ) d t .
Applying the Cauchy–Schwarz inequality, we obtain
e n ( x ) E n + 1 ( x ) 1 ( n + 1 ) ! x 0 x x t 2 n + 2 d t 1 / 2 x 0 x f ( n + 2 ) ( t ) 2 d t 1 / 2 .
Since x 0 x x t 2 n + 2 d t = 1 2 n + 3 ( x x 0 ) 2 n + 3 and x 0 , x [ a , b ] , we have
e n ( x ) E n + 1 ( x ) f ( n + 2 ) L 2 [ a , b ] ( n + 1 ) ! ( 2 n + 3 ) 1 / 2 x x 0 n + 3 / 2 .
Squaring both sides and integrating over [ a , b ] , we get
e n E n + 1 L 2 [ a , b ] 2 f ( n + 2 ) L 2 [ a , b ] 2 ( ( n + 1 ) ! ) 2 ( 2 n + 3 ) a b x x 0 2 n + 3 d x .
Since x x 0 b a , we have x x 0 2 n + 3 ( b a ) 2 n + 3 and consequently
e n E n + 1 L 2 [ a , b ] 2 ( b a ) 2 n + 4 ( ( n + 1 ) ! ) 2 ( 2 n + 3 ) f ( n + 2 ) L 2 [ a , b ] 2 ,
which completes the proof of (26).
Next, we will prove (27). Using the reverse triangle inequality, we have
e n L 2 [ a , b ] E n + 1 L 2 [ a , b ] e n E n + 1 L 2 [ a , b ] .
Combining (26) and (28) completes the proof of (27). □
In the previous theorem, we proved that the a posteriori error estimator E n + 1 L 2 [ a , b ] converges to the true error f P n L 2 [ a , b ] in the L 2 -norm. An accepted efficiency measure of a posteriori error estimate is the effectivity index. In this paper, we use the effectivity indices θ n = E n + 1 L 2 [ a , b ] f P n L 2 [ a , b ] . Ideally, the global effectivity index should stay close to one.

4. Application: Adaptive Algorithms

A posteriori error estimates play an essential role in assessing the reliability of numerical solutions and in developing efficient adaptive algorithms. In this section, we develop two adaptive algorithms based on a posteriori error estimates presented in the previous section. The fundamental concept behind the proposed adaptive methods, relying on a posteriori error estimation, is to determine the degree of Taylor’s polynomial such that the error is below the specified tolerance, as follows: We begin with the Taylor polynomial P n ( x ) = k = 0 n f ( k ) ( x 0 ) k ! ( x x 0 ) k with n = 0 . Then, we compute the error estimator | E n + 1 | . If the error estimator is smaller than the prescribed tolerance, then we accept the approximation P n ( x ) . If not, we add the next term f ( n + 1 ) ( x 0 ) ( n + 1 ) ! ( x x 0 ) n + 1 to P n ( x ) and repeat the process until the stopping criterion is satisfied. The proposed adaptive algorithms are essentially a simple four-step procedure: Given a tolerance ϵ > 0 , x 0 , and f ( k ) ( x 0 ) , k = 0 , 1 , 2 ,
1.
Set n = 0 and construct the nth-degree Taylor polynomial P n ( x ) .
2.
Use E n + 1 to estimate the error f P n (either pointwise or in the L 2 -norm).
3.
If the error estimator is smaller than the prescribed tolerance ϵ , accept the approximation P n ( x ) .
4.
Otherwise, set n = n + 1 and repeat the process.
Next, we present two simple adaptive algorithms based on the a posteriori error estimators proposed in the previous section.

4.1. Adaptive Algorithm 1

The first algorithm that we propose can be used to approximate f ( x ) with P n ( x ) for a fixed x [ a , b ] . Given x 0 , x, and f ( k ) ( x 0 ) , k = 0 , 1 , 2 , . The steps of the proposed adaptive algorithm are given in Algorithm 1.
Algorithm 1 Adaptive algorithm to approximate f ( x ) using P n ( x ) at a fixed point x
Input:
x, x 0 , tolerance ϵ , maximum degree N max , f ( k ) ( x 0 ) for k = 0 , 1 , , N max + 1 .
Output:
Degree n and approximation P n ( x ) , or a message of failure.
  •      Set n = 0 .
  •      Compute the Taylor polynomial P n ( x ) = k = 0 n f ( k ) ( x 0 ) k ! ( x x 0 ) k for f about x 0 .
  •      Determine m = min { k > n : f ( k ) ( x 0 ) 0 } . If no such m N max + 1 exists, return failure. We note that m is the smallest integer 1 such that f ( m ) ( x 0 ) 0 .
  •      Compute the heuristic error estimator | E ( x ) | = | f ( m ) ( x 0 ) | m ! | x x 0 | m .
  •      While | E ( x ) | ϵ and n < N max do:
         (a)
         Set n = n + 1 .
         (b)
         Update P n ( x ) = k = 0 n f ( k ) ( x 0 ) k ! ( x x 0 ) k .
         (c)
         Recompute m and the error estimator | E ( x ) | = f ( m ) ( x 0 ) m ! x x 0 m .
  •      If | E ( x ) | < ϵ , accept P n ( x ) .
  •      Otherwise, return failure.
  •      End of Procedure.

4.2. Adaptive Algorithm 2

We propose the following algorithm to approximate f ( x ) with P n ( x ) for x [ a , b ] . Given x 0 and f ( k ) ( x 0 ) , k = 0 , 1 , 2 , . The steps of the proposed adaptive algorithm are given in Algorithm 2.
Remark 1.
In the one-dimensional setting, the heuristic error estimator is based on the term E n + 1 ( x ) = f ( n + 1 ) ( x 0 ) ( n + 1 ) ! ( x x 0 ) n + 1 . If f ( n + 1 ) ( x 0 ) = 0 , this estimator vanishes and may incorrectly suggest convergence even when the true error f ( x ) P n ( x ) is not small. This situation occurs when the Taylor expansion exhibits higher-order flatness at x 0 . To avoid premature termination, we instead search for the first nonzero derivative beyond degree n, namely m = min { k > n : f ( k ) ( x 0 ) 0 } , and use E ( x ) = f ( m ) ( x 0 ) m ! ( x x 0 ) m as the adaptive estimator. In this way, the estimator reflects the first nonzero neglected term of the Taylor expansion, ensuring consistency of the stopping criterion.
Algorithm 2 Adaptive algorithm to approximate f ( x ) using P n ( x ) for all x [ a , b ]
Input:
[ a , b ] , x 0 , tolerance ϵ , maximum degree N max , f ( k ) ( x 0 ) for k = 0 , 1 , , N max + 1 .
Output:
Degree n and approximation P n ( x ) , or a message of failure.
  •      Set n = 0 .
  •      Compute the Taylor polynomial P n ( x ) = k = 0 n f ( k ) ( x 0 ) k ! ( x x 0 ) k for f about x 0 .
  •      Determine m = min { k > n : f ( k ) ( x 0 ) 0 } . If no such m N max + 1 exists, return failure. We note that m is the smallest integer 1 such that f ( m ) ( x 0 ) 0 .
  •      Compute the heuristic error estimator
    E L 2 [ a , b ] = f ( m ) ( x 0 ) m ! 2 m + 1 ( b x 0 ) 2 m + 1 ( a x 0 ) 2 m + 1 .
  •      While E m L 2 [ a , b ] ϵ and n < N max do:
         (a)
         Set n = n + 1 .
         (b)
         Update P n ( x ) = k = 0 n f ( k ) ( x 0 ) k ! ( x x 0 ) k .
         (c)
         Recompute m and the error estimator
    E L 2 [ a , b ] = f ( m ) ( x 0 ) m ! 2 m + 1 ( b x 0 ) 2 m + 1 ( a x 0 ) 2 m + 1 .
  •      If E m L 2 [ a , b ] < ϵ , accept P n ( x ) .
  •      Otherwise, return failure.
  •      End of Procedure.

5. Generalizations to Functions of Severable Variables

5.1. Functions of Two Variables

Here, we extend our approach to functions of two variables. We first recall Taylor’s Theorem in Two Variables [3].
Theorem 7 (Taylor’s Theorem in Two Variables).
Let D be the rectangle D = [ a , b ] × [ c , d ] = { ( x , y ) | a x b , c y d } R 2 . Suppose that f C n + 1 ( D ) ( i . e . ,  f and its partial derivatives up to order  n + 1 are continuous on D) and ( x 0 , y 0 ) D . Then, for any ( x , y ) D , there is ξ between x 0 and x 0 , and η between y 0 and y with
f ( x , y ) = P n ( x , y ) + R n ( x , y ) ,
where P n ( x , y ) is the n-th Taylor polynomial in two variables given by
P n ( x , y ) = f ( x 0 , y 0 ) + ( x x 0 ) f ( x 0 , y 0 ) x + ( y y 0 ) f ( x 0 , y 0 ) y + ( x x 0 ) 2 2 2 f ( x 0 , y 0 ) x 2 + ( x x 0 ) ( y y 0 ) 2 f ( x 0 , y 0 ) x y + ( y y 0 ) 2 2 2 f ( x 0 , y 0 ) y 2 + + j = 0 n ( x x 0 ) n j ( y y 0 ) j ( n j ) ! j ! n f ( x 0 , y 0 ) x n j y j = i = 0 n j = 0 i ( x x 0 ) i j ( y y 0 ) j ( i j ) ! j ! i f ( x 0 , y 0 ) x i j y j ,
and R n is the remainder term given by
R n ( x , y ) = j = 0 n + 1 ( x x 0 ) n + 1 j ( y y 0 ) j ( n + 1 j ) ! j ! n + 1 f ( ξ , η ) x n + 1 j y j .
The integral form of R n = R n ( x , y ) is
R n = ( n + 1 ) j = 0 n + 1 ( x x 0 ) n + 1 j ( y y 0 ) j ( n + 1 j ) ! j ! 0 1 ( 1 s ) n n + 1 f ( ξ ( s ) , η ( s ) ) x n + 1 j y j d s .
where ξ ( s ) = x 0 + s ( x x 0 ) and η ( s ) = y 0 + s ( y y 0 ) .
Let e n ( x , y ) = f ( x , y ) P n ( x , y ) and define
E n + 1 ( x , y ) = P n + 1 ( x , y ) P n ( x , y ) = j = 0 n + 1 ( x x 0 ) n + 1 j ( y y 0 ) j ( n + 1 j ) ! j ! n + 1 f ( x 0 , y 0 ) x n + 1 j y j .
Then, we have the following theorem.
Theorem 8.
Suppose f is an analytic function. We further assume that there exists a constant M independent of i , j such that max ( x , y ) D i + j f ( x , y ) x i y j M , for all i , j . Then
lim n max ( x , y ) D E n + 1 ( x , y ) = 0 , ( x , y ) D .
Furthermore, we have
e n ( x , y ) E n + 1 ( x , y ) M ( 2 α ) n + 2 ( n + 2 ) ! ,
where α = max ( b a , d c ) .
Proof. 
From (32), we have
max ( x , y ) D E n + 1 ( x , y ) M j = 0 n + 1 ( b a ) n + 1 j ( d c ) j ( n + 1 j ) ! j ! M j = 0 n + 1 α n + 1 j α j ( n + 1 j ) ! j ! = M α n + 1 j = 0 n + 1 1 ( n + 1 j ) ! j ! .
Since j = 0 n + 1 1 ( n + 1 j ) ! j ! = j = 0 n + 1 1 ( n + 1 ) ! n + 1 j = 1 ( n + 1 ) ! j = 0 n + 1 n + 1 j = 2 n + 1 ( n + 1 ) ! , we get
lim n max ( x , y ) D E n + 1 ( x , y ) = 0 .
Next, we rewrite the polynomial P n + 1 ( x , y ) as
P n + 1 ( x , y ) = P n ( x , y ) + E n + 1 ( x , y ) .
Using Taylor’s theorem, we get
e n ( x , y ) E n + 1 ( x , y ) = f ( x , y ) P n ( x , y ) P n + 1 ( x , y ) P n ( x , y ) = f ( x , y ) P n + 1 ( x , y ) = j = 0 n + 2 ( x x 0 ) n + 2 j ( y y 0 ) j ( n + 2 j ) ! j ! n + 2 f ( ξ , η ) x n + 2 j y j ,
where ξ is between x 0 and x, and η is between y 0 and y. Since all partial derivatives of f are bounded on D, we have
e n ( x , y ) E n + 1 ( x , y ) M j = 0 n + 2 ( b a ) n + 2 j ( d c ) j ( n + 2 j ) ! j ! M 2 n + 2 α n + 2 ( n + 2 ) ! , ( x , y ) D ,
which completes the proof. □
Thus, for functions of two variables, the a posteriori error estimator E n + 1 ( x , y ) converges to the exact error f ( x , y ) P n ( x , y ) for any fixed ( x , y ) D . Numerical examples show that the effectivity index defined by θ n = E n + 1 ( x , y ) f ( x , y ) P n ( x , y ) for fixed ( x , y ) D , stays close to one.
Similarly, we have the following result using the L 2 -norm defined by u L 2 ( D ) = D u 2 ( x , y ) d x d y 1 / 2 .
Theorem 9.
Suppose f is an analytic function. We further assume that there exists a constant M independent of i , j such that max ( x , y ) D i + j f ( x , y ) x i y j M , for all i , j . Then,
lim n E n + 1 L 2 ( D ) = 0 .
Furthermore, we have
e n E n + 1 L 2 ( D ) M α 2 n + 2 α n + 2 ( n + 2 ) ! ,
where α = max ( b a , d c ) .
Proof. 
From (32), we have
E n + 1 ( x , y ) M j = 0 n + 1 ( b a ) n + 1 j ( d c ) j ( n + 1 j ) ! j ! M j = 0 n + 1 α n + 1 j α j ( n + 1 j ) ! j ! = M ( 2 α ) n + 1 ( n + 1 ) ! .
Squaring both sides and integrating over D, we get
E n + 1 L 2 ( D ) 2 M 2 ( 2 α ) 2 n + 2 ( ( n + 1 ) ! ) 2 ( b a ) ( d c ) M 2 2 2 n + 2 α 2 n + 4 ( ( n + 1 ) ! ) 2 .
Thus, lim n E n + 1 L 2 ( D ) = 0 since lim n M 2 n + 1 α n + 2 ( n + 1 ) ! = 0 .
Next, we will prove (38). From the integral form of R n + 1 , we have
e n ( x , y ) E n + 1 ( x , y ) = R n + 1 ( x , y ) = ( n + 2 ) j = 0 n + 2 ( x x 0 ) n + 2 j ( y y 0 ) j ( n + 2 j ) ! j ! 0 1 ( 1 s ) n + 1 n + 2 f ( ξ ( s ) , η ( s ) ) x n + 2 j y j d s ,
where ξ ( s ) = x 0 + s ( x x 0 ) and η ( s ) = y 0 + s ( y y 0 ) . Thus, we have
e n ( x , y ) E n + 1 ( x , y ) ( n + 2 ) j = 0 n + 2 α n + 2 j α j ( n + 2 j ) ! j ! M 0 1 ( 1 s ) n + 1 d s = α n + 2 M j = 0 n + 2 1 ( n + 2 j ) ! j ! = ( 2 α ) n + 2 M ( n + 2 ) ! .
Squaring both sides and integrating over D, we get
e n E n + 1 L 2 ( D ) 2 ( 2 α ) 2 n + 4 α 2 M 2 ( ( n + 2 ) ! ) 2 .
which completes the proof of (38). □
As for functions of a single variable, the a posteriori error estimator E n + 1 L 2 ( D ) converges to the true error f P n L 2 ( D ) in the L 2 -norm. Numerical experiments show that the effectivity indices, defined by θ n = E n + 1 L 2 ( D ) f P n L 2 ( D ) , stay close to one.
Remark 2.
In the two-dimensional case, the estimator is initially defined using the homogeneous Taylor polynomial of total degree n + 1 , E n + 1 ( x , y ) = j = 0 n + 1 ( x x 0 ) n + 1 j ( y y 0 ) j ( n + 1 j ) ! j ! n + 1 f ( x 0 , y 0 ) x n + 1 j y j . However, it may happen that all partial derivatives of total order n + 1 vanish at ( x 0 , y 0 ) , in which case the entire homogeneous estimator becomes zero. This degeneracy may arise, for example, when the function exhibits higher-order flatness or special structural symmetry. To ensure robustness, we therefore determine m = min k > n : ( p , q ) , p + q = k , x p y q f ( x 0 , y 0 ) 0 , and use the corresponding homogeneous polynomial of total degree m as the estimator. This modification guarantees that the adaptive procedure is driven by the first nonzero neglected homogeneous component of the multivariate Taylor expansion.

5.2. Generalizations to Functions of Several Variables

Traditional notations for partial derivatives become cumbersome for higher-order derivatives, making it difficult to write Taylor’s theorem clearly. However, the multi-index notation offers a more efficient alternative.
A multi-index is an n-tuple of nonnegative integers. Multi-indices are generally denoted by the Greek letters α = ( α 1 , α 2 , , α n ) N n or β = ( β 1 , β 2 , , β n ) N n , where α i , β i N = { 0 , 1 , 2 , } . If α N n is a multi-index and x = [ x 1 , x 2 , , x n ] R n , we define
| α | = α 1 + α 2 + + α n , α ! = α 1 ! α 2 ! α n ! , x α = x 1 α 1 x 2 α 2 x n α n .
Suppose that f : Ω R n R is a function of class C k ( Ω ) (i.e., all the k-th order partial derivatives of f are continuous at a point a Ω ), we use the notation for the higher-order partial derivatives
D α f = | α | f x 1 α 1 x n α n , | α | k .
The number | α | = α 1 + + α n is called the order or degree of α . Thus, the k-th order partial derivatives of f can be written simply as D α f with | α | = k . As the notation x α suggests, multi-indices are useful for concisely writing not only derivatives but also polynomials in several variables. To illustrate their utility, we present a generalization of the binomial theorem. This proof of the multinomial theorem uses the classical binomial theorem and induction on n.
Theorem 10 (The Multinomial Theorem).
For any x = [ x 1 , x 2 , , x n ] R n and any positive integer k, we have
( x 1 + + x n ) k = | α | = k k α x α = | α | = k k ! α ! x α ,
where α = ( α 1 , α 2 , , α n ) , x α = x 1 α 1 x 2 α 2 x n α n , and the multinomial coefficient k α is given by k α = k α 1 , α 2 , , α n = k ! α 1 ! α 2 ! α n ! = k ! α ! .
Next, we present Taylor’s theorem for functions of several variables. For simplicity, we will consider only scalar-valued functions; the extension to vector-valued functions is straightforward.
Theorem 11 (Taylor’s theorem for functions of several variables).
Suppose f : Ω R n R is of class C k + 1 ( Ω ) ( i . e . ,   k + 1 times continuously differentiable) on a closed domain Ω R n with center a Ω , then for all x Ω , we have
f ( x ) = P k ( x ) + R k ( x ) ,
where P k ( x ) is the k-degree Taylor polynomial
P k ( x ) = | α | k D α f ( a ) α ! ( x a ) α ,
and the remainder R k ( x ) is given in Lagrange’s form by
R k ( x ) = | α | = k + 1 ( x a ) α α ! D α f ( a + c ( x a ) ) , f o r s o m e c ( 0 , 1 )
and in integral form by
R k ( x ) = ( k + 1 ) | α | = k + 1 ( x a ) α α ! 0 1 ( 1 t ) k D α f a + t ( x a ) d t .
As in the one-variable case, the Taylor polynomial P k ( x ) = | α | k D α f ( a ) α ! ( x a ) α is the only polynomial of degree k that agrees with f ( x ) and its partial derivatives up to order k at x = a ,
As in the one-variable case, the following estimate for the remainder term follows from the Lagrange or integral formulas.
Corollary 1 (estimate for the remainder term).
If f : Ω R n R is of class C k + 1 ( Ω ) and | D α f ( x ) | M for all x Ω , then
| R k ( x ) | M ( k + 1 ) ! x a k + 1 ,
where x = i = 1 n | x i | .
Proof. 
It follows easily from either (41) or (42) that
| R k ( x ) | M | α | = k + 1 | ( x a ) α | α ! ,
and this last expression equals M ( k + 1 ) ! x a k + 1 by the multinomial theorem. □
Let e k ( x ) = f ( x ) P k ( x ) and define
E k + 1 ( x ) = P k + 1 ( x ) P k ( x ) = | α | = k + 1 D α f ( a ) α ! ( x a ) α .
Then, we have the following theorem.
Theorem 12.
Suppose f is an analytic function. We further assume that there exists a constant M independent of α such that max x Ω D α f ( x ) M , for all α . Then,
lim k max x Ω E k + 1 ( x ) = 0 , x Ω .
Furthermore, we have
lim k e k ( x ) E k + 1 ( x ) = 0
and
lim k E k + 1 L 2 ( Ω ) = 0 ,
where the L 2 -norm defined by u L 2 ( Ω ) = Ω u 2 ( x ) d x 1 / 2 .
Thus, the a posteriori error estimator E k + 1 L 2 ( Ω ) converges to the exact error f P k L 2 ( Ω ) in the L 2 -norm. Numerical examples show that the effectivity indices, defined by θ k = E k + 1 L 2 ( Ω ) f P k L 2 ( Ω ) , approach one as k .

6. Numerical Examples

In this section, we present several numerical experiments to illustrate the effectiveness of our a posteriori error estimators.
Example 1.
Consider the function f ( x ) = e x and x 0 = 0 . Since f ( k ) ( x ) = ( 1 ) k e x , we have f ( k ) ( 0 ) = ( 1 ) k . Thus,
P n ( x ) = k = 0 n ( 1 ) k k ! x k .
In the first experiment, we assume that x is fixed. Suppose we want to approximate f ( 1 ) = e 1 using P n ( 1 ) , but we want to ensure that f ( x ) P n ( x ) ϵ , where ϵ is a prescribed tolerance. We use Algorithm 1 to find the degree n. In Table 1, we present the degree n obtained from Algorithm 1, the value of P n ( x ) , the error estimator E n ( x ) , the actual error f ( x ) P n ( x ) , the error f ( x ) P n ( x ) E n + 1 ( x ) , and the effectivity index θ n = E n + 1 ( x ) f ( x ) P n ( x ) at x = 1 using tolerances ϵ = 10 i , i = 1 , 2 , , 14 . These results indicate that the error estimator E n + 1 ( x ) and the actual error f ( x ) P n ( x ) converge to zero and the effectivity index θ n remains close to one.
Next, we consider x [ 0 , 1 ] , and we approximate f ( x ) using P n ( x ) for all x [ 0 , 1 ] , but we want to ensure that f P n L 2 [ 0 , 1 ] ϵ , where ϵ is a prescribed tolerance. We use Algorithm 2 to find the degree n. In Table 2 we present the degree n, the error estimator E n + 1 L 2 [ 0 , 1 ] , the actual error e n L 2 [ 0 , 1 ] = f P n L 2 [ 0 , 1 ] , the error e n E n + 1 L 2 [ 0 , 1 ] = f P n E n + 1 L 2 [ 0 , 1 ] , the error e ^ n = e n L 2 [ 0 , 1 ] E n + 1 L 2 [ 0 , 1 ] , and the effectivity index θ n = E n + 1 L 2 [ 0 , 1 ] f P n L 2 [ 0 , 1 ] for Example 1 using tolerances ϵ = 10 i , i = 1 , 2 , , 15 . We observe that the errors converge to 0 and the effectivity index remains close to one.
Example 2.
Consider the function f ( x ) = ln ( x + 1 ) and x 0 = 0 . Since f ( k ) ( x ) = ( 1 ) k 1 ( k 1 ) ! ( x + 1 ) k for k 1 , we have f ( 0 ) = 0 and f ( k ) ( 0 ) = ( 1 ) k 1 ( k 1 ) ! for k 1 . Thus,
P n ( x ) = k = 1 n ( 1 ) k 1 k x k .
Suppose we want to approximate f ( 0.1 ) = ln ( 1.1 ) using P n ( 0.1 ) , but we want to ensure that f ( x ) P n ( x ) ϵ , where ϵ is a prescribed tolerance. We use Algorithm 1 to find the degree n. In Table 3, we present the degree n, the value P n ( x ) , the estimator error E n + 1 ( x ) , the actual error f ( x ) P n ( x ) , the error f ( x ) P n ( x ) E n + 1 ( x ) , and the effectivity index θ n at x = 0.1 using tolerances ϵ = 10 i , i = 1 , 2 , , 14 . These results indicate that the error estimator E n + 1 ( x ) and the actual error f ( x ) P n ( x ) converge to zero, and the effectivity index θ n remains close to one.
Next, we want to approximate f ( x ) using P n ( x ) for all x [ 0 , 0.1 ] while ensuring that f P n L 2 [ 0 , 0.1 ] ϵ , where ϵ is a prescribed tolerance. We use Algorithm 2 to find the degree n. Table 4 presents the degree n, the error estimator E n + 1 L 2 [ 0 , 0.1 ] , the actual error e n L 2 [ 0 , 0.1 ] = f P n L 2 [ 0 , 0.1 ] , the error e n E n + 1 L 2 [ 0 , 0.1 ] = f P n E n + 1 L 2 [ 0 , 0.1 ] , the error e ^ n = e n L 2 [ 0 , 0.1 ] E n + 1 L 2 [ 0 , 0.1 ] , and the effectivity index θ n = E n + 1 L 2 [ 0 , 0.1 ] f P n L 2 [ 0 , 0.1 ] for Example 2 using tolerances ϵ = 10 i , i = 1 , 2 , , 15 . We observe that the errors converge to 0 and the effectivity index remains close to one.
Example 3.
We consider the function f ( x ) = e 2 x + e 3 x and x 0 = 0 . We have f ( k ) ( x ) = 2 k e 2 x + ( 3 ) k e 3 x , which gives f ( k ) ( 0 ) = 2 k + ( 3 ) k . Thus,
P n ( x ) = k = 0 n 2 k + ( 3 ) k k ! x k .
We first approximate f ( 1 ) = e 2 + e 3 by the Taylor polynomial P n ( 1 ) , requiring that the pointwise error satisfies | f ( 1 ) P n ( 1 ) | ϵ , where ϵ is a prescribed tolerance. Algorithm 1 is used to determine the smallest degree n that satisfies this condition. Table 5 reports, for tolerances ϵ = 10 i , i = 1 , 2 , , 13 , the computed degree n, the approximation P n ( 1 ) , the estimator | E n + 1 ( 1 ) | , the true error | f ( 1 ) P n ( 1 ) | , the difference | f ( 1 ) P n ( 1 ) E n + 1 ( 1 ) | , and the effectivity index θ n . The results show that both the estimator and the true error converge to zero as ϵ 0 , while the effectivity index θ n approaches one.
Next, we approximate f on the interval [ 0 , 1 ] by P n while enforcing the global error condition f P n L 2 [ 0 , 1 ] ϵ . Algorithm 2 is employed to compute the required degree n. Table 6 presents, for tolerances ϵ = 10 i , i = 1 , 2 , , 14 , the degree n, the estimator E n + 1 L 2 [ 0 , 1 ] , the true error e n L 2 [ 0 , 1 ] = f P n L 2 [ 0 , 1 ] , the difference f P n E n + 1 L 2 [ 0 , 1 ] , the discrepancy | e ^ n | = | e n L 2 [ 0 , 1 ] E n + 1 L 2 [ 0 , 1 ] | , and the effectivity index θ n = E n + 1 L 2 [ 0 , 1 ] f P n L 2 [ 0 , 1 ] . The numerical results confirm that both the estimator and the true error converge to zero as n increases, and that the effectivity index converges to one, demonstrating the asymptotic sharpness of the proposed error estimator.
Example 4.
Consider the function f ( x ) = x + 1 centered at x 0 = 2 . Since f ( k ) ( x ) = ( 1 ) k 1 ( 2 k 2 ) ! 2 2 k 1 ( k 1 ) ! ( x + 1 ) 1 2 k , it follows that f ( k ) ( 2 ) = ( 1 ) k 1 ( 2 k 2 ) ! 2 2 k 1 ( k 1 ) ! 3 k 1 2 , k 1 . Therefore, the Taylor polynomial of degree n is given by
P n ( x ) = 3 + k = 1 n ( 1 ) k 1 ( 2 k 2 ) ! 2 2 k 1 ( k 1 ) ! 3 k 1 2 1 k ! ( x 2 ) k .
Suppose we wish to approximate f ( 2.1 ) = 3.1 using P n ( 2.1 ) , while ensuring that f ( 2.1 ) P n ( 2.1 ) ϵ , for a prescribed tolerance ϵ. Algorithm 1 is employed to determine the required degree n. Table 7 reports the degree n, the approximation P n ( 2.1 ) , the estimated error E n + 1 ( 2.1 ) , the true error f ( 2.1 ) P n ( 2.1 ) , the discrepancy f ( 2.1 ) P n ( 2.1 ) E n + 1 ( 2.1 ) , and the effectivity index θ n , for tolerances ϵ = 10 i , i = 1 , 2 , , 13 . The results show that both the estimator and the true error tend to zero, while the effectivity index remains close to one. Next, we approximate f ( x ) by P n ( x ) on the entire interval [ 2 , 2.1 ] , requiring that f P n L 2 [ 2 , 2.1 ] ϵ . Algorithm 2 is used to compute the corresponding degree n. Table 8 lists the degree n, the estimator E n + 1 L 2 [ 2 , 2.1 ] , the true error e n L 2 [ 2 , 2.1 ] = f P n L 2 [ 2 , 2.1 ] , the quantity e n E n + 1 L 2 [ 2 , 2.1 ] = f P n E n + 1 L 2 [ 2 , 2.1 ] , the difference | e ^ n | = e n L 2 [ 2 , 2.1 ] E n + 1 L 2 [ 2 , 2.1 ] , and the effectivity index θ n = E n + 1 L 2 [ 2 , 2.1 ] f P n L 2 [ 2 , 2.1 ] for tolerances ϵ = 10 i , i = 1 , 2 , , 14 . We observe that the errors decrease to zero and the effectivity index remains close to one.
Example 5.
We test our results using the function f ( x ) = sin ( x ) centered at x 0 = 0 . Since f ( k ) ( x ) = sin ( x + π 2 k ) , it follows that
P n ( x ) = k = 1 n sin ( x + π 2 k ) k ! x k .
Let us approximate f ( 0.5 ) = sin ( 0.5 ) 0.479425538604203 using P n ( 0.5 ) , while ensuring that f ( 0.5 ) P n ( 0.5 ) ϵ , for a prescribed tolerance ϵ. We use Algorithm 1 to find the required degree n. Table 9 presents the degree n, the approximation P n ( 0.5 ) , the estimated error E n + 1 ( 0.5 ) , the true error f ( 0.5 ) P n ( 0.5 ) , the error f ( 0.5 ) P n ( 0.5 ) E n + 1 ( 0.5 ) , and the effectivity index θ n , for tolerances ϵ = 10 i , i = 1 , 2 , , 13 . The results show that both the estimator and the true error tend to zero, while the effectivity index remains close to one.
Example 6.
In this example, we present comparative numerical experiments to illustrate the effectiveness of the proposed Taylor-based a posteriori error estimator for functions of two variables. Consider the function f ( x , y ) = e x y and ( x 0 , y 0 ) = ( 0 , 0 ) . Since i f ( x , y ) x i j y j = ( 1 ) i e x y , we have i f ( 0 , 0 ) x i j y j = ( 1 ) i . Thus, its Taylor polynomial and remainder term are given by
P n ( x , y ) = i = 0 n j = 0 i ( 1 ) i x i j y j ( i j ) ! j ! , R n ( x , y ) = j = 0 n + 1 ( 1 ) i x n + 1 j y j ( n + 1 j ) ! j ! e ξ η .
Suppose we aim to approximate f ( 1 , 0.5 ) = e 1.5 0.223130160148430 by means of the polynomial P n ( x , y ) at ( x , y ) = ( 1 , 0.5 ) , while guaranteeing that | f ( x , y ) P n ( x , y ) | ϵ , where ϵ is a prescribed tolerance. To determine the smallest degree n satisfying this condition, we apply Algorithm 1. Table 10 lists the selected degree n, the approximation P n ( x , y ) , the estimated error | E n + 1 ( x , y ) | , the true error | f ( x , y ) P n ( x , y ) | , the remainder difference | f ( x , y ) P n ( x , y ) E n + 1 ( x , y ) | , and the effectivity index θ n , all evaluated at x = 1 , y = 0.5 , for tolerances ϵ = 10 i , i = 1 , 2 , , 13 . The results demonstrate that both the estimator | E n + 1 ( x , y ) | and the true error | f ( x , y ) P n ( x , y ) | converge to zero as n increases, while the effectivity index θ n remains close to unity. This confirms the sharpness and reliability of the proposed error estimator.
Example 7.
Consider the function f ( x , y ) = sin ( x + y ) and ( x 0 , y 0 ) = ( 0 , 0 ) . We approximate f ( 0.3 , 0.2 ) = sin ( 0.5 ) using P n ( 0.3 , 0.2 ) , but we want to ensure that f ( x , y ) P n ( x , y ) ϵ , where ϵ is a prescribed tolerance. We use Algorithm 1 to find the degree n but with (32). In Table 11, we present the degree n, the value P n ( x , y ) , the estimator error E n + 1 ( x , y ) , the actual error f ( x , y ) P n ( x , y ) , the error f ( x ) P n ( x , y ) E n + 1 ( x , y ) , and the effectivity index θ n at x = 0.3 , y = 0.2 using tolerances ϵ = 10 i , i = 1 , 2 , , 13 . These results indicate that the error estimator E n + 1 ( x , y ) and the actual error f ( x , y ) P n ( x , y ) converge to zero and the effectivity index θ n remains close to one.

7. Concluding Remarks

In this paper, we introduced two novel a posteriori error estimation techniques for approximating a function f of one or several variables by its Taylor polynomial P n . The proposed estimators are fully computable and, importantly, do not require prior knowledge of an upper bound on the ( n + 1 ) st derivatives of f. We established that the proposed estimators converge to the exact error both pointwise and in the L 2 -norm as n . In particular, we demonstrated that the associated effectivity index remains bounded and approaches unity asymptotically, confirming the sharpness and reliability of the estimators. Furthermore, we developed two adaptive algorithms that can be used to approximate f by P n either at a specific point or over a prescribed domain. These adaptive procedures automatically determine the minimal polynomial degree n required to satisfy a given tolerance, thereby providing an efficient and practical framework for Taylor-based approximation. Several directions for future research remain open. First, it would be of interest to extend the analysis to functions with weaker regularity assumptions, such as functions in Sobolev spaces or functions with limited smoothness. Second, the development of localized or anisotropic Taylor-based estimators for functions of several variables could improve performance in the presence of directional features or singular behavior. Third, investigating the integration of the proposed estimators into adaptive numerical schemes, such as finite element or discontinuous Galerkin methods, may lead to new hybrid Taylor-based adaptive strategies. Finally, exploring extensions to infinite-dimensional settings or to operator-valued functions could broaden the applicability of the proposed framework.

Funding

This research received no external funding.

Data Availability Statement

No new data were created or analyzed in this study. Data sharing is not applicable to this article.

Acknowledgments

The author thanks the referees for their valuable comments and suggestions, which significantly improved the quality of the presentation of this paper.

Conflicts of Interest

The author declares no competing interests.

References

  1. Canuto, C.; Tabacco, A. Taylor expansions and applications. In Mathematical Analysis I; Springer: New York, NY, USA, 2015; pp. 225–257. [Google Scholar] [CrossRef] [Scilit]
  2. Ackleh, A.S.; Allen, E.J.; Kearfott, R.B.; Seshaiyer, P. Classical and Modern Numerical Analysis: Theory, Methods and Practice; CRC Press: Boca Raton, FL, USA, 2010. [Google Scholar] [CrossRef] [Scilit]
  3. Burden, R.L.; Faires, J.D.; Burden, A.M. Numerical Analysis; Cengage Learning: Boston, MA, USA, 2016. [Google Scholar] [CrossRef] [Scilit]
  4. Paliogiannis, F.C. On the Remainder in Taylor’s Theorem. Coll. Math. J. 2025, 56, 225–230. [Google Scholar] [CrossRef] [Scilit]
  5. Burg, C.; Newman Iii, J. Computationally efficient, numerically exact design space derivatives via the complex Taylor’s series expansion method. Comput. Fluids 2003, 32, 373–383. [Google Scholar] [CrossRef] [Scilit]
  6. Chevillard, S.; Harrison, J.; Joldeş, M.; Lauter, C. Efficient and accurate computation of upper bounds of approximation errors. Theor. Comput. Sci. 2011, 412, 1523–1543. [Google Scholar] [CrossRef] [Scilit]
  7. Huabsomboon, P.; Novaprateep, B.; Kaneko, H. Taylor-series expansion method for Volterra Integral Equations of the Second Kind. Sci. Math. Jpn. 2011, 73, 19–29. [Google Scholar] [CrossRef]
  8. Maleknejad, K.; Aghazadeh, N. Numerical solution of Volterra integral equations of the second kind with convolution kernel by using Taylor-series expansion method. Appl. Math. Comput. 2005, 161, 915–922. [Google Scholar] [CrossRef] [Scilit]
  9. Pourahmadi, M. Taylor expansion of and some applications. Am. Math. Mon. 1984, 91, 303–307. [Google Scholar] [CrossRef] [Scilit]
  10. Ren, Y.; Zhang, B.; Qiao, H. A simple Taylor-series expansion method for a class of second kind integral equations. J. Comput. Appl. Math. 1999, 110, 15–24. [Google Scholar] [CrossRef] [Scilit]
  11. Servadio, S.; Zanetti, R. Estimation of the Conditional State and Covariance with Taylor Polynomials. J. Adv. Inf. Fusion 2021, 6, 126–142. [Google Scholar]
  12. Servadio, S.; Zanetti, R.; Armellin, R. Maximum a posteriori estimation of hamiltonian systems with high order series expansions. In Proceedings of the AAS/AIAA Astrodynamics Specialist Conference, Portland, ME, USA, 11–15 August 2019; Volume 171, pp. 2843–2858. [Google Scholar] [CrossRef] [Scilit]
  13. Stoer, J.; Bulirsch, R. Introduction to Numerical Analysis; Springer Science & Business Media: New York, NY, USA, 2013; Volume 12. [Google Scholar] [CrossRef] [Scilit]
Table 1. The degree n, the value P n ( x ) , the error estimator E n ( x ) , the actual error e n ( x ) = f ( x ) P n ( x ) , the error e n E n + 1 ( x ) = f ( x ) P n ( x ) E n + 1 ( x ) , and the effectivity index θ n at x = 1 for Example 1 using tolerances ϵ = 10 i , i = 1 , 2 , , 14 .
Table 1. The degree n, the value P n ( x ) , the error estimator E n ( x ) , the actual error e n ( x ) = f ( x ) P n ( x ) , the error e n E n + 1 ( x ) = f ( x ) P n ( x ) E n + 1 ( x ) , and the effectivity index θ n at x = 1 for Example 1 using tolerances ϵ = 10 i , i = 1 , 2 , , 14 .
ϵ n P n ( x ) E n + 1 ( x ) e n ( x ) e n E n + 1 ( x ) θ n
10 1 30.333333333333333 4.1667 × 10 2 3.4546 × 10 2 7.1206 × 10 3 1.2061
10 2 40.375000000000000 8.3333 × 10 3 7.1206 × 10 3 1.2128 × 10 3 1.1703
10 3 60.368055555555556 1.9841 × 10 4 1.7611 × 10 4 2.2298 × 10 5 1.1266
10 4 70.367857142857143 2.4802 × 10 5 2.2298 × 10 5 2.5033 × 10 6 1.1123
10 5 80.367881944444444 2.7557 × 10 6 2.5033 × 10 6 2.5246 × 10 7 1.1009
10 6 90.367879188712522 2.7557 × 10 7 2.5246 × 10 7 2.3114 × 10 8 1.0916
10 7 100.367879464285714 2.5052 × 10 8 2.3114 × 10 8 1.9378 × 10 9 1.0838
10 8 110.367879439233606 2.0877 × 10 9 1.9378 × 10 9 1.4984 × 10 10 1.0773
10 9 120.367879441321282 1.6059 × 10 10 1.4984 × 10 10 1.0751 × 10 11 1.0718
10 10 130.367879441160691 1.1471 × 10 11 1.0751 × 10 11 7.1968 × 10 13 1.0669
10 11 140.367879441172162 7.6472 × 10 13 7.1970 × 10 13 4.5014 × 10 14 1.0625
10 12 140.367879441172162 7.6472 × 10 13 7.1970 × 10 13 4.5014 × 10 14 1.0625
10 13 150.367879441171397 4.7795 × 10 14 4.5020 × 10 14 2.7752 × 10 15 1.0616
10 14 160.367879441171445 2.8115 × 10 15 2.7756 × 10 15 3.5900 × 10 17 1.0129
Table 2. The degree n, the error estimator E n + 1 L 2 [ 0 , 1 ] , the actual error e n L 2 [ 0 , 1 ] = f P n L 2 [ 0 , 1 ] , the error e n E n + 1 L 2 [ 0 , 1 ] = f P n E n + 1 L 2 [ 0 , 1 ] , the error e ^ n = e n L 2 [ 0 , 1 ] E n + 1 L 2 [ 0 , 1 ] , and the effectivity index θ n = e n L 2 [ 0 , 1 ] E n + 1 L 2 [ 0 , 1 ] , for Example 1, using tolerances ϵ = 10 i , i = 1 , 2 , , 15 .
Table 2. The degree n, the error estimator E n + 1 L 2 [ 0 , 1 ] , the actual error e n L 2 [ 0 , 1 ] = f P n L 2 [ 0 , 1 ] , the error e n E n + 1 L 2 [ 0 , 1 ] = f P n E n + 1 L 2 [ 0 , 1 ] , the error e ^ n = e n L 2 [ 0 , 1 ] E n + 1 L 2 [ 0 , 1 ] , and the effectivity index θ n = e n L 2 [ 0 , 1 ] E n + 1 L 2 [ 0 , 1 ] , for Example 1, using tolerances ϵ = 10 i , i = 1 , 2 , , 15 .
ϵ n E n + 1 L 2 [ 0 , 1 ] e n L 2 [ 0 , 1 ] e n E n + 1 L 2 [ 0 , 1 ] e ^ n θ n
10 1 2 6.2994 × 10 2 5.1355 × 10 2 6.5121 × 10 2 1.1639 × 10 2 1.2266
10 2 4 2.5126 × 10 3 2.1742 × 10 3 2.5579 × 10 3 3.3842 × 10 4 1.1557
10 3 5 3.8521 × 10 4 3.3952 × 10 4 3.9060 × 10 4 4.5692 × 10 5 1.1346
10 4 6 5.1230 × 10 5 4.5801 × 10 5 5.1803 × 10 5 5.4292 × 10 6 1.1185
10 5 7 6.0153 × 10 6 5.4391 × 10 6 6.0703 × 10 6 5.7613 × 10 7 1.1059
10 6 8 6.3221 × 10 7 5.7697 × 10 7 6.3702 × 10 7 5.5239 × 10 8 1.0957
10 7 9 6.0135 × 10 8 5.5304 × 10 8 6.0522 × 10 8 4.8307 × 10 9 1.0873
10 8 10 5.2237 × 10 9 4.8354 × 10 9 5.2525 × 10 9 3.8833 × 10 10 1.0803
10 9 11 4.1754 × 10 10 3.8865 × 10 10 4.1953 × 10 10 2.8886 × 10 11 1.0743
10 10 12 3.0906 × 10 11 2.8906 × 10 11 3.1035 × 10 11 1.9994 × 10 12 1.0692
10 11 13 2.1301 × 10 12 2.0007 × 10 12 2.1379 × 10 12 1.2941 × 10 13 1.0647
10 12 14 1.3735 × 10 13 1.2948 × 10 13 1.3779 × 10 13 7.8685 × 10 15 1.0608
10 13 15 8.3200 × 10 15 7.8707 × 10 15 8.3457 × 10 15 4.4929 × 10 16 1.0571
10 14 15 8.3200 × 10 15 7.8707 × 10 15 8.3457 × 10 15 4.4929 × 10 16 1.0571
10 15 16 4.7522 × 10 16 4.6977 × 10 16 4.9468 × 10 16 5.4517 × 10 18 1.0116
Table 3. The degree n, the value P n ( x ) , the error estimator E n ( x ) , the actual error e n ( x ) = f ( x ) P n ( x ) , the error e n E n + 1 ( x ) = f ( x ) P n ( x ) E n + 1 ( x ) , and the effectivity index θ n at x = 0.1 , for Example 2, using tolerances ϵ = 10 i , i = 1 , 2 , , 14 .
Table 3. The degree n, the value P n ( x ) , the error estimator E n ( x ) , the actual error e n ( x ) = f ( x ) P n ( x ) , the error e n E n + 1 ( x ) = f ( x ) P n ( x ) E n + 1 ( x ) , and the effectivity index θ n at x = 0.1 , for Example 2, using tolerances ϵ = 10 i , i = 1 , 2 , , 14 .
ϵ n P n ( x ) E n + 1 ( x ) e n ( x ) e n E n + 1 ( x ) θ n
10 1 0 0.00000000000000000 1.0000 × 10 1 9.5310 × 10 2 4.6898 × 10 3 1.0492
10 2 1 0.10000000000000000 5.0000 × 10 3 4.6898 × 10 3 3.1018 × 10 4 1.0661
10 3 2 0.09500000000000000 3.3333 × 10 4 3.1018 × 10 4 2.3154 × 10 5 1.0746
10 4 3 0.09533333333333334 2.5000 × 10 5 2.3154 × 10 5 1.8465 × 10 6 1.0797
10 5 4 0.09530833333333334 2.0000 × 10 6 1.8465 × 10 6 1.5353 × 10 7 1.0831
10 6 5 0.09531033333333334 1.6667 × 10 7 1.5353 × 10 7 1.3138 × 10 8 1.0856
10 7 6 0.09531016666666668 1.4286 × 10 8 1.3138 × 10 8 1.1481 × 10 9 1.0874
10 8 7 0.09531018095238097 1.2500 × 10 9 1.1481 × 10 9 1.0194 × 10 10 1.0888
10 9 8 0.09531017970238097 1.1111 × 10 10 1.0194 × 10 10 9.1671 × 10 12 1.0899
10 10 9 0.09531017981349207 1.0000 × 10 11 9.1671 × 10 12 8.3286 × 10 13 1.0909
10 11 10 0.09531017980349207 9.0909 × 10 13 8.3286 × 10 13 7.6229 × 10 14 1.0915
10 12 10 0.09531017980349207 9.0909 × 10 13 8.3286 × 10 13 7.6229 × 10 14 1.0915
10 13 11 0.09531017980440117 8.3333 × 10 14 7.6231 × 10 14 7.1026 × 10 15 1.0932
10 14 12 0.09531017980431783 7.6923 × 10 15 7.1054 × 10 15 5.8688 × 10 16 1.0826
Table 4. The degree n, the error estimator E n + 1 L 2 [ 0 , 0.1 ] , the actual error e n L 2 [ 0 , 0.1 ] = f P n L 2 [ 0 , 0.1 ] , the error e n E n + 1 L 2 [ 0 , 0.1 ] = f P n E n + 1 L 2 [ 0 , 0.1 ] , the error e ^ n = e n L 2 [ 0 , 0.1 ] E n + 1 L 2 [ 0 , 0.1 ] , and the effectivity index θ n = e n L 2 [ 0 , 0.1 ] E n + 1 L 2 [ 0 , 0.1 ] , for Example 2, using tolerances ϵ = 10 i , i = 1 , 2 , , 15 .
Table 4. The degree n, the error estimator E n + 1 L 2 [ 0 , 0.1 ] , the actual error e n L 2 [ 0 , 0.1 ] = f P n L 2 [ 0 , 0.1 ] , the error e n E n + 1 L 2 [ 0 , 0.1 ] = f P n E n + 1 L 2 [ 0 , 0.1 ] , the error e ^ n = e n L 2 [ 0 , 0.1 ] E n + 1 L 2 [ 0 , 0.1 ] , and the effectivity index θ n = e n L 2 [ 0 , 0.1 ] E n + 1 L 2 [ 0 , 0.1 ] , for Example 2, using tolerances ϵ = 10 i , i = 1 , 2 , , 15 .
ϵ n E n + 1 L 2 [ 0 , 0.1 ] e n L 2 [ 0 , 0.1 ] e n E n + 1 L 2 [ 0 , 0.1 ] e ^ n θ n
10 1 0 1.8257 × 10 2 1.7608 × 10 2 6.7021 × 10 4 6.4953 × 10 4 1.0369
10 2 1 7.0711 × 10 4 6.7021 × 10 4 3.7401 × 10 5 3.6896 × 10 5 1.0551
10 3 1 7.0711 × 10 4 6.7021 × 10 4 3.7401 × 10 5 3.6896 × 10 5 1.0551
10 4 2 3.9841 × 10 5 3.7401 × 10 5 2.4589 × 10 6 2.4404 × 10 6 1.0653
10 5 3 2.6352 × 10 6 2.4589 × 10 6 1.7719 × 10 7 1.7635 × 10 7 1.0717
10 6 4 1.9069 × 10 7 1.7719 × 10 7 1.3542 × 10 8 1.3498 × 10 8 1.0762
10 7 5 1.4618 × 10 8 1.3542 × 10 8 1.0781 × 10 9 1.0755 × 10 9 1.0794
10 8 6 1.1664 × 10 9 1.0781 × 10 9 8.8455 × 10 11 8.8293 × 10 11 1.0819
10 9 7 9.5871 × 10 11 8.8455 × 10 11 7.4266 × 10 12 7.4158 × 10 12 1.0838
10 10 7 9.5871 × 10 11 8.8455 × 10 11 7.4266 × 10 12 7.4158 × 10 12 1.0838
10 11 8 8.0608 × 10 12 7.4266 × 10 12 6.3501 × 10 13 6.3427 × 10 13 1.0854
10 12 9 6.9007 × 10 13 6.3501 × 10 13 5.5110 × 10 14 5.5057 × 10 14 1.0867
10 13 10 5.9944 × 10 14 5.5110 × 10 14 4.8377 × 10 15 4.8335 × 10 15 1.0877
10 14 11 5.2705 × 10 15 4.8380 × 10 15 4.3282 × 10 16 4.3242 × 10 16 1.0894
10 15 12 4.6814 × 10 16 4.3268 × 10 16 4.0448 × 10 17 3.5457 × 10 17 1.0819
Table 5. The degree n, the value P n ( x ) , the error estimator E n ( x ) , the actual error e n ( x ) = f ( x ) P n ( x ) , the error e n E n + 1 ( x ) = f ( x ) P n ( x ) E n + 1 ( x ) , and the effectivity index θ n at x = 1 , for Example 3, using tolerances ϵ = 10 i , i = 1 , 2 , , 13 .
Table 5. The degree n, the value P n ( x ) , the error estimator E n ( x ) , the actual error e n ( x ) = f ( x ) P n ( x ) , the error e n E n + 1 ( x ) = f ( x ) P n ( x ) E n + 1 ( x ) , and the effectivity index θ n at x = 1 , for Example 3, using tolerances ϵ = 10 i , i = 1 , 2 , , 13 .
ϵ n P n ( x ) E n + 1 ( x ) e n ( x ) e n E n + 1 ( x ) θ n
10 1 87.478596230158731 5.2830 × 10 2 3.9753 × 10 2 1.3077 × 10 2 1.3290
10 2 107.442320601851852 4.3866 × 10 3 3.4774 × 10 3 9.0916 × 10 4 1.2614
10 3 127.439052030306371 2.5472 × 10 4 2.0886 × 10 4 4.5854 × 10 5 1.2195
10 4 137.438797312833771 5.5052 × 10 5 4.5854 × 10 5 9.1977 × 10 6 1.2006
10 5 157.438841417205174 2.0605 × 10 6 1.7501 × 10 6 3.1045 × 10 7 1.1774
10 6 167.438843477745725 3.6270 × 10 7 3.1045 × 10 7 5.2256 × 10 8 1.1683
10 7 177.438843115042181 6.0553 × 10 8 5.2256 × 10 8 8.2966 × 10 9 1.1588
10 8 187.438843175595133 9.5502 × 10 9 8.2966 × 10 9 1.2536 × 10 9 1.1511
10 9 207.438843167478526 2.0470 × 10 10 1.8001 × 10 10 2.4686 × 10 11 1.1371
10 10 217.438843167273828 2.7923 × 10 11 2.4686 × 10 11 3.2368 × 10 12 1.1311
10 11 227.438843167301751 3.6413 × 10 12 3.2365 × 10 12 4.0477 × 10 13 1.1251
10 12 237.438843167298109 4.5523 × 10 13 4.0501 × 10 13 5.0220 × 10 14 1.1240
10 13 247.438843167298565 5.4622 × 10 14 5.0626 × 10 14 3.9959 × 10 15 1.0789
Table 6. The degree n, the error estimator E n + 1 L 2 [ 0 , 1 ] , the actual error e n L 2 [ 0 , 1 ] = f P n L 2 [ 0 , 1 ] , the error e n E n + 1 L 2 [ 0 , 1 ] = f P n E n + 1 L 2 [ 0 , 1 ] , the error e ^ n = e n L 2 [ 0 , 1 ] E n + 1 L 2 [ 0 , 1 ] , and the effectivity index θ n = e n L 2 [ 0 , 1 ] E n + 1 L 2 [ 0 , 1 ] , for Example 3, using tolerances ϵ = 10 i , i = 1 , 2 , , 14 .
Table 6. The degree n, the error estimator E n + 1 L 2 [ 0 , 1 ] , the actual error e n L 2 [ 0 , 1 ] = f P n L 2 [ 0 , 1 ] , the error e n E n + 1 L 2 [ 0 , 1 ] = f P n E n + 1 L 2 [ 0 , 1 ] , the error e ^ n = e n L 2 [ 0 , 1 ] E n + 1 L 2 [ 0 , 1 ] , and the effectivity index θ n = e n L 2 [ 0 , 1 ] E n + 1 L 2 [ 0 , 1 ] , for Example 3, using tolerances ϵ = 10 i , i = 1 , 2 , , 14 .
ϵ n E n + 1 L 2 [ 0 , 1 ] e n L 2 [ 0 , 1 ] e n E n + 1 L 2 [ 0 , 1 ] e ^ n θ n
10 1 7 4.1006 × 10 2 3.1775 × 10 2 9.2417 × 10 3 9.2307 × 10 3 1.2905
10 2 9 3.6125 × 10 3 2.8815 × 10 3 7.3164 × 10 4 7.3101 × 10 4 1.2537
10 3 10 9.1467 × 10 4 7.3164 × 10 4 1.8317 × 10 4 1.8303 × 10 4 1.2502
10 4 12 4.9020 × 10 5 4.0462 × 10 5 8.5633 × 10 6 8.5586 × 10 6 1.2115
10 5 14 1.9663 × 10 6 1.6604 × 10 6 3.0602 × 10 7 3.0590 × 10 7 1.1842
10 6 15 3.5869 × 10 7 3.0602 × 10 7 5.2688 × 10 8 5.2670 × 10 8 1.1721
10 7 16 6.1308 × 10 8 5.2688 × 10 8 8.6221 × 10 9 8.6199 × 10 9 1.1636
10 8 17 9.9548 × 10 9 8.6221 × 10 9 1.3329 × 10 9 1.3327 × 10 9 1.1546
10 9 19 2.2389 × 10 10 1.9636 × 10 10 2.7524 × 10 11 2.7536 × 10 11 1.1402
10 10 20 3.1216 × 10 11 2.7524 × 10 11 3.6885 × 10 12 3.6920 × 10 12 1.1341
10 11 21 4.1625 × 10 12 3.6886 × 10 12 4.7308 × 10 13 4.7392 × 10 13 1.1285
10 12 22 5.3114 × 10 13 4.7316 × 10 13 5.7815 × 10 14 5.7982 × 10 14 1.1225
10 13 23 6.5033 × 10 14 5.7803 × 10 14 7.2969 × 10 15 7.2302 × 10 15 1.1251
10 14 24 7.6486 × 10 15 7.3027 × 10 15 1.1216 × 10 15 3.4594 × 10 16 1.0474
Table 7. Degree n, the value P n ( x ) , the error estimator E n ( x ) , the actual error e n ( x ) = f ( x ) P n ( x ) , the error e n E n + 1 ( x ) = f ( x ) P n ( x ) E n + 1 ( x ) , and the effectivity index θ n at x = 2.1 , for Example 4, using tolerances ϵ = 10 i , i = 1 , 2 , , 13 .
Table 7. Degree n, the value P n ( x ) , the error estimator E n ( x ) , the actual error e n ( x ) = f ( x ) P n ( x ) , the error e n E n + 1 ( x ) = f ( x ) P n ( x ) E n + 1 ( x ) , and the effectivity index θ n at x = 2.1 , for Example 4, using tolerances ϵ = 10 i , i = 1 , 2 , , 13 .
ϵ n P n ( x ) E n + 1 ( x ) e n ( x ) e n E n + 1 ( x ) θ n
10 1 11.760918321028359 2.4056 × 10 4 2.3663 × 10 4 3.9277 × 10 6 1.0166
10 2 11.760918321028359 2.4056 × 10 4 2.3663 × 10 4 3.9277 × 10 6 1.0166
10 3 11.760918321028359 2.4056 × 10 4 2.3663 × 10 4 3.9277 × 10 6 1.0166
10 4 21.760677758416196 4.0094 × 10 6 3.9277 × 10 6 8.1627 × 10 8 1.0208
10 5 21.760677758416196 4.0094 × 10 6 3.9277 × 10 6 8.1627 × 10 8 1.0208
10 6 31.760681767793066 8.3529 × 10 8 8.1627 × 10 8 1.9015 × 10 9 1.0233
10 7 31.760681684264381 8.3529 × 10 8 8.1627 × 10 8 1.9015 × 10 9 1.0233
10 8 41.760681686213383 1.9490 × 10 9 1.9015 × 10 9 4.7482 × 10 11 1.0250
10 9 51.760681686213383 4.8725 × 10 11 4.7482 × 10 11 1.2426 × 10 12 1.0262
10 10 51.760681686164658 4.8725 × 10 11 4.7482 × 10 11 1.2426 × 10 12 1.0262
10 11 61.760681686165934 1.2761 × 10 12 1.2426 × 10 12 3.3571 × 10 14 1.0270
10 12 71.760681686165934 3.4562 × 10 14 3.3529 × 10 14 1.0332 × 10 15 1.0308
10 13 71.760681686165900 3.4562 × 10 14 3.3529 × 10 14 1.0332 × 10 15 1.0308
Table 8. The degree n, the error estimator E n + 1 L 2 [ 2 , 2.1 ] , the actual error e n L 2 [ 2 , 2.1 ] = f P n L 2 [ 2 , 2.1 ] , the error e n E n + 1 L 2 [ 2 , 2.1 ] = f P n E n + 1 L 2 [ 2 , 2.1 ] , the error e ^ n = e n L 2 [ 2 , 2.1 ] E n + 1 L 2 [ 2 , 2.1 ] , and the effectivity index θ n = e n L 2 [ 2 , 2.1 ] E n + 1 L 2 [ 2 , 2.1 ] , for Example 4, using tolerances ϵ = 10 i , i = 1 , 2 , , 14 .
Table 8. The degree n, the error estimator E n + 1 L 2 [ 2 , 2.1 ] , the actual error e n L 2 [ 2 , 2.1 ] = f P n L 2 [ 2 , 2.1 ] , the error e n E n + 1 L 2 [ 2 , 2.1 ] = f P n E n + 1 L 2 [ 2 , 2.1 ] , the error e ^ n = e n L 2 [ 2 , 2.1 ] E n + 1 L 2 [ 2 , 2.1 ] , and the effectivity index θ n = e n L 2 [ 2 , 2.1 ] E n + 1 L 2 [ 2 , 2.1 ] , for Example 4, using tolerances ϵ = 10 i , i = 1 , 2 , , 14 .
ϵ n E n + 1 L 2 [ 2 , 2.1 ] e n L 2 [ 2 , 2.1 ] e n E n + 1 L 2 [ 2 , 2.1 ] e ^ n θ n
10 1 0 5.2705 × 10 3 5.2380 × 10 3 3.3557 × 10 5 3.2502 × 10 5 1.0062
10 2 0 5.2705 × 10 3 5.2380 × 10 3 3.3557 × 10 5 3.2502 × 10 5 1.0062
10 3 1 3.4021 × 10 5 3.3557 × 10 5 4.7065 × 10 7 4.6415 × 10 7 1.0138
10 4 1 3.4021 × 10 5 3.3557 × 10 5 4.7065 × 10 7 4.6415 × 10 7 1.0138
10 5 2 4.7921 × 10 7 4.7065 × 10 7 8.6239 × 10 9 8.5572 × 10 9 1.0182
10 6 2 4.7921 × 10 7 4.7065 × 10 7 8.6239 × 10 9 8.5572 × 10 9 1.0182
10 7 3 8.8047 × 10 9 8.6239 × 10 9 1.8167 × 10 10 1.8078 × 10 10 1.0210
10 8 3 8.8047 × 10 9 8.6239 × 10 9 1.8167 × 10 10 1.8078 × 10 10 1.0210
10 9 4 1.8583 × 10 10 1.8167 × 10 10 4.1721 × 10 12 4.1579 × 10 12 1.0229
10 10 5 4.2735 × 10 12 4.1721 × 10 12 1.0162 × 10 13 1.0137 × 10 13 1.0243
10 11 5 4.2735 × 10 12 4.1721 × 10 12 1.0162 × 10 13 1.0137 × 10 13 1.0243
10 12 6 1.0420 × 10 13 1.0162 × 10 13 2.5811 × 10 15 2.5751 × 10 15 1.0253
10 13 7 2.6508 × 10 15 2.5846 × 10 15 8.6365 × 10 17 6.6198 × 10 17 1.0256
10 14 7 2.6508 × 10 15 2.5846 × 10 15 8.6365 × 10 17 6.6198 × 10 17 1.0256
Table 9. The degree n, the value P n ( x ) , the error estimator E n ( x ) , the actual error e n ( x ) = f ( x ) P n ( x ) , the error e n E n + 1 ( x ) = f ( x ) P n ( x ) E n + 1 ( x ) , and the effectivity index θ n at x = 0.5 , for Example 5, using tolerances ϵ = 10 i , i = 1 , 2 , , 13 .
Table 9. The degree n, the value P n ( x ) , the error estimator E n ( x ) , the actual error e n ( x ) = f ( x ) P n ( x ) , the error e n E n + 1 ( x ) = f ( x ) P n ( x ) E n + 1 ( x ) , and the effectivity index θ n at x = 0.5 , for Example 5, using tolerances ϵ = 10 i , i = 1 , 2 , , 13 .
ϵ n P n ( x ) E n + 1 ( x ) e n ( x ) e n E n + 1 ( x ) θ n
10 1 10.5 2.0833 × 10 2 2.0574 × 10 2 2.5887 × 10 4 1.0126
10 2 30.479166666666667 2.6042 × 10 4 2.5887 × 10 4 1.5447 × 10 6 1.0060
10 3 30.479166666666667 2.6042 × 10 4 2.5887 × 10 4 1.5447 × 10 6 1.0060
10 4 50.479427083333333 1.5501 × 10 6 1.5447 × 10 6 5.3701 × 10 9 1.0035
10 5 50.479427083333333 1.5501 × 10 6 1.5447 × 10 6 5.3701 × 10 9 1.0035
10 6 70.479425533234127 5.3823 × 10 9 5.3701 × 10 9 1.2213 × 10 11 1.0023
10 7 70.479425533234127 5.3823 × 10 9 5.3701 × 10 9 1.2213 × 10 11 1.0023
10 8 70.479425533234127 5.3823 × 10 9 5.3701 × 10 9 1.2213 × 10 11 1.0023
10 9 90.479425538616416 1.2232 × 10 11 1.2213 × 10 11 1.9577 × 10 14 1.0016
10 10 90.479425538616416 1.2232 × 10 11 1.2213 × 10 11 1.9577 × 10 14 1.0016
10 11 110.479425538604183 1.9603 × 10 14 1.9595 × 10 14 7.8886 × 10 18 1.0004
10 12 110.479425538604183 1.9603 × 10 14 1.9595 × 10 14 7.8886 × 10 18 1.0004
10 13 110.479425538604183 1.9603 × 10 14 1.9595 × 10 14 7.8886 × 10 18 1.0004
Table 10. The degree n, the value P n ( x , y ) , the error estimator E n + 1 ( x , y ) , the actual error e n ( x , y ) = f ( x , y ) P n ( x , y ) , the error e n E n + 1 ( x , y ) = f ( x , y ) P n ( x , y ) E n + 1 ( x , y ) , and the effectivity index θ n at ( x , y ) = ( 1 , 0.5 ) for Example 6 using tolerances ϵ = 10 i , i = 1 , 2 , , 13 .
Table 10. The degree n, the value P n ( x , y ) , the error estimator E n + 1 ( x , y ) , the actual error e n ( x , y ) = f ( x , y ) P n ( x , y ) , the error e n E n + 1 ( x , y ) = f ( x , y ) P n ( x , y ) E n + 1 ( x , y ) , and the effectivity index θ n at ( x , y ) = ( 1 , 0.5 ) for Example 6 using tolerances ϵ = 10 i , i = 1 , 2 , , 13 .
ϵ n P n ( x , y ) E n + 1 ( x , y ) e n ( x , y ) e n E n + 1 ( x , y ) θ n
10 1 40.2734375 6.3281 × 10 2 5.0307 × 10 2 1.2974 × 10 2 1.2579
10 2 60.2259765625 3.3901 × 10 3 2.8464 × 10 3 5.4366 × 10 4 1.1910
10 3 70.222586495535714 6.3564 × 10 4 5.4366 × 10 4 9.1973 × 10 5 1.1692
10 4 90.223116193498884 1.5891 × 10 5 1.3967 × 10 5 1.9243 × 10 6 1.1378
10 5 100.2231320844377791 2.1669 × 10 6 1.9243 × 10 6 2.4266 × 10 7 1.1261
10 6 110.223129917491566 2.7087 × 10 7 2.4266 × 10 7 2.8211 × 10 8 1.1163
10 7 120.223130188359843 3.1254 × 10 8 2.8211 × 10 8 3.0426 × 10 9 1.1079
10 8 130.223130157105811 3.3486 × 10 9 3.0426 × 10 9 3.0603 × 10 10 1.1006
10 9 140.223130160454457 3.3486 × 10 10 3.0603 × 10 10 2.8837 × 10 11 1.0942
10 10 150.223130160119592 3.1394 × 10 11 2.8837 × 10 11 2.5562 × 10 12 1.0886
10 11 160.223130160150986 2.7700 × 10 12 2.5562 × 10 12 2.1379 × 10 13 1.0836
10 12 170.223130160148216 2.3083 × 10 13 2.1375 × 10 13 1.7089 × 10 14 1.0800
10 13 180.223130160148447 1.8224 × 10 14 1.7070 × 10 14 1.1541 × 10 15 1.0676
Table 11. The degree n, the value P n ( x ) , the error estimator E n + 1 ( x , y ) , the actual error e n ( x , y ) = f ( x , y ) P n ( x , y ) , the error e n E n + 1 ( x , y ) = f ( x , y ) P n ( x , y ) E n + 1 ( x , y ) , and the effectivity index θ n at ( x , y ) = ( 0.3 , 0.2 ) for Example 7 using tolerances ϵ = 10 i , i = 1 , 2 , , 13 .
Table 11. The degree n, the value P n ( x ) , the error estimator E n + 1 ( x , y ) , the actual error e n ( x , y ) = f ( x , y ) P n ( x , y ) , the error e n E n + 1 ( x , y ) = f ( x , y ) P n ( x , y ) E n + 1 ( x , y ) , and the effectivity index θ n at ( x , y ) = ( 0.3 , 0.2 ) for Example 7 using tolerances ϵ = 10 i , i = 1 , 2 , , 13 .
ϵ n P n ( x , y ) E n + 1 ( x , y ) e n ( x , y ) e n E n + 1 ( x , y ) θ n
10 1 10.5 2.0833 × 10 2 2.0574 × 10 2 2.5887 × 10 4 1.0126
10 2 30.479166666666667 2.6042 × 10 4 2.5887 × 10 4 1.5447 × 10 6 1.0060
10 3 30.479166666666667 2.6042 × 10 4 2.5887 × 10 4 1.5447 × 10 6 1.0060
10 4 50.479427083333333 1.5501 × 10 6 1.5447 × 10 6 5.3701 × 10 9 1.0035
10 5 50.479427083333333 1.5501 × 10 6 1.5447 × 10 6 5.3701 × 10 9 1.0035
10 6 70.479425533234127 5.3823 × 10 9 5.3701 × 10 9 1.2213 × 10 11 1.0023
10 7 70.479425533234127 5.3823 × 10 9 5.3701 × 10 9 1.2213 × 10 11 1.0023
10 8 70.479425533234127 5.3823 × 10 9 5.3701 × 10 9 1.2213 × 10 11 1.0023
10 9 90.479425538616416 1.2232 × 10 11 1.2213 × 10 11 1.9633 × 10 14 1.0016
10 10 90.479425538616416 1.2232 × 10 11 1.2213 × 10 11 1.9633 × 10 14 1.0016
10 11 110.479425538604183 1.9603 × 10 14 1.9651 × 10 14 4.7623 × 10 17 0.99758
10 12 110.479425538604183 1.9603 × 10 14 1.9651 × 10 14 4.7623 × 10 17 0.99758
10 13 110.479425538604183 1.9603 × 10 14 1.9651 × 10 14 4.7623 × 10 17 0.99758
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Baccouch, M. A Posteriori Error Estimation and Adaptive Taylor Series Methods for Nonlinear Function Approximation. Mathematics 2026, 14, 805. https://doi.org/10.3390/math14050805

AMA Style

Baccouch M. A Posteriori Error Estimation and Adaptive Taylor Series Methods for Nonlinear Function Approximation. Mathematics. 2026; 14(5):805. https://doi.org/10.3390/math14050805

Chicago/Turabian Style

Baccouch, Mahboub. 2026. "A Posteriori Error Estimation and Adaptive Taylor Series Methods for Nonlinear Function Approximation" Mathematics 14, no. 5: 805. https://doi.org/10.3390/math14050805

APA Style

Baccouch, M. (2026). A Posteriori Error Estimation and Adaptive Taylor Series Methods for Nonlinear Function Approximation. Mathematics, 14(5), 805. https://doi.org/10.3390/math14050805

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop