<<

Mathematical and Computational Applications

Article Dual Taylor , Spline Based and and Applications

Roy M. Howard School of Electrical Engineering, Computing and Mathematical , Curtin University, GPO Box U1987, Perth 6845, Australia; [email protected]  Received: 2 March 2019; Accepted: 25 March 2019; Published: 1 April 2019 

Abstract: In this paper, function approximation is utilized to establish functional series to . The starting is the definition of a dual , which is a natural extension of a Taylor series, and spline based series approximation. It is shown that a spline based series approximation to an integral yields, in general, a higher accuracy for a set than a dual Taylor series, a Taylor series and an series. A spline based series for an integral has many applications and indicative examples are detailed. These include a series for the , which coincides with a Padé series, new series for the function as well as new series for integral defined functions such as the Fresnel integral function. It is shown that these series are more accurate and have larger regions of convergence than corresponding Taylor series. The spline based series for an integral can be used to define algorithms for highly accurate approximations for the logarithm function, the exponential function, rational numbers to a fractional power and the inverse sine, inverse cosine and inverse functions. These algorithms are used to establish highly accurate approximations for π and Catalan’s . The use of sub-intervals allows the region of convergence for an integral approximation to be extended.

Keywords: integral approximation; function approximation; Taylor series; dual Taylor series; spline approximation; antiderivative series; exponential function; logarithm function; Fresnel sine integral; Padé series; Catalan’s constant

MSC: 26A06; 26A36; 33B10; 41A15; 41A58

1. Introduction The mathematics underpinning dynamic behaviour is of fundamental importance to modern and technology and integration theory is foundational. The history of integration dates from early recorded history, with area calculations being prominent, e.g., [1,2]. The modern approach to integration commences with Newton and Leibniz and Thomson [3,4] provides a lucid, and up to date, perspective on the approaches of Newton, Riemann and Lebesgue and the more recent work of Henstock and Kurzweil. A useful starting point for integration theory is the second part of the Fundamental Theorem of which states Zβ f (t)dt = F(β) F(α), (1) − α where f = F(1) on [α, β] for some antiderivative function F, assuming f is integrable, e.g., [4–6]. However, within all frameworks of integration, a practical problem is to determine antiderivative functions for, or suitable analytical approximations to, specified integrals. Despite the impressive collection of results that can be found in tables books such as Gradsteyn and Ryzhik [7], the problem of

Math. Comput. Appl. 2019, 24, 35; doi:10.3390/mca24020035 www.mdpi.com/journal/mca Math. Comput. Appl. 2019, 24, 35 2 of 40 determining an antiderivative function, or an approximation to the integral of a specified function, in general, is problematic. As a consequence, numerical evaluation of integrals is widely used. The problem is: For an arbitrary class of functions , and a specified [α, β], how to determine = an analytical expression, or analytical approximation, to the integral

Zt I(t) = f (λ)dλ, f , t [α, β]. (2) ∈ = ∈ α

Approaches include use of , e.g., [8], use of Taylor series, asymptotic expansions, e.g., [9,10], etc. A useful approximation approach is to use , bounded convergence, monotone convergence or dominated convergence of a of functions and a representative statement  arising from dominated convergence, e.g., [11], is: If fi is a sequence of Lebesgue integrable functions on [α, β], lim fi(t) = f (t) pointwise almost everywhere on [α, β], and there exists a Lebesgue integrable i →∞ function g on [α, β] with the property fi(t) < g(t) , t [α, β] almost everywhere and for all i, then ∈ Zt Zt lim fi(λ)dλ = f (λ)dλ = limFi(t), t [α, β], (3) i i ∈ →∞ α α →∞ where Zt Fi(t) = fi(λ)dλ. (4) α  For the case where f ∞ is such that the corresponding sequence of antiderivative functions F ∞ is i i=1 { i}i=1 known, then an analytical approximation to the integral of f is defined by Fn(t). It is well known that , trigonometric and orthogonal functions can be defined to approximate a specified function, e.g., [12]. In general, such approximations require knowledge of the function at a specified number of points within the approximating interval and the use of approximating functions based on points within the region of integration underpins numerical evaluation of integrals, e.g., [13]. Of interest is if function values at the end point of an interval, alone, can suffice to provide a suitable analytic approximation to a function and its integral. In this context, the use of a Taylor series approximation is one possible approach but, in general, the approximation has a limited region of convergence. The region of convergence can be extended through use of a dual Taylor series which is introduced in this paper and is based on utilizing two demarcation functions. An alternative approach consider in this paper is to use spline based approximations. It is shown that a spline based integral approximation, based solely on function values at the interval endpoints, has a simple analytic form and, in general, better convergence that an integral approximation based on a Taylor or a dual Taylor series. Further, a spline based integral approximation leads to new series for many defined integral functions, as well as many standard functions, with, in general, better convergence than a Taylor series. The spline based series for an integral can be used to define algorithms for highly accurate approximations for specific functions and new results for definite integrals are shown. As is usual, interval sub-division leads to improved integral accuracy and high levels of precision in results can readily be obtained. In Section2, a brief introduction is provided for integral approximation based on an antiderivative series and a Taylor series. A natural generalization of a Taylor series is a dual Taylor series and this is defined in Section3 along with its application to integral approximation. An alternative to a dual Taylor series approximation to a function is a spline based approximation and this is detailed in Section4 along with its application to integral approximation. A comparison of the antiderivative, Taylor series, dual Taylor series and spline approaches for integral approximation is detailed in Section5. It is Math. Comput. Appl. 2019, 24, 35 3 of 40 shown that a spline based approach, in general, is superior. Applications of a spline based integral approximation are detailed in Section6 and concluding comments are detailed in Section7. k In terms of notation f (k)(t) = d f (t) is used and all in the paper are with respect to dtk the variable t. Mathematica has been used to generate all numerical results, graphic display of results and, where appropriate, analytical results.

2. Integral Approximation: Antiderivative Series, Taylor Series For integral approximation over a specified interval, and based on function values at the interval endpoints, two standard results can be considered: First, an antiderivative series based on integration by parts. Second, a Taylor of an integral.

2.1. Antiderivative Series An antiderivative series for an integral can be established by application of integration by parts, e.g., [14]: If f : R R is nth order differentiable on a closed interval [α, t] (left and right hand limits, → as appropriate, at α, t) then

t Z Xn 1 − h k+1 (k) k+1 (k) i I(t) = f (λ)dλ = c α f (α) t f (t) + Rn(α, t), (5) k − α k=0 where t k+1 n Z ( 1) ( 1) n (n) c = − , Rn(α, t) = − λ f (λ)dλ. (6) k (k + 1)! n! · α

2.2. Taylor Series Integral Approximation A Taylor series based approximation to an integral is based on a Taylor series function approximation which dates from 1715 [15]. Consider an interval [α, β] and a function f : R R → whose derivatives of all orders up to, and including, n + 1 exist at all points in the interval [α, β]. A nth order Taylor series of a function f , and based on the point α, is defined according to

Pn (t α)k f (k)(α) (α ) = (α) + − fn , t f k! k=1 (7) Pn (t α)k f (k)(α) = − α k! , t , . k=0

For notational simplicity, it is useful to use the latter form of the definition with the former form being implicit for the case of t = α. A Taylor series enables a function f : R R, assumed to be (n + 1)th → order differentiable, to be written as

f (t) = fn(α, t) + Rn(α, t), t (α, β), (8) ∈ where an explicit expression for the remainder function Rn(α, t) is

t Z (t λ)n f (n+1)(λ) R (α, t) = − dλ. (9) n n! α

See, for example, [8] or [16] for a proof. A sufficient condition for convergence of a Taylor series is for

(n) f (t α)n lim max − = 0, (10) n n! →∞ Math. Comput. Appl. 2018, 23, x FOR PEER REVIEW 4 of 42

() ( − ) lim = 0, (10) → ! Math. Comput.() Appl. 2019,(24), 35 4 of 40 where = sup { (): ∈ [α, β]}. It then follows that a nth order Taylor series for the integral (n) n o where f = sup f (n)(t) : t [α, β] . max ∈ It then follows that a nth order Taylor series() = for the(λ) integralλ (11) t based on the point , is Z I(t) = f (λ)dλ (11) α () () = ( − α) (α) + (α, ), (12) based on the point α, is Xn 1 where − k+1 (k) I(t) = ck(t α) f (α) + Rn(α, t), (12) − 1 k=0 ( − λ)()(λ) = , (α, ) = λ. (13) where ( + 1)! ! t Z n 1 (t λ) f (n)(λ) c = , Rn(α, t) = − dλ. (13) k (k + 1)! n! 3. Dual Taylor Series α

3. DualA natural Taylor Seriesgeneralization of a Taylor series is to use two Taylor series, based at different points, and to combine them by using appropriate weighting, or demarcation, functions. The result is a dual TaylorA naturalseries. generalization of a Taylor series is to use two Taylor series, based at different points, and to combine them by using appropriate weighting, or demarcation, functions. The result is a dual Taylor3.1. Demarcation series. Functions

3.1. DemarcationFor the normalized Functions case of an interval [0, 1], a dual Taylor series requires two demarcations functions, denoted and , which have the monotonic decreasing/increasing form illustrated in For the normalized case of an interval [0, 1], a dual Taylor series requires two demarcations Figure 1. The ideal, and normalized, demarcation function are defined according to functions, denoted mN and qN, which have the monotonic decreasing/increasing form illustrated in Figure1. The ideal, and normalized, demarcation1 function are defined according1 to ⎧1 0 < < ⎧ 0 0 < < ⎪ 2 1 ⎪  2 1 () =  1 0 < t < () = (1 − ) =  0 0 < t < 0.5 = 0.5 2 0.5 = 0.5 2 (14) m (t) =⎨ 0.5 1 t = 0.5 q (t) = m (1 t)⎨=  0.51 t = 0.5 (14) N ⎪0 < < 1 N N ⎪1  < < 1 ⎩ 1 − ⎩  1 0 2 2 < t < 1 12 2 < t < 1 and are such that and are such that mN((t))++qN((t))==1.1. ( (15)15)

WhetherWhether idealized idealized or or not, not, the the assumption assumption is made is made that m thatN and q Nandare such are that such (15) that is satisfied. (15) is Further,satisfied. for Further, the case for where the casemN iswhere antisymmetrical is antisymmetrical around the pointaround (1/ 2,the 1/ 2),point it follows (1/2, 1/2) that, itm followsN(t) = 1thatm N(1()t)=and1 −qN(t()1=−m)N and(1 t).( This) = is assumed.(1 − ). This is assumed. − − −

1 mNt qNt

t 1 Figure 1. Illustration of the normalized demarcation functions mN(t) and qN(t). Figure 1. Illustration of the normalized demarcation functions () and (). For a dual Taylor series, the further requirement is that the demarcation functions do not affect the value of the derivatives of the series at the end points of the interval being considered. This can be achieved by the further constraints of the right and left hand derivatives, of all orders, being zero, 10<

() () 117 mN t +1qN t = (15)

118 Whether idealized or not, the assumption is made that mN and qN are such that (15) is satisfied. Further, for the ()⁄ , ⁄ () () 119 case where mN is antisymmetrical around the point 1212 , it follows that mN t = 1 – mN 1 – t and () () 120 qN t = mN 1 – t . This is assumed.

1 m ()t N () qN t

t 1 () () Figure 1. Illustration of the normalized demarcation functions mN t and qN t .

Math.121 Comput.For Appl. a 2019dual, 24 Taylor, 35 series, the further requirement is that the demarcation functions do not affect5 of 40 the value of the 122 derivatives of the series at the end points of the interval being considered. This can be achieved by the further con- 123 straints of the right and left hand derivatives, of all orders, being zero, respectively, at the points zero and one, i.e. () () () ( ) () ( ) ( ) ( ) k ()+ k ()+ k ()m- k ( +k)()=- q k ( +) = ∈ {},,m…k ( ) = q k ( ) = respectively,124 mN at0 the== pointsqN 0 zero and0 and one, mN i.e.,1 N==0qN 1 N 00 for k 0 and12N 1 .− N 1− 0 for k 1, 2, ... . 125∈ { }An example of a suitable demarcation function is An example of a suitable demarcation function is  1 t = 0   1 t = 0  k ()2t – 1    1  ( )D << 126 m ()t 1=  --- 1 –0tanhkD 2t------1 t 1 (16) mN(t)N= 1 2tanh − 2 0 <2t < 1 (16)  2  1 (2t 121)– ()t – 1  − − −   =  0 0 t 1 t = 1 and127 the graphand the of graph this of function this function is shown is shown in Figure in Figure2 for 2 the for casethe case of kofD k 1,∈ {} 2,12510,,, 5, 10 . . ∈D{ } () () () mN t k = 10 qN t = mN 1 – t 1.0 D

kD = 1 0.8 kD = 1

kD = 2 kD = 2 0.6 k = 5 D kD = 5 0.4

0.2

0.0 0.0 0.2 0.4 0.6 0.8 1.0 t ( ) (()) () Figure 2. GraphFigure of 2. the Graph normalized of the normalized demarcation dem functionsarcationm functionsN t and qmNNt t as and defined qN t by as (16). Such functions aredefined infinitely by (16). diff erentiableSuch functions on (0, are 1), andinfinitely have rightdifferentiable and left handon ()01 derivatives,, , and have of all orders, that are zero,right respectively, and left hand at the derivatives, points of zero of all and orders, one. that are zero, respectively, at the points of zero and one. For the denormalized case, and for the interval [α, β], the demarcation functions are defined 128 For the denormalized case, and for the interval []αβ, , the demarcation functions are defined according to according to ! ! ! t α t α β t m(t) = mN − , t – αq(t) = qN − =tm–Nα − .β – t (17) 129 mt()β = αm ------qt()β ==αq ------β αm ------(17) − Nβα– − Nβα– − Nβα– Polynomial Based Demarcation Function Math. Comput. Appl. 2019. FOR PEER REVIEW 4 Polynomial demarcation functions are of interest because, if they are associated with a Taylor series, the resulting composite function has a known antiderivative form. A normalized polynomial based demarcation function, of order n, and for the interval [0, 1], is the (2n + 1)th order polynomial

" n # ( ) = ( )n+1 + P (n+k)! k mN,n t 1 t 1 n! k! t − · k=1 · · n (18) = ( )n+1 P (n+k)! k 1 t n! k! t , t , 0. − · k=0 · ·

For notational simplicity, the latter form is used with the former form being implicit for the case of t = 0. This function satisfies the constraints

(k) mN,n(0) = 1, mN,n(1) = 0, m (t) t 0,1 = 0, k 1, ... , n , (19) N,n ∈{ } ∈ { } Math. Comput. Appl. 2019, 24, 35 6 of 40 and is antisymmetric around the point (1/2, 1/2). The associated quadrature polynomial demarcation function is Xn n+1 (n + k)! k qN n(t) = 1 mN n(t) = mN n(1 t) = t (1 t) . (20) , − , , − · n! k! · − k=0 · To derive (18), a useful approach is to solve for the coefficients of a (2n + 1)th order polynomial, subject to the constraints specified by (19), and starting with the case of n = 1, 2, .... The coefficient (n+k)! form of n! k! in (18) can be inferred from the results specified in Pascal’s triangle. · An alternative form for mN,n(t) is

n+1 n u P P ( 1) (n+ν)! u+ν mN n(t) = 1 + (n + 1) − · t , (n+1 u)! u! ν! · u=0 ν=0,u+ν,0 − · · (21) n+1 n u P P ( 1) (n+ν)! + = ( + ) − · u ν n 1 (n+1 u)! u! ν! t , t , 0, u=0 ν=0 − · · ·

+ which arises from using the binomial formula on (1 t)n 1. For notational simplicity, the latter form is − used with the former form being implicit for the case of t = 0. The graphs of the polynomial based demarcation functions are shown in Figure3. For the denormalized case, and for the interval [α, β], the demarcation functions are defined according to ! ! ! t α t α β t m (t) = m − , q (t) = q − = m − . (22) n N,n β α n N,n β α N,n β α − − − Explicit forms for the demarcation functions, based on the form specified in (18), are: " # + n + n h β t in 1 P (n+k)! h t α ik h β t in 1 P (n+k)! h t α ik mn(t) = − 1 + − = − − , β α n! k! · β α β α n! k! · β α − " k=1 · − # − k=0 · − (23) h in+1 n h ik h in+1 n h ik ( ) = t α + P (n+k)! β t = t α P (n+k)! β t q t β− α 1 n! k! β −α β− α n! k! β −α . − k=1 · · − − k=0 · · −

The second form in these equations are valid, respectively, for t , α and t , β, and for notational simplicity, are used.

() () mNn, t qNn, t 1.0

0.8 n = 6 n = 1 0.6

0.4

0.2

0.0 0.0 0.2 0.4 0.6 0.8 1.0 t

Figure 3. GraphFigure of the 3. normalized Graph polynomial of the normalized demarcation polyno functions,mial demarcation of orders onefunctions, to six, forof the [], interval [0, 1]. orders one to six, for the interval 01 .

155 3.2 Dual Taylor Series 156 For the interval []αβ, , a dual Taylor series, of order n , is the weighted of two nth order Taylor 157 series, one based at α and one at β , and is defined according to

2 ()2 n ()n ()1 ()t – α f ()α ()t – α f ()α f ()αβ,,t = mt()f()α ++()t – α f ()α ------+++… ------n 2 n! 158 (24) 2 ()2 n ()n ()1 ()t – β f ()β ()t – β f ()β qt()f()β ++()t – β f ()β ------++… ------t ∈ []αβ, 2 n! 159 where m and q are the demarcation functions defined by (17). Using the Taylor series notation as specified in (7):

()αβ,, () ()α, () ()β, 160 fn t = mtfn t + qtfn t (25) 161 By construction:

()αβα,, ()α ()αββ,, ()β fn = f fn = f 162 (26) ()k ()αβα,, ()k ()α ()k ()αββ,, ()k ()β ≤≤ fn = f fn =1f kn () () () () 163 For the case of polynomial demarcation functions, mt = mn t and qt = qn t , as specified by (23), an ()αβ,, 164 explicit expression for fn t is

()αβ,, () ()α, () ()β, fn t = mn t fn t + qn t fn t n n k ()k β – t n + 1 ()nk+ ! t – α k ()t – α f ()α = ------⋅ ------⋅ ------+ βα–  n! ⋅ k! βα–  k! 165 k = 0 k = 0 (27) n n k k ()k t – α n + 1 ()nk+ ! ()β – t ()t – β f ()β ------⋅ ------⋅ ------βα  ⋅ k  – k! n! ()βα– k! k = 0 k = 0 166 A dual Taylor series allows a function to be written as

() ()αβ,, ()αβ,, ∈ ()αβ, 167 ft = fn t + Rn t t (28) ()αβ,, 168 where the remainder function Rn t is defined according to

β t n ()n + 1 n ()n + 1 ()t – λ f ()λ ()t – λ f ()λ 169 R ()αβ,,t = mt() ------dλ – qt() ------dλ t ∈ []αβ, (29) n  n!  n! α t 170 The proof of this result is detailed in Appendix 1.

Math. Comput. Appl. 2019. FOR PEER REVIEW 6 Math. Comput. Appl. 2019, 24, 35 7 of 40

3.2. Dual Taylor Series For the interval [α, β], a dual Taylor series, of order n, is the weighted summation of two nth order Taylor series, one based at α and one at β, and is defined according to

 2 (2) n (n)  (1) (t α) f (α) (t α) f (α) fn(α, β,t) = m(t) f (α) + (t α) f (α) + − + + − + − 2 ··· n!  2 ( ) n ( )  (24) ( ) (t β) f 2 (β) (t β) f n (β) q(t) f (β) + (t β) f 1 (β) + − + + − , t [α, β] − 2 ··· n! ∈ where m and q are the demarcation functions defined by (17). Using the Taylor series notation as specified in (7): fn(α, β,t) = m(t) fn(α,t) + q(t) fn(β,t). (25) By construction:

fn(α, β, α) = f (α), fn(α, β, β) = f (β), (k) (k) (26) f (α, β, α) = f (k)(α), f (α, β, β) = f (k)(β), 1 k n. n n ≤ ≤

For the case of polynomial demarcation functions, m(t) = mn(t) and q(t) = qn(t), as specified by (23), and an explicit expression for fn(α, β, t) is

fn(α, β,t) = mn(t) fn(α,t) + qn(t) fn(β,t) + n n k (k) h β t in 1 P (n+k)! h t α ik P (t α) f (α) = − + β −α n! k! β− α k! − k=0 · · − · k=0 (27) + n n k (k) h t α in 1 P (n+k)! h β t ik P (t β) f (β) − β− α n! k! β −α k! . − k=0 · · − · k=0

A dual Taylor series allows a function to be written as

f (t) = fn(α, β, t) + Rn(α, β, t), t (α, β), (28) ∈ where the remainder function Rn(α, β, t) is defined according to

t β Z (t λ)n f (n+1)(λ) Z (t λ)n f (n+1)(λ) Rn(α, β, t) = m(t) − dλ q(t) − dλ, t [α, β]. (29) n! − n! ∈ α t

The proof of this result is detailed in AppendixA.

3.2.1. Convergence

(n) With the definition of f = sup f (n)(t) : t [α, β] , it follows that a bound on the remainder max { ∈ } function is (n+1) fmax h n+1 n+1i Rn(α, β, t) m(t) (t α) + q(t) (β t) . (30) | | ≤ (n + 1)! · · − · − It then follows, from the nature of the demarcation functions, that a sufficient condition for the convergence of a dual Taylor series for the interval [α, β] is for

(n) n f (β α) (n) lim max − = 0, f = sup f (n)(t) : t [α, β] . (31) n n! max →∞ { ∈ } 171 3.2.1 Convergence

()n {}()n () ∈ []αβ, 172 With the definition of fmax = sup f t : t , it follows that a bound on the remainder function is

()n + 1 fmax n + 1 n + 1 173 R ()αβ,,t ≤ ------⋅ []mt()⋅ ()t – α + qt()⋅ () β– t (30) n ()n + 1 ! 174 It then follows, from the nature of the demarcation functions, that a sufficient condition for the convergence of a dual 175 Taylor series for the interval []αβ, is for

()n n f ()βα– max ()n {}()n () ∈ []αβ, 176 lim ------= 0 fmax = sup f t : t (31) n → ∞ n!

Math. Comput. Appl. 2019, 24, 35 8 of 40 αβ+ 177 For ideal demarcation functions, where the Taylor series based at α only has influence on the interval α, ------, a 2 178 sufficient condition for convergence is for For ideal demarcation functions, where the Taylor series based at α only has influence on the interval α+β α () [ , 2 ], a sufficient condition for convergence is for n ()βαn fmax – 179 lim ------= 0 (32) ( ) → ∞ n f n (βn α)n 2 ⋅ n! lim max − = 0. (32) n 2n n! 180 3.2.2 Example →∞ · 3.2.2. Example 181 Consider the function Consider the function 2 182 f (t) = tanhft(()t) +=exptanh( ()tt) sin+ exp(πt()2–)t.sin() πt (33) (33) − Dual183 TaylorDual series Taylor approximations series approximations to this to function, this function, of orders of orders 4, 6,46810,,, 8, 10, for , for the the interval interval [0, []01 1], and and defined by (27), defined184 byare (27), shown are shownin Figure in 4 Figure using 4the using polynomial the polynomial demarcation demarcation functions specified functions by specified(23). by (23).

1.0 ft() 0.8 n = 8 0.6 n = 6 0.4 n = 4 n = 10 0.2

0.0 0.0 0.2 0.4 0.6 0.8 1.0 t

Figure 4. GraphFigure of 4. the 4th,Graph 6th, of 8th the and 4th 10th , 6th order , 8th dual and Taylor 10th series order approximations, dual Taylor series based on the interval [0,approximations, 1], for the function based defined on the by int (33).erval []01, , for the function defined by (33).

3.3. Integral Approximation 185With a3.3 polynomial Integral Approximation demarcation function, the integral of a dual Taylor series is well defined and leads186 to the followingWith a polynomial equality demarcation function, the integral of a dual Taylor series is well defined and leads to the fol- 187 lowing equality t Z Xn h i t n k+1 (k) k (k) I(t) = f (λ)dλ = cn,k(t α) f (α) + ( 1) f (t) + Rn(α, t), (34) − k + 1−()k k ()k () =()λλ ()α []()α () () ()α, 188 α It ==kf 0 d  cnk, t – f + –1 f t + Rn t (34) α k = 0 where 189 where n+1 u  n  n + 1 X ( 1) X (n + ν)! 1  c = −   (35) n,k k! · u! (n + 1 u)! ·  ν! · u + ν + k + 1 u=0 · − ν=0 and

n (1) P k (k) Rn (α,t) = cn,0[ f (t) f (α)] cn,k(k + 1)(t α) f (α)+ Math. Comput. Appl.− 2019.− FORk=1 PEER REVIEW− 7 n (36) P k+1 k (k) n+1 n+1 (n+1) ( 1) (t α) f (t)[(k + 1)cn,k cn,k 1] + cn,n( 1) (t α) f (t) k=1 − − − − − −

The proof is detailed in AppendixB.

4. Spline Approximation

A nth order spline approximation, fn, on the interval [α, β], to a function f , which is differentiable up to order n, is a (2n + 1)th order polynomial that equals the function, in terms of value and derivatives Math. Comput. Appl. 2019, 24, 35 9 of 40 up to order n, at the end points of the interval. A nth order spline function for the interval [α, β], thus, has the form 2 2n+1 fn(α, β, t) = c + c t + c t + + c + t , t [α, β], (37) 0 1 2 ··· 2n 1 ∈ where the coefficients c0, ... , c2n+1 are such that the function and the spline approximation, as well as their derivatives of order 1, ... , n, take on the same values at the end points of the interval, i.e.,

(k) (k) f (t) = fn (α, β, t) t α,β , k 0, 1, , n . (38) ∈{ } ∈ { ··· } The case of n = 1 corresponds to a cubic spline. The use of the following symmetrical form

2 n fn(α, β, t) = hn(t)[a00 + a01(t α) + a02(t α) + + a0n(t α) ] f (α)+ − − ··· 2 − n 1 (1) hn(t)(t α)[a10 + a11(t α) + a12(t α) + + a1,n 1(t α) − ] f (α)+ − − − ··· − −

··· n 1 (n 1) hn(t)(t α) − [an 1,0 + an 1,1(t α)] f − (α)+ − n −(n) − − hn(t)(t α) [an0] f (α)+ − 2 n (39) gn(t)[b00 + b01(t β) + b02(t β) + + b0n(t β) ] f (β)+ − − ··· 2 − n 1 (1) gn(t)(t β)[b10 + b11(t β) + b12(t β) + + b1,n 1(t β) − ] f (β)+ − − − ··· − −

··· n 1 (n 1) gn(t)(t β) − [bn 1,0 + bn 1,1(t β)] f − (β)+ − n −(n) − − gn(t)(t β) [bn ] f (β) − 0 + + (t β)n 1 (t α)n 1 where hn(t) = − + and g (t) = − + , allows the sequential solving of the unknown coefficients (β α)n 1 n (β α)n 1 and leads to the result− (see AppendixC− ):

n+1 n k n k i (β t) P (t α) (k) P− (n+i)! (t α) fn(α, β, t) = − − f (α) − + (β α)n+1 k! i! n! (β α)i − · k=0 · · i=0 · · − n+1 n k k n k i (40) (t α) P ( 1) (β t) ( ) P− (n+i)! (β t) − − − f k (β) − (β α)n+1 k! i! n! (β α)i − · k=0 · · i=0 · · − This expression can be written in the following manner which is similar in form to that of a dual Taylor series: n k P (t α) ( ) (α β ) = ( ) − k (α) [ + ( )]+ fn , , t mn t k! f 1 cn,k t · k=0 · · n k (41) P (t β) ( ) ( ) − k (β) [ + ( )] qn t k! f 1 dn,k t · k=0 · · where mn(t) and qn(t) are the denormalized polynomial demarcation functions defined by (23) and the coefficient functions are defined according to cn,0(t) = dn,0(t) = 0 and

" n i # " n i # P (n+i)! (t α) P (n+i)! (β t) − − i! n! (β α)i i! n! (β α)i − i=n k+1 · · − i=n k+1 · · c (t) = − − , d (t) = − − , k 1, , n (42) n,k n i n,k n i P (n+i)! (t α) P (n+i)! (β t) ∈ { ··· } − − i! n! (β α)i i! n! (β α)i i=0 · · − i=0 · · − The proof of these results is detailed in AppendixC. The coefficient functions are such that 1 < c (t), d (t) < 0 for k 1, ... , n and a comparison − n,k n,k ∈ { } of (41) with (27) shows that a spline approximation converges to a dual Taylor approximation when cn,k(t) and dn,k(t) converge to zero. The variation in 1 + cn,k(t) is illustrated in Figure5. n + 1 n k nk– i ()β – t ()t – α ()k ()ni+ ! ()t – α f ()αβ,,t = ------⋅ ------⋅⋅f ()α ------⋅------+ n n + 1   ⋅ i ()βα– k! i! n! ()βα– k = 0 i = 0 207 (40) n + 1 n k k nk– i ()t – α ()–1 ()β – t ()k ()ni+ ! ()β – t ------⋅ ------⋅⋅f ()β ------⋅------n + 1   ⋅ i ()βα– k! i! n! ()βα– k = 0 i = 0 208 This expression can be written in the following manner which is similar in form to that of a dual Taylor series:

n k n k ()t – α ()k ()t – β ()k 209 f ()αβ,,t = m ()t ⋅⋅------⋅ f ()α []1 + c ()t + q ()t ⋅⋅------⋅ f ()β []1 + d ()t (41) n n  k! nk, n  k! nk, k = 0 k = 0 () () 210 where mn t and qn t are the denormalized polynomial demarcation functions defined by (23) and the coefficient () () 211 functions are defined according to cn, 0 t ==dn, 0 t 0 and

n i n i ()ni+ ! ()t – α ()ni+ ! ()β – t – ------⋅ ------– ------⋅ ------ ⋅ i  ⋅ i i! n! ()βα– i! n! ()βα– () ink= –1+ () ink= –1+ ∈ {},,… 212 cnk, t = ------dnk, t = ------k 1 n (42) n i n i ()ni+ ! ()t – α ()ni+ ! ()β – t ------⋅ ------⋅ ------ ⋅ i  ⋅ i i! n! ()βα– i! n! ()βα– i = 0 i = 0 213 The proof of these results is detailed in Appendix 3. < (), ()< ∈ {},,… 214 The coefficient functions are such that –1 cnk, t dnk, t 0 for k 1 n and a comparison of (41) 215 with (27) shows that a spline approximation converges to a dual Taylor approximation when c , ()t and d , ()t Math. Comput. Appl. 2019, 24, 35 nk10 of 40 nk () 216 converge to zero. The variation in 1 + cnk, t is illustrated in Figure 5. 1 + c ()t nk, t = 14⁄ 1 100 300 1000 0.100

0.010

0.001 10

t =12⁄ 30 100 300 1000 10-4 1 5 10 50 100 500 1000 k

Figure 5. Graph of 1 + cn,k(()t), for the case of α =α0 and β = 1βand for t = 1/4 and t =⁄1/2. Results are⁄ Figure 5. Graph of 1 + cnk, t , for the case of = 0 and = 1 and for t = 14 and t = 12 . Results shown for n 10, 30, 100, 300, 1000 when t = 1/2 and n 100, 300, 1000 when t = 1/4. are shown for n ∈∈{}{10,,,, 30 100 300 1000} when t = 12⁄ ∈and{ n ∈ {}100,, 300} 1000 when t = 14⁄ . 4.1. Examples The zeroth to third order spline approximations to a function f for the interval [α, β] are: 217 4.1 Examples β t t α 218 The zeroth to third order splinef approximations(α, β, t) = − to af function(α) + −f for thef (β interval) []αβ, are: (43) 0 β α · β α · − − 2    β  2 α    (β t) 2(t α) (–)t (t α)t – 2(β t) ( ) 219 f (α, β, t) = − f (α) 1 + f −()αβ,,+ (tt =α)------f 1 (-α⋅)f()+α +− ------f (⋅βf)()β1 + − + (t β) f 1 (β) (44) (43) 1 (β α)2 β0 α βα (β αβα)2 β α − · − − · – − –· − − · 3   2    2  (β t) 3(t α) 6(t α) ( ) 3(t α) (t α) ( ) (α β ) = − (α) + − + − + ( α) 1 (α) + − + − 2 (α) + f2 , , t 2 3 f 1 β α 2 t f 1 2 β α 2 f (β α) · − (β α) ()− · − · () ()β – t − 3  2()t – α − 2  1 ()t – α  22()β – t  (45)1 ()αβ,, ------⋅ (t ()αα) 3(β t) ()6 (βαt) ⋅ ()α (------1) ⋅3(β ()tβ) (β t) (2) ()β ⋅ ()β 220 f1 t = f− 1f+(β------) 1 + − ++t – − f+ (t β) +f (β) 1 + f− +1 +−------f (-β)+ t – f (44) 2 (β α)3 βα– β α (β α)2 2 β α 2 βα– ()βα– − · − − − · ()βα– − ·   2 3   2   4(t α) 10(t α) 20(t α) (1) 4(t α) 10(t α) 4  f (α) 1 + − + − + − + (t α) f (α) 1 + − + − +  (β t)  β α 2 3 β α 2   − (β α) (β α) − · − (β α)  f3(α, β, t) = − 4  2  −  − 3 − + (β α)  (t α) (2) 4(t α) (t α) (3)  − ·  − f (α) 1 + − + − f (α)  2 · β α 6 ·   − 2 3   2   (46) 4(β t) 10 (β t) 20 (β t) (1) 4(β t) 10 (β t) 4  f (β) 1 + − + − + − + (t β) f (β) 1 + − + − +  (t α)  β α 2 3 β α 2   − (β α) (β α) − · − (β α)  Math. Comput. Appl.− 2019.4  FOR PEER2 REVIEW −  − 3 −  9 (β α) ·  (t β) (2) 4(β t) (t β) (3)  −  −2 f (β) 1 + β −α + −6 f (β)  · − ·

Spline Approximation Consider the function defined by (33). Spline series approximations to this function, of orders 4, 6, 8, 10, for the interval [0, 1] and as defined by (40), are shown in Figure6 with the 10th order approximation visually coinciding with the function. A comparison of Figure6 with Figure4 shows that a spline series provides, in general, a better approximation than a dual Taylor series of the same order and with a dual Taylor series diverging more in the center of the interval of approximation. 3 2 2 ()β – t ()α 6()t – α ()1 3()t – α ()t – α ()2 f ()αβ,,t = ------⋅ f()α 1 ++3------t – ------+++()t – α ⋅ f ()α 1 + ------⋅ f ()α 2 3 βα 2 βα ()βα– – ()βα– – 2 221 (45) 3 2 2 ()t – α 3()β – t 6()β – t ()1 3()β – t ()β – t ()2 ------⋅ f()β 1 ++------++()t – β ⋅ f ()β 1 + ------⋅ f ()β 3 βα 2 βα ()βα– – ()βα– – 2

4 2 3 2 ()β – t ()α 10()t – α 20()t – α ()1 4()t – α 10()t – α f ()αβ,,t = ------⋅ f()α 1 ++4------t – ------+------++()t – α f ()α 1 ++------3 4 βα 2 3 βα 2 ()βα– – ()βα– ()βα– – ()βα– 2 3 ()t – α ()2 4()t – α ()t – α ()3 ------⋅ f ()α 1 + ------++------⋅ f ()α 2 βα– 6 222 (46) 4 2 3 2 ()t – α 4()β – t 10()β – t 20()β – t ()1 4()β – t 10()β – t ------⋅ f()β 1 ++------+------+ ()t – β f ()β 1 ++------+ 2 βα 2 3 βα 2 ()βα– – ()βα– ()βα– – ()βα– 2 3 ()t – β ()2 4()β – t ()t – β ()3 ------⋅ f ()β 1 + ------+ ------⋅ f ()β 2 βα– 6

223 4.1.1 Spline Approximation 224 Consider the function defined by (33). Spline series approximations to this function, of orders 46810,,, , for the 225 interval []01, and as defined by (40), are shown in Figure 6 with the 10th order approximation visually coinciding 226 with the function. A comparison of Figure 6 with Figure 4 shows that a spline series provides, in general, a better 227 approximation than a dual Taylor series of the same order and with a dual Taylor series diverging more in the center Math.228 Comput.of the Appl. interval2019, 24 of, 35 approximation. 11 of 40

n = 8 n = 6 1.0 n = 10 ft() 0.8 n = 4 0.6

0.4

0.2

0.0 0.0 0.2 0.4 0.6 0.8 1.0 t

Figure 6. GraphFigure of 6. 4th, Graph 6th, 8th of and4th 10th , 6th order , 8th spline and approximations,10th order spline based approximations, on the interval [0, 1], for the functionbased defined on the interval by (33). []01, , for the function defined by (33). 4.2. Convergence 229 4.2 Convergence Consider a spline approximation, as defined by (40) or (41). A sufficient condition for convergence, 230 Consider a spline approximation, as defined by (40) or (41). A sufficient condition for convergence, i.e. i.e., lim fn(α, β, t) = f (t), is for n ()αβ,, () 231→∞ lim fn t = ft , is for n → ∞ (n) n fmax(β α) (n) n (n) o ()=n n [α β] = ( ) [α β] lim n − 0,()βαt , , fmax sup f t : t , . (47) n 2 n! fmax – ∈ ()n ()∈n 232 →∞ lim· ⋅ ------= 0 t ∈ []αβ, , f = sup{}f ()t : t ∈ []αβ, (47) → ∞ n max The proof of this result isn detailed in2 Appendix⋅ n! D. 233 The proof of this result is detailed in Appendix 4. 4.3. Spline Based Integral Approximation 234The spline4.3 Spline approximation, Based Integral as Approximation defined by (40), leads to the integral equality

235 The spline approximation,t as defined by (40), leads to the integral equality Z Xn k+1h (k) k (k) i I(α, t) = f (λ)dλ = c (t α) f (α) + ( 1) f (t) + Rn(α, t) (48) n,k − − α k=0 and the followingMath. Comput. spline Appl. based 2019. integral FOR PEER approximation REVIEW 10

t Z Xn k+1h (k) k (k) i In(α, t) = fn(α, t, λ)dλ = c (t α) f (α) + ( 1) f (t) . (49) n,k − − α k=0

In these expressions the coefficients are defined according to

n k n + 1 X− (n + i)! (k + i)! c = (50) n,k k! i! · (n + k + i + 2)! i=0

A simpler expression is n! (2n + 1 k)! c = − (51) n,k (n k)!(k + 1)!· 2 (2n + 1)! − · and this can be written, for k 1, in the form ≥ k 1 k 1 1 Y−  i  Y− 1 cn,k = 1 , k 1. (52) 2k+1(k + 1)!· − n · (1 + (1 i)/2n) ≥ i=0 i=0 − Math. Comput. Appl. 2019, 24, 35 12 of 40

The remainder is defined according to

n h i (1)(α ) = P ( + )( α)k (k)(α) + ( )k+1 n+1 (k)( ) + Rn , t cn,k k 1 t f 1 n k+1 f t −k=0 − − · − · (53) n+1 n+1 (n+1) cn,n( 1) (t α) f (t) − − The proof of these relationships is detailed in AppendixE.

4.3.1. Approximation in It is the case that 1 lim cn,k = , k 0 (54) n 2k+1 (k + 1)! ≥ →∞ · and it then follows, for the convergent case, that

t n k+1 R P (t α) ( ) k ( ) f (λ)dλ = − [ f k (α) + ( 1) f k (t)] 2k+1(k+1)! α k=0 · − 2 3 (t α) (t α) (1) (1) (t α) (2) (2) (55) = −2 [ f (α) + f (t)] + −8 [ f (α) f (t)] + −48 [ f (α) f (t)]+ 4 · · − · − (t α) (3) (3) 16− 24 [ f (α) f (t)] + · · − ··· 4.3.2. Integral Approximations of Orders Zero to Three

The integral approximation In(α, t), as specified by (49), of orders zero to three are:

t α I (α, t) = − [ f (α) + f (t)] (56) 0 2 ·

t α (t α)2 I (α, t) = − [ f (α) + f (t)] + − [ f (1)(α) f (1)(t)] (57) 1 2 · 12 · − t α (t α)2 (t α)3 I (α, t) = − [ f (α) + f (t)] + − [ f (1)(α) f (1)(t)] + − [ f (2)(α) + f (2)(t)] (58) 2 2 · 10 · − 120 · 2 3 t α 3(t α) (1) (1) (t α) (2) (2) I3(α, t) = −2 [ f (α) + f (t)] + −28 [ f (α) f (t)] + −84 [ f (α) + f (t)]+ · 4 · − · (59) (t α) ( ) ( ) − [ f 3 (α) f 3 (t)] 1680 · − 4.3.3. Remainder for Orders Zero to Three The remainder functions associated with a spline based integral approximation, as specified according to (53), and for orders zero to three, are defined according to

(1) 1 t α R (α, t) = [ f (t) f (α)] − f (1)(t) (60) 0 2 · − − 2 ·

2 ( ) 1 (t α) (t α) R 1 (α, t) = [ f (t) f (α)] − [2 f (1)(t) + f (1)(α)] + − f (2)(t) (61) 1 2 · − − 6 · 12 · 2 3 (1) (t α) ( ) ( ) (t α) ( ) ( ) (t α) ( ) R (α, t) = 1 [ f (t) f (α)] − [3 f 1 (t) + 2 f 1 (α)] + − [3 f 2 (t) f 2 (α)] − f 3 (t) (62) 2 2 · − − 10 · 40 · − − 120 · 2 (1) (t α) ( ) ( ) (t α) ( ) ( ) (α ) = 1 [ ( ) (α)] − [ 1 ( ) + 1 (α)] + − [ 2 ( ) 2 (α)] R3 , t 2 f t f 14 4 f t 3 f 28 2 f t f · 3 − − · 4 · − − (63) (t α) ( ) ( ) (t α) ( ) − [4 f 3 (t) + f 3 (α)] + − f 4 (t) 420 · 1680 · Math. Comput. Appl. 2019, 24, 35 13 of 40

4.4. Explanation of Integral Approximation: Successive Area Approximation The integral approximation specified by (49), and the coefficients specified by (51), is best R t (λ) λ understood by considering successive approximations to the integral α f d . First, consider a zeroth order approximation as defined by

Zt t α f (λ)dλ = − [ f (α) + f (t)] + R (α, t) = I (α, t) + R (α, t) (64) 2 · 0 0 0 α

and the area illustrated in Figure7. The area is consistent with an a ffine approximation between the function values at the end points of the interval and equals the zeroth order integral approximation as defined by I0(α, t). The difference between the function and an affine approximation between the values of f (α) and f (t) defines a residual function r1: " # # (λ α)[ f (t) f (α)] r (λ) = f (λ) f (α) + − − , λ [α, t . (65) 1 − t α ∈ −

f()λ ft() ()λα– []ft()– f()α f()α + ------t – α f()α + ft() f()α ()λ area = ()t – α ⋅ ------r1 2 λ α t Figure 7. IllustrationFigure 7. of Illustration the area defined of the by area a zeroth defined order by approximation a zeroth order toapproximatio an integral andn to the an residualintegral and the residual function r . function r1. 1

()1 f()λ Second,rate of consider change of the f first()α order approximation to the integral()α as() defined byα ()α 2 () ft() t – ⋅ 1 ()α ⋅ t – t – ⋅ 1 ()α area ==------()λα- f[]() ()------α ------f t ()λ ()α 4 – ft – f 2 8 Z r f 2 + ------2 1 ( α) ()t – α t –()1α t – α –()t – α ()1 t α t ------(1) - ⋅ (1)()⋅ ------⋅ () f (λ)dλ = − [ f (α) + f (t)] + area− ==[ f (α) –ff (tt)] + R1(α, t) f (66)t 2 · 12 · 4 − f()α + ft2() 8 f()α α ()λ area = ()t – α ⋅ ------()1 r1 rate of change of f 2 ()t λ and the area illustrated in Figure8. The second term inλ this equation approximates the area under α t an approximation toα the residual function r1,t based on linear change at both of the end points of ()λ the intervalFigure[α, t ]7., and Illustration with a di offf erencethe arear in2defined the denominator by a zeroth order terms approximatio of 12 versusn to 8. an For integral higher order approximationsand the the residual denominator function termr1 . of 12 approaches 8. Figure 8. Illustration of the residual function r1 , the areas as defined by linear change at the α ()1 points and t and()α the second residual function r2 . 2 rate of change of f ()t – α ()1 t – α ()t – α ()1 area ==------⋅ f ()α ⋅ ------⋅ f ()α 4 2 8 r ()λ 2 1 ()t – α ()1 t – α –()t – α ()1 t area ==------2⋅ –f ()t ⋅ ------⋅ f ()t t – α ()t – α ()1 ()1 f()λλ d = ------⋅ []f()α + ft() + ------4 ⋅ []f ()α – f2 ()t + 8  ()1 2 rate 10of change of f ()t 282 α (67) λ ()α 3 () () α t – ⋅ []2 ()tα 2 () ()α, ------f + f t + R2 t 120()λ r2 283 and the area illustrated in Figure 9. The third term in this expression approximates the area under a quadratic approx- Figure 8. Illustration of the residual function ()r21, the areas as()2 defined by linear change at the points α 284 Figureimation 8. to theIllustration residual functionof the residual r , based function on f r()1α , the and areas f ()ast ,defined and with b ya lineardifferent change denominator at the term of 120 ver- and t and the second residual function2 r . α 2 285 pointssus 48 . andFor highert and the order second approxima residualtions function the term r2 .of 120 approaches 48 . ()λ r2 t α ()α 2 ()λ () ()λλ α t – ⋅ []()α () t – ⋅ []1 ()α 1 () 3 f d = ------f + ft + ------t f – f ()t t– α+ ()2  2 10 area = ------⋅ f ()t 282 α 48 (67) 3 3 ()t – α ()2 ()t – α ()2 ()2 ------⋅ ()α 2 ------⋅ []f ()α + f ()t + R ()α,areat = f ()λα– ()2 2 2 48 ------⋅ f 120()α ()λ – t ()2 2 ------⋅ f ()t 283 and the area illustrated in Figure 9. The third term in this2 expression approximates the area under a quadratic approx- Figure 9. Illustration of the()2 areas defined()2 by a quadratic approximation to the residual 284 imation to the residual function r , based on f ()α and f ()t , and with a different denominator term of 120 ver- 2 ()2 ()2 function r and based on f ()α and f ()t . 285 sus 48 . For higher order approxima2 tions the term of 120 approaches 48 . 286 For the convergentr ()λ case, the approximation to the integral, as specified by defined by (49), converges to the form 287 specified by (55)2 as n → ∞ and this form is consistent with the successive area approximations illustrated in 288 Figure 7, Figure 8 and Figure 9. λ α 3 t ()t – α ()2 area = ------⋅ f ()t 289 4.5 Determining Region of Integration for a Set Error Bound 48 ()α 3 () t – ⋅ 2 ()α 290 For a positive function,2 a bound on the region of integration,area for= ------a set errorf level, can be determined by consider- ()λα– ()2 2 48 291 ing the area defined------by ⋅thef first()α passage time()λ –oft the function()2 to a specified level. Consider a positive function, which 2 ------⋅ f ()t 292 has a first passage time to the level rB at tt=2 B , as illustrated in Figure 10. The following integral bound holds Figure 9. Illustration of the areas defined by a quadratic approximation to the residual ()2 ()α ()2 () function r2 and based on f and f t . 286 For the convergent case, the approximation to the integral, as specified by defined by (49), converges to the form Math. Comput. Appl. 2019. FOR PEER REVIEW 13 287 specified by (55) as n → ∞ and this form is consistent with the successive area approximations illustrated in 288 Figure 7, Figure 8 and Figure 9.

289 4.5 Determining Region of Integration for a Set Error Bound 290 For a positive function, a bound on the region of integration, for a set error level, can be determined by consider- 291 ing the area defined by the first passage time of the function to a specified level. Consider a positive function, which 292 has a first passage time to the level rB at tt= B , as illustrated in Figure 10. The following integral bound holds

Math. Comput. Appl. 2019. FOR PEER REVIEW 13 f()λ ft() ()λα– []ft()– f()α f()α + ------t – α f()α + ft() f()α ()λ area = ()t – α ⋅ ------r1 2 λ α t Figure 7. Illustration of the area defined by a zeroth order approximation to an integral and the residual function r1 .

() 1 ()α 2 rate of change of f ()t – α ()1 t – α ()t – α ()1 area ==------⋅ f ()α ⋅ ------⋅ f ()α 4 2 8 r ()λ 2 1 ()t – α ()1 t – α –()t – α ()1 area ==------⋅ –f ()t ⋅ ------⋅ f ()t 4 2 8 ()1 rate of change of f ()t λ α t ()λ r2

Figure 8. Illustration of the residual function r1 , the areas as defined by linear change at the Math. Comput.α Appl. 2019, 24, 35 14 of 40 points and t and the second residual function r2 .

Third, consider the second order approximation to the integral as defined by t α ()α 2 () () ()λλ t – ⋅ []()α () t – ⋅ []1 ()α 1 () t f d = ------f + ft + ------2 f – f t + R  t2α (t10α) ( ) ( ) (λ) λ = [ (α) + ( )] + − [ 1 (α) 1 ( )]+ 282 αf d −2 f f t 10 f f t (67) α · · − (67) 33 ()t(t– α) (()22) ()2(2) ------− ⋅[[]ff (()αα) ++ ff ()(tt)]+ +RR()2α(α, t, t) 120120 · 2 283 andand the the areaarea illustratedillustrated in in Figu Figurere 9.9 The. The third third term term in this in thisexpression expression approximates approximates the area the under area a quadratic under a approx- (2) (2) quadratic approximation to the residual function()2 r , based()2 on f (α) and f (t), and with a different 284 imation to the residual function r , based on f ()α 2 and f ()t , and with a different denominator term of 120 ver- denominator term of 120 versus2 48. For higher order approximations the term of 120 approaches 48. 285 sus 48 . For higher order approximations the term of 120 approaches 48 . ()λ r2 λ α 3 t ()t – α ()2 area = ------⋅ f ()t 48 ()α 3 () t – ⋅ 2 ()α 2 area = ------f ()λα– ()2 2 48 ------⋅ ()α ()λ – t ()2 f ------⋅ f ()t 2 2 Figure 9. Illustration of the areas defined by a quadratic approximation to the residual Figure 9. Illustration of the areas defined by a quadratic approximation to the residual function r2 and ()2 ()2 (2) (2) ()α () based onfunctionf (α) andr2 andf based(t). on f and f t . 286 For the convergent case, the approximation to the integral, as specified by defined by (49), converges to the form For the convergent case, the approximation to the integral, as specified by defined by (49), 287 specified by (55) as n → ∞ and this form is consistent with the successive area approximations illustrated in converges to the form specified by (55) as n and this form is consistent with the successive area 288 Figure 7, Figure 8 and Figure 9. → ∞ approximations illustrated in Figures7–9. 289 4.5 Determining Region of Integration for a Set Error Bound 4.5. Determining Region of Integration for a Set Error Bound 290 For a positive function, a bound on the region of integration, for a set error level, can be determined by consider- 291 ing Forthe area a positive defined function, by the first a bound passage on time the regionof the function of integration, to a specified for a set level. error Consid level,er can a positive be determined function, which by considering the area defined by the first passage time of the function to a specified level. Consider a 292 has a first passage time to the level rB at tt= B , as illustrated in Figure 10. The following integral bound holds positive function, which has a first passage time to the level rB at t = tB, as illustrated in Figure 10. The following integral bound holds

tB Math. Comput. Appl. 2019. FOR PEER REVIEWZ 13 f (λ)dλ rBtB = εB, (68) ≤ 0

where  tB = inf t : f (t) = rB | (69)  tB | = inf t : t f (t) = tBrB = εB ()λλ | ≤ε 293  f d rBtB = B (68) Thus, for a bound ε on the integral of a positive function f , a bound on the interval of integration is B 0 294 where  tB = inf t : t f (t) = εB , (70) | {}() tB = inf t: ft = rB 295 ( ) ε (69) i.e., the first passage time of t f t to B. {}() ε = inf t: tf t ==tBrB B

ft() t rB B ε ()λλ area ==B bound on  f d 0

t tB Figure 10. The area bound defined by the first passage time of a positive function to a set Figure 10.level.The area bound defined by the first passage time of a positive function to a set level. ε 296 Thus, for a bound, B on the integral of a positive function f , a bound on the interval of integration is

{}() ε 297 tB = inf t: tf t = B (70) () ε 298 i.e. the first passage time of tf t to B . 299 Consider the integral and its spline based approximation as specified by

t t ()α, ()λλ ()α, ()α, ()α, ()1 ()λαλ, 300 I t == f d In t + Rn t Rn t =  Rn d (71) α α

()1 ()α, ()1 ()α, 301 where Rn t is specified by (53). As Rn t is known, it follows that a bound on the region of integration can 302 be specified according to

()1 () ε 303 tB = inft: tRn t = B (72)  304 and solved by standard root solving algorithms.

305 4.5.1 Example

tB sin()t 306 Consider determining the region of integration, t , for the integral ------dt and for an error bound of B  1 + t 0 –3 sin()t 307 ε = 10 using the integral approximation specified by (49). The graph of ft()= ------is shown in Figure 11 B 1 + t 308 and results are tabulated in Table 1. The specified region of integration, as expected, is conservative.

Table 1. Interval of integration for a spline based approximation and for a specified error ε –3 bound of B = 10 .

Magnitude of error Order of integral in integral approx. [], approx: n tB over 0 tB

10.47–4 2.4⋅ 10 20.83–4 1.9⋅ 10

Math. Comput. Appl. 2019. FOR PEER REVIEW 14 Math. Comput. Appl. 2019, 24, 35 15 of 40

Consider the integral and its spline based approximation as specified by

Zt Zt (1) I(α, t) = f (λ)dλ = In(α, t) + Rn(α, t), Rn(α, t) = Rn (α, λ)dλ, (71) α α

(1) (1) where Rn (α, t) is specified by (53). As Rn (α, t) is known, it follows that a bound on the region of integration can be specified according to

(1) tB = inf t : t R (t) = εB (72) { | n | } and solved by standard root solving algorithms.

Example R t ( ) t B sin t dt Consider determining the region of integration, B, for the integral 0 1+t and for an error 3 sin(t) bound of εB = 10− using the integral approximation specified by (49). The graph of f (t) = 1+t is shown in Figure 11 and results are tabulated in Table1. The specified region of integration, as expected, is conservative.

Table 1. Interval of integration for a spline based approximation and for a specified error bound of 3 εB = 10− .

Order of Integral Approx. n tB Magnitude of Error in Integral Approx. over [0, tB] 1 0.47 2.4 10 4 × − 2 0.83 1.9 10 4 × − 3 1.17 1.5 10 4 × − 4 1.47 1.3 10 4 × − 6 1.96 1.0 10 4 × − 8 2.33 8.2 10 5 × − 10 2.62 6.9 10 5 × − 12 2.85 6.0 10 5 × − () ft()= ------sin t- 1 + t 0.4

0.3

0.2

0.1

0.0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 t

(t) Figure 11. sinf (t())t = sin π Figure 11. Graph ofGraph ft()= of------over1+t theover interval the interval []0, π [0, . ]. 1 + t 5. Summary and Comparison of Integral Approximations Table 1. Interval of integration for a spline based approximation and for a specified error The function and integral approximations detailed–3 above are summarized in Table2. The remainder bound of ε = 10 . terms associated with the integral approximationsB are summarized in Table3.

Magnitude of error Order of integral in integral approx. [], approx: n tB over 0 tB

31.17–4 1.5⋅ 10 41.47–4 1.3⋅ 10 61.96–4 1.0⋅ 10 82.33–5 8.2⋅ 10 10 2.62 –5 6.9⋅ 10 12 2.85 –5 6.0⋅ 10

309 5. Summary and Comparison of Integral Approximations 310 The function and integral approximations detailed above are summarized in Table 2. The remainder terms associ- 311 ated with the integral approximations are summarized in Table 3.

Table 2. Summary of function and integral approximations.

t Integral Approximation:  f()λλ d Function Approximation for t ∈ []αβ, α

Antide- n – 1 k + 1 ()k k + 1 ()k rivative c []α f ()α – t f ()t series  k k = 0 k + 1 ()–1 c = ------k ()k + 1 ! Taylor n n – 1 k ()k series ()t – α f ()α k + 1 ()k ------c ()t – α f ()α  k!  k k = 0 k = 0 c = ------1 k ()k + 1 !

Math. Comput. Appl. 2019. FOR PEER REVIEW 15 Math. Comput. Appl. 2019, 24, 35 16 of 40

Table 2. Summary of function and integral approximations.

R t Function Approximation for t [α,β] Integral Approximation: f(λ)dλ ∈ α n 1 P− h k+1 (k) k+1 (k) i Antiderivative ck α f (α) t f (t) k=0 − + Series ( 1)k 1 = − ck (k+1)! n 1 n k ( ) P− k+1 (k) P (t α) f k (α) ck(t α) f (α) − Taylor Series k! k=0 − k=0 = 1 ck (k+1)! n P k+1 (k) k (k) " # cn k(t α) [ f (α) + ( 1) f (t)] + n n k (k) , h β t in 1 P (n+k)! h t α ik P (t α) f (α) k=0 − − − − + β α n! k! β− α k! n+1 u = · · = n+1 P ( 1) Dual Taylor Series − k 0 · − k" 0 # c = − n n k (k) n,k k! u!(n+1 u)! h t α in+1 P (n+k)! h β t ik P (t β) f (β) · u= · − 0 − β− α n! k! β −α k! " n # − k=0 · · − · k=0 P (n+ν)! 1 ν! u+ν+k+1 ν=0 · n k "n k i # h β t in+1 P (t α) P (n+i)! (t α) n − k(α) − − + P k+1 (k) k (k) β −α k! f i! n! i c (t α) [ f (α) + ( 1) f (t)] · = · · = · (β α) n,k Spline Series − k 0 i 0" · − # k=0 − − + n k k n k i h t α in 1 P ( 1) (β t) k P− (n+i)! (β t) n! (2n+1 k)! − − f (β) − cn,k = − β− α k! i! n! (β α)i (n k)!(k+1)! · 2(2n+1)! − · k=0 · · i=0 · · − −

Table 3. Summary of remainder terms.

R t Remainder in Integral Approximation: f( )d α λ λ n Rt α ( 1) λn (n) λ λ Antiderivative Series Rn( , t) = −n! f ( )d α t R ( λ)n (n)(λ) α t f λ Taylor Series Rn( , t) = − n! d α n (1) P k (k) Rn (α, t) = cn,0[ f (t) f (α)] cn,k(k + 1)(t α) f (α)+ − − k=1 − n Dual Taylor Series P k+1 k (k) ( 1) (t α) f (t)[(k + 1)cn,k cn,k 1]+ k=1 − − − − n+1 n+1 (n+1) cn,n( 1) (t α) f (t) n − − h i (1)(α ) = P ( + )( α)k (k)(α) + ( )k+1 n+1 (k)( ) + Rn , t cn,k k 1 t f 1 n k+1 f t Spline Series −k=0 − − · − · n+1 n+1 (n+1) cn,n( 1) (t α) f (t) − −

Comparison of Integral Approximations To compare the four different approximations to an integral that have been considered, and summarized in Table2, it is useful to utilize a set of test functions. Consider a set of test functions based on a summation of Gaussian pulses

  2 Xm ( )2 t  t ti  2 FWHMi f (t) = ai exp− − , σ = , (73)  σ2  i 8 ln(2) i=1 2 i where m is an outcome of a Poisson with parameter λ = 4 (the zero case excluded), a , i 1, ... , m , are independent outcomes of random variables with a with i ∈ { } zero mean and unit , t , i 1, ... , m , are independent outcomes of random variables with a i ∈ { } uniform distribution on the interval [0, 1] and t2 , i 1, ... , m , are independent outcomes of FWHMi ∈ { } random variables with a uniform distribution on [0, 2]. Examples of signals are shown in Figure 12. R 1 f (λ)dλ For 1000 independently generated signals, the proportion of approximations to 0 , with a relative error of less than 0.01, is detailed in Table4 for the four integral approximations. The results show the clear superiority of the spline based integral approximation and simulation results for other types of signals indicate that this holds more generally. 2 m () t – tt– i 2 FWHM 316 ft()= a exp ------σ = ------i (73)  i 2 i () 2σ 82ln i = 1 i λ 317 where m is an outcome of a Poisson random variable with parameter = 4 (the zero case excluded), ai , 318 i ∈ {}1,,… m , are independent outcomes of random variables with a normal distribution with zero mean and unit ∈ {},,… 319 variance, ti , i 1 m , are independent outcomes of random variables with a uniform distribution on the inter- 2 320 val []01, and t , i ∈ {}1,,… m , are independent outcomes of random variables with a uniform distribution FWHMi 321 on []02, . Examples of signals are shown in Figure 12. For 1000 independently generated signals, the proportion of 1 322 approximations to f()λλ d , with a relative error of less than 0.01 , is detailed in Table 4 for the four integral approx- 0 323 imations. The results show the clear superiority of the spline based integral approximation and simulation results for Math.324 Comput.other Appl. types2019 of, 24 signals, 35 indicate that this holds more generally. 17 of 40

Table 4. ProportionTable of integral4. Proportion approximations, of integral based approximations, on a set of 1000 based test on functions, a set of with1000 a test relative functions, with a relative error less than 0.01. error less than 0.01.

4th Order 4th order6th Order 6th order8th Order 8th order10th Order10th order Integral Approximation Integral approximationApprox. approx.Approx. approx.Approx. approx. Approx.approx. AntiderivativeAntiderivative Series series< 0.01 <0.01 0.01 0.01 0.03 0.03 0.09 0.09 Taylor SeriesTaylor series< 0.01 <0.01 0.01 0.01 0.02 0.02 0.08 0.08 Dual Taylor SeriesDual Taylor series 0.13 0.13 0.34 0.34 0.40 0.40 0.48 0.48 Spline SeriesSpline series 0.56 0.56 0.71 0.71 0.78 0.78 0.84 0.84

2

1

0

-1

-2

-3

-4

0.0 0.2 0.4 0.6 0.8 1.0 t

Figure 12.Figure Examples 12. Examples of test functions of test functions as defined as definedby (73). by (73).

6. Spline Based Integral Approximation: Applications 325The6. integral Spline based Based approximation, Integral Approximation: based on Applications a nth order spline function approximation and as specified326 byThe (49), integral facilitates, based for approximation, example, the based definition on a ofnth new order series spline for func standardtion approximation function, new and series as specified by (49), for327 functionsfacilitates, defined for by exampl integrals,e, the anddefinition new definite of new integralseries for results. standard In function, general, new the seriesseries for functions defined by inte- have328 bettergrals, convergence and new definite than Taylorintegral seriesresults. based In general, approximations. the series for functions have better convergence than Taylor series 329As thebased relative approximations. error in the evaluation of an integral, based on a spline function approximation, 330 As the relative error in the evaluation of a integral, based on a spline function approximation, increases non-- increases non-linearly with the region of integration, there is potential for high precision results if the 331 arly with the region of integration, there is potential for high precision results if the value of a function defined by an value332 of aintegral function can defined be established by an integral by utilizing can be aestablished smaller region by utilizing of integration. a smaller Several region cases of integration. where this is possible are Several333 casesdetailed. where this is possible are detailed.

6.1.334 Exponential6.1 Exponential Function Function Approximation Approximation 335The splineThe basedspline based integral integral series, series, of order of ordern, leadsn ,leads to to the the following following series series approximationapproximation for for the the exponential func- exponential336 tion function

2 3 4 n+1 1 + cn,0t + cn,1t + cn,2t + cn,3t + + cn,nt exp(t) ··· , (74) 2 3 4 n+1 n+1 ≈ 1 cn t + c t cn t + cn t + cn,n( 1) t − ,0 n,1 − ,2 ,3 − · · · − where c Math.is specified Comput. Appl. by (51). 2019. For FOR the PEER case REVIEW of n 17 n,k → ∞ t t2 t3 t4 1 + + 2 + 3 + + ( ) 2 2 2! 2 3! 24 4! ··· exp t ·2 3· 4· (75) ≈ 1 t + t t + t 2 22 2! 23 3! 24 4! − · − · · − · · · The series converges for all t R. The proof of this result is detailed in AppendixF. ∈ 2 3 4 … n + 1 1 ++cn, 0tcn, 1t +cn, 2t +cn, 3t ++cnn, t 337 exp()t ≈ ------(74) 2 3 4 … ()n + 1 n + 1 1 – cn, 0t +++cn, 1t – cn, 2t cn, 3t – cnn, –1 t → ∞ 338 where cnk, is specified by (51). For the case of n

2 3 4 t t 1 +++++------t ------t - … 2 3 4 2 2 ⋅ 2! 2 ⋅ 3! 2 ⋅ 4! 339 exp()t = ------(75) 2 3 4 t t t t 1 – --- ++------– ------– … 2 3 4 2 2 ⋅ 2! 2 ⋅ 3! 2 ⋅ 4!

340 TheMath. series Comput. converges Appl. 2019for all, 24 ,t 35∈ R . The proof of this result is detailed in Appendix 6. 18 of 40

341 6.1.1 Notes 6.1.1. Notes 342 The series defined by (74) is the same as that arising from a ()n + 1 th order Padé approximation, e.g. [17], which 343 can be seenThe by series comparing defined the by approximations (74) is the same for asexplicit that arisingorders. A from fourth a ( norder+ 1)th approximation order Padé (fifthapproximation, order 5/5 Padé 344 approximation)e.g., [17], which is can be seen by comparing the approximations for explicit orders. A fourth order approximation (fifth order 5/5 Padé approximation) is 2 3 4 5 t t t t t 1 + --- ++------2- +------3 - +4------5 t 2+ 9t + 72t + 1008t + t30240+ t 345 e ≈ t------1 2 9 72 1008------30240- (76) e 2 3 4 5 (76) t tt tt2 t3t t4 t t5 1≈– --1- ++---- +– ------+- – ------2 − 92 849 − 100872 100830240− 30240 346 A directA direct application application of the of series the seriesapproximation approximation as specified as specified by (74) is by the (74) following is the followingnth order seriesnth order approximation series 347 for approximationthe Gaussian function: for the Gaussian function:

n+1 2 2 4 4 6 6 n + 1 2n +22n+2 2 1 cn,0t + cn,2t cn,3t…+ ... +()cn,n( 1) t exp2( t 1)– c ,−t + c , t – c ,− t ++c , –1 − t . (77) ()≈ n 0 n 2 2 n 3 4 6 nn 2n+2 348 exp –t − ------≈ 1 + cn,0t + cn,2t------+ cn,3t + ... + cn,nt ----- (77) 2 4 6 … 2n + 2 1 +++cn, 0t cn, 2t cn, 3t ++cnn, t 6.1.2. Nature of Convergence 349 6.1.2 Nature of Convergence A nth order Taylor series approximation for exp(t), based on the origin, leads to the well 350 knownA nth order approximation Taylor series approximation for exp()t , based on the origin, leads to the well known approximation n X tk exp(t) =n . (78) k k! t= 351 exp()t ≈ k---- 0 (78)  k! The relative error in the evaluation of exp( t), based on this Taylor series, and the spline based − k = 0 series expansion defined by (74), is shown in Figure 13. The superiority of the spline based series is 352 The relative error in the evaluation of exp()–t , based on this Taylor series, and the spline based series expansion clearly evident. 353 defined by (74), is shown in Figure 13. The superiority of the spline based series is clearly evident.

Taylor: 8th,10th, 12th,14th, 16th order 4th order 5th order 1 6th order 0.100 7th order

0.010 8th order 0.001

10-4

10-5

10-6 0 2 4 6 8 10 t

FigureFigure 13. 13. GraphGraph of ofthe the relative relative error error inin approximations approximations to to exp exp(()–tt): : fourthfourth toto eighth eighth order order spline spline based based − approximationsapproximations along alongwith eighth with eighth to sixteen to sixteen order orderTaylor Taylor series series approximations. approximations.

6.1.3. High Precision Evaluation To establish a series with a high rate of convergence consider

Math. Comput. Appl. 2019. FOR PEERm REVIEW 18 et = (et/m)  2 3 4 n+1 m 1+cn,0(t/m)+cn,1(t/m) +cn,2(t/m) +cn,3(t/m) +...+cn,n(t/m) (79) 2 3 4 n+1 n+1 1 c (t/m)+c (t/m) c (t/m) +c (t/m) ...+cn,n( 1) (t/m) ≈ − n,0 n,1 − n,2 n,3 − − High precision results can be obtained as m is increased. Results that are indicative of the improvement, with increasing levels of fractional power, are detailed in Table5 where the case of approximating e is considered. Math. Comput. Appl. 2019, 24, 35 19 of 40

Table 5. Relative error in evaluation of e.

Order of Approx. n Fractional Power m Magnitude of Relative Error 2 1 1.0 10 5 × − 10 9.9 10 12 × − 100 9.9 10 18 × − 1000 9.9 10 24 × − 4 1 1.0 10 10 × − 10 9.9 10 21 × − 100 9.9 10 31 × − 1000 9.9 10 41 × − 8 1 1.7 10 22 × − 10 1.7 10 40 × − 100 1.7 10 58 × − 1000 1.7 10 76 × − 16 1 4.2 10 50 × − 10 4.1 10 84 × − 100 4.1 10 118 × − 1000 4.1 10 152 × −

6.2. Approximation A similar approach to that used for the exponential function leads to the following nth order series for the natural logarithm function:    Xn k 2(t 1)  k+1 k ( 1)  ln(t) − 1 + cn,k( 1) (k 1)!(t 1) 1 + − , (80) ≈ t + 1 ·  − − −  tk  k=1

where cn,k is specified by (51). The proof of this result is detailed in AppendixG. A Taylor series, based on the point t = 1, for the natural logarithm is

n + X ( 1)k 1(t 1)k ln(t) = − − . (81) k k=1

The relative error in this series, and the spline based series defined by (80), is detailed in Figure 14. 366 The relative errorSimulation in this series, results and indicate the spline a region based series of convergence defined by close(80), is to detailed 0.15 < t in< Figure6 for the 14. spline Simulation based results series-proof 367 indicate a regionof a of definitive convergence bound close is to an 0.15 unsolved<

0.100 2th order 2th order 0.010 8th order spline series 0.001 8th order

10-4

10-5

10-6 0.2 0.5 1 2 5 t

Figure 14. GraphFigure of the 14. Graphrelative of error therelative in approximations error in approximations to ln()t : second to ln( tto): secondeighth toorder eighth Taylor order series Taylor and series spline based seriesand approximation. spline based series approximation.

369 6.2.1 Example 370 A fourth order approximation is

2 2 2 3 3 4 4 2()t – 1 ()t – 1 ()t + 1 ()t – 1 ()t – 1 ()t – 1 ()t + 1 ()t – 1 371 ln()t ≈ ------1 ++------– ------– ------(82) t + 1 2 3 4 9t 72t 504t 5040t

372 6.2.2 High Precision Evaluation of Natural Logarithm 373 As the integral of ln()t is

t 374  ln()λ dλ = ttln()–1t + (83) 1 375 it follows that

1 ⁄ m 1 ⁄ m t 1 ⁄ m t t 1 ⁄ m m 1 ⁄ m m 376 ln()λ dλ = ------ln()t –1t +  ln()t = ------[]t – 1 + ------ln()λ dλ (84)  1 ⁄ m 1 ⁄ m  m t t 1 1 377 Using the spline series approximation specified in (80), it follows that a nth order series approximation for ln()t , 378 with higher precision and a greater range of convergence, is

n 1 ⁄ m k 2mt 1 2m k + 1 1 ⁄ m k + 1 ()–1 379 ln()t ≈ ------⋅ 1 – ------+ ------⋅ c ()–1 ()k – 1 !()t – 1 1 + ------(85) 1 ⁄ m ⁄ 1 ⁄ m  nk, ⁄ 1 + t 1 m 1 + t km t k = 1 t

380 where cnk, is specified by (51). Results that are indicative of the improvement in precision, with increasing levels of 381 fractional power, are detailed in Table 6.

Table 6. Relative error in evaluation of ln()t for the case of t = 100 . For the case of m = 1 the relative error is high for all orders of approximation.

Order of Fractional Magnitude of approx. n power m relative error

210 –5 1.1× 10

Math. Comput. Appl. 2019. FOR PEER REVIEW 20 Math. Comput. Appl. 2019, 24, 35 20 of 40

6.2.1. Example A fourth order approximation is

 2 2 2 3 3 4 4  2(t 1)  (t 1) (t + 1)(t 1) (t 1)(t 1) (t + 1)(t 1)  ln(t) − 1 + − − + − − − . (82) ≈ t + 1  9t − 72t2 504t3 − 5040t4 

6.2.2. High Precision Evaluation of Natural Logarithm As the integral of ln(t) is Zt ln(λ)dλ = t ln(t) t + 1, (83) − 1 it follows that

1/m 1/m Zt Zt t1/m m h i m ln(λ)dλ = ln(t) t1/m + 1 ln(t) = t1/m 1 + ln(λ)dλ. (84) m − ⇒ t1/m − t1/m 1 1

Using the spline series approximation specified in (80), it follows that a nth order series approximation for ln(t), with higher precision and a greater range of convergence, is   1/m   Xn ( )k 2mt 1 2m k+1 1/m k+1 1  ln(t) 1 + cn,k( 1) (k 1)!(t 1) 1 + −  (85) ≈ 1 + t1/m · − t1/m 1 + t1/m · − − −  tk/m  k=1 where cn,k is specified by (51). Results that are indicative of the improvement in precision, with increasing levels of fractional power, are detailed in Table6.

Table 6. Relative error in evaluation of ln(t) for the case of t = 100. For the case of m = 1 the relative error is high for all orders of approximation.

Order of Approx. n Fractional Power m Magnitude of Relative Error 2 10 1.1 10 5 × − 100 1.1 10 11 × − 1000 1.1 10 17 × − 4 10 1.6 10 8 × − 100 1.5 10 18 × − 1000 1.5 10 28 × − 8 10 5.7 10 14 × − 100 5.2 10 32 × − 1000 5.2 10 50 × − 16 10 1.6 10 24 × − 100 1.3 10 58 × − 1000 1.3 10 92 × −

6.2.3. High Precision Evaluation of ln(2) As a second example, consider the evaluation of ln(2) which can be defined according to

Z1 1 ln(2) = dt = 0.6931471805 . (86) 1 + t ··· 0 Math. Comput. Appl. 2019, 24, 35 21 of 40

One associated series, e.g., [18], p. 15, is

n X 1 ln(2) = lim , (87) n n + k →∞ k=1 whilst Taylor series for ln(x), based on the points at 1 and 2, yield

k 1 X∞ ( 1) − X∞ 1 ln(2) = − , ln(2) = , (88) k k 2k k=1 k=1 · i.e., 1 1 1 1 1 1 ln(2) = 1 + + , ln(2) = + + + . (89) − 2 3 − 4 ··· 2 2 4 3 8 ··· · · The second series arises by finding an approximation for ln(1) based on the Taylor series at the point 2. The relative errors in the Taylor series for orders 2, 4, 8, 16, respectively, are: 0.28, 0.16, 0.085 and 0.044 for the first series and 0.098, 0.016, 5.7 10 4 and 1.2 10 6 for the second series. The relative × − × − errors in the series defined by (87), for orders 2, 4, 8, 16, are: 0.16, 0.085, 0.044 and 0.022. A second order series specified by (85) is   1/m 1/m 2 1/m 2 2/m 2 1  (2 1) (2 1) (2 + 1)  ln(2) 2m − 1 + − −  (90) ≈ · 21/m + 1 10 21/m − 120 22/m  · · and yields an approximation with relative errors, respectively, of 1.3 10 4, 1.3 10 10, 1.3 10 16 × − × − × − and 1.3 10 22 for the cases of m = 1, 10, 100, 1000. × − 6.3. Evaluation of Numbers to Fractional Powers Consider determining x1/h for the case of h 1, 2, ... . With an initial approximation to x1/h of o ∈ { } o z0, the following integral is the basis for an iterative algorithm:

Zx0 1 1/h x0 1/h 1/h I0 = dt = t = x z0 x = z0 + I0. (91) 1 1/h zh o o ht − | 0 − ⇒ h z0

1/h An approximation to I0 yields an approximation for xo which is denoted z1 where

x1/h z = z + approximation to I . (92) o ≈ 1 0 0 h h Replacing z0 by z1 in (91) is the first step in an iterative algorithm to establish an accurate approximation 1/h to xo . The requirement for such an algorithm is a suitable approximation for the integral defined by I0 and a nth order spline integral approximation is useful.

6.3.1. Iterative Algorithm 1/h An iterative algorithm for determining an approximation to xo , and based on a nth order spline integral approximation, is: 1/h zi + ui+1 zi 1 + ui xo , zi = − , (93) ≈ 1 ν + 1 ν − i 1 − i Math. Comput. Appl. 2019, 24, 35 22 of 40

1/h where an initial number, less than xo , of z0 is chosen and

n k " # P k+1 h k+1 Q  1  1 ui+ = c ( 1) (x0 z ) j + , 1 n,k i h zkh h 1 k=0 − − · j=0 − · i − n k " # (94) P h k+1 Q  1  1 νi+ = c (x0 z ) j + 1 n,k i h xk 1 −k=0 − · j=0 − · 0

Here cn,k is specified by (51). The proof of this algorithm is detailed in AppendixH.

6.3.2. Example and Results For a 3rd order spline integral approximation, the algorithm is based on

h 1 h 2 3(h 1) h 3 (h 1)(2h 1) u + = (x z ) (x z ) − + (x z ) − − i 1 0 i hzh 1 0 i h2z2h 1 0 i 3 3h 1 − · 2 i − − − · 28 i − − · 84h zi − − 4 (h 1)(2h 1)(3h 1) (95) ( h) − − − x0 zi 4 4h 1 − · 1680h zi −

h 1 h 2 3(h 1) h 3 (h 1)(2h 1) νi+ = (x0 z ) + (x0 z ) − + (x0 z ) − − + 1 i 2hx0 i h2x2 i 3 3 − · − · 28 0 − · 84h x0 4 (h 1)(2h 1)(3h 1) (96) ( h) − − − x0 zi 4 4 − · 1680h x0 Indicative results for the efficacy of the iterative algorithm for evaluation of a rational number to a fractional power, based on third and sixth order spline approximations, are detailed in Table7.

1/h Table 7. Relative error in evaluation of xo for the case of xo = 137, h = 6 and an initial estimate for 1/h 1/6 xo of 9/5. 137 = 2.27049261 ....

Spline Approximation Order: n Iteration order Magnitude of Relative Error 3 1 5.1 10 3 × − 2 4.2 10 18 × − 3 7.2 10 154 × − 6 1 6.7 10 4 × − 2 2.0 10 42 × − 3 3.2 10 620 × −

6.4. Arc-Cosine, Arc-Sine and Arc-Tangent Function Approximation Given the coordinate (x, y) of a point on the first quadrant of the unit circle, the corresponding angle θ, as defined by θ = acos(x), θ = asin(y) and θ = atan(y/x), can be determined from the following integral which is associated with the angle θ/2i, i 1, 2, ... : ∈ { }

gi(x) q 1+g2(x) Z i i 1 θ = 2 p dλ, i 1, 2, ... . (97) · 1 λ2 ∈ { } 0 − This result is proved in AppendixI. To determine an approximation for θ, and, hence, acos(x), asin(y) and atan(y/x), first, gi(x) needs to be specified. Second, an approximation to the integral needs to be specified and the spline based integral approximation is efficacious. Math. Comput. Appl. 2019, 24, 35 23 of 40

6.4.1. Algorithm for Determining gi(x) An algorithm for determining g (x), i {1,2,...}, is: i ∈

si 1 1 1 gi(x) = − , si = √1 ci 1, ci = √1 + ci 1, 1+ci 1 √2 √2 − · − − · − (98) s = sin(θ) = √1 x2, c = cos(θ) = x 0 − 0 Here: i i i gi(x) = tan(θ/2 ), si = sin(θ/2 ), ci = cos(θ/2 ). (99)

A direct definition for gi(x) is

q p √1 x2 √1 x2 2 di 2 g (x) = − , g (x) = − , g (x) = − − , i 2, (100) 0 x 1 1 + x i p 2 + di 1 ≥ − where an algorithm for determining di is:

2 p d0 = 4x , d1 = 2(1 + x), di = 2 + di 1, i 2. (101) − ≥ The proof of these results is detailed in AppendixI. As an example, the third and fourth order functions g3(x) and g4(x) are: r q q 2 √2 √1 + x 2 2 + √2 √1 + x g (x) = − , g (x) = − . (102) 3 q 4 r q √ √ 2 + 2 + 2 1 + x 2 + 2 + 2 + √2 √1 + x

6.4.2. Spline Based Integral Approximation The integral defined by (97) can be approximated by using a nth order spline integral approximation as defined by (49) and (51). For the case of (x, y) specified with y = √1 x2, approximations to − θ = atan(y/x), θ = acos(x) and θ = asin(y) can be determined. Based on a nth order spline integral approximation, the approximation is

 k+1     Xn       i  gi(x)   k  gi(x)  2 (2k+1)/2 θ 2 c   p[k, 0] + ( 1) pk, [1 + g (x)] , (103) ≈ n,k ·  q  ·  −  q  i  k=0  + 2( )    + 2( )   1 gi x 1 gi x where cn,k is specified by (51) and

p(0, t) = 1,   (104) p(k, t) = 1 t2 d p(k 1, t) + (2k 1)tp(k, t) − dt − − As an example   p(6, t) = 45 5 + 90t2 + 120t4 + 16t6 . (105)

These results arise from the spline based integral approximation as specified by (49) and (51) and by noting that 1 p(k, t) f (t) = f (k)(t) = , k 0, 1, ... , (106) 1/2 ( + ) [1 t2] ⇒ [1 t2] 2k 1 /2 ∈ { } − − Math. Comput. Appl. 2019, 24, 35 24 of 40 where the algorithm for determining the numerator polynomial p(k,t) is specified by (104). Substitution of this result into (49) yields        k+1 k  gi(x)    ( 1) pk, q   Xn    −  1+g2(x)   i  gi(x)   i  θ 2 c   p[k, 0] + . (107) n,k q   (2k+1)/2  ≈  2    g2(x,y)   k=0  1 + g (x)   i  i  1 + 2( )   − 1 gi x,y 

Simplification yields the result stated in (103).

6.4.3. Example and Results With p[0, t] = 1, p[1, t] = t, p[2, t] = 1 + 2t2, p(3, t) = 3t(3 + 2t2) it follows that a third order spline based approximation is

 g (x) 1/2  1 i [ + [ + g2(x)] ] 3 g3(x)+  2 q 1 1 i 28 i   · 1+g2(x) · −  θ i i  2  g3(x)  (108) ≈  1 i 2 2 3/2 1 5 2   3/2 [1 + [1 + 3g (x)] [1 + g (x)] ] g (x) [3 + 5g (x)]  84 [ + 2( )] i i 560 i i · 1 gi x · · − · · where, for the case of i = 4, g4(x) is specified in (102). The use of g4(x) in (108), for the case of x = 1/ √2, yields an approximation to atan(1) = π/4 and, hence, π with a relative error of 1.5 10 14. × − Weisstein [19] provides a good overview of approaches for calculating π. Further, and indicative, results are tabulated in Table8. High precision results can be established, for relatively low order spline based integral approximations, by using a high order of angle subdivision.

Table 8. Relative error in approximation of π based on an approximation to atan(1).

Order of Spline Approx. n Order of Angle Sub-division i Magnitude of Relative Error 1 1 4.4 10 3 × − 2 2.1 10 5 × − 4 7.3 10 8 × − 10 4.3 10 15 × − 100 1.8 10 123 × − 2 1 1.7 10 5 × − 2 1.6 10 7 × − 4 3.2 10 11 × − 10 4.5 10 22 × − 100 1.3 10 184 × − 4 1 3.6 10 8 × − 2 1.2 10 11 × − 4 7.5 10 18 × − 10 6.3 10 36 × − 100 7.4 10 307 × − 8 1 2.5 10 13 × − 2 1.3 10 19 × − 4 6.1 10 31 × − 10 1.7 10 63 × − 100 3.6 10 551 × −

6.5. Series for Integral Defined Functions: The Fresnel Sine Integral The spline based integral approximation, as specified by (49), can be used to define series approximations for integral defined functions. As an example, consider the Fresnel sine integral R t   λ2 dλ k 0 sin . To establish a spline based approximation for this integral the th of Math. Comput. Appl. 2019, 24, 35 25 of 40

 2  2 f (t) = sin t is required. This can be specified by using the quadrature signal fq(t) = cos t and is (k) f (t) = p (t) f (t) + q (t) fq(t), k 0, 1, ... , (109) k k ∈ { } where p0(t) = 1, q0(t) = 0, p1(t) = 0, q1(t) = 2t, (110) 474 It then follows that a spline based( ) approximation to the Fresnel( sine) integral is: p (t) = p 1 (t) tq (t) q (t) = q 1 (t) + tp (t) k k k 1 2 k 1 , k k 1 2 k 1 , 2 − − − − − ≥ It then followst that a spline basedn approximation to the Fresnel sine integral is: ()λ2 λ ≈ k + 1 ()  sin d  cnk, t qk 0 + t 0R k = 2610,,Pn ,… 475 sin(λ2)dλ c tk+1q (0)+ (111) ≈ n n,k k n 0 k=2,6,10,... (111) ()2 n ()k k + 1 () ()2 n ()k k + 1 () sin t 2 Pcnk, –1 t k k+p1k t + cos t 2 Pcnk, –1 kt k+1qk t sin(t) cn,k( 1) t pk(t) + cos(t ) cn,k( 1) t qk(t) k = 0k=0 − k =k=00 −

476 wherewhere cnnk,,k is is specified specified byby (51). A sixth sixth order order approximation approximation is is

t t R 2 3 5t3 7 t7 2 h t 409t55 997t9 9 t13 13i 2 h 31t3 56513 t7 41t117 i 11 2sin(λ )d5λt t + sin2(t )t 409t + 997t t + cos(t ) 2 +31t 5651t 41(112)t 477 sin()λ dλ ≈ ------≈- –156------− 144144- ++sin()t --- –2 −------8580 + ------1081080 −- –270270------cos()−t 156– ------720720+ ------− 540540- – ------(112)  0 156 144144 2 8580 1081080 270270 156 720720 540540 0 The error in a sixth order approximation to the integral is illustrated in Figure 15. The relative error is 478 The error in a sixth order approximation to the integral is illustrated in Figure 15. The relative error is significantly significantly less than for a standard Taylor series approximation defined, e.g., [20,21], according to 479 less than for a standard Taylor series approximation defined, e.g. [20], [21], according to t Z t ∞ k 4k+3 3 7 11 X∞ ( 1)k t4k + 3 t3 t7 11t sin(λ22)dλ ()−–1 t = t t + t ... . (113) 480 sin()λ dλ≈≈ (------4k + 3) (2k + 1)-! = ---3- –−-----42- + ------1320- – −… (113)  = ()⋅ () 0 k 0 4k + 3 · 2k + 1 ! 3 42 1320 0 k = 0 481 ForFor integration over over the the interva intervall []01.5, [0, 1.5], , the thetrue true integral integral is 0.778238 is 0.778238… and... a and6th order a 6th spline order approximation spline 5 approximation yields a relative error–5 of 1.4 10 . 482 yields a relative error of –101.4 × . − × − spline series approx. 1.0

0.8 true integral

0.6

0.4

0.2 Taylor series approx. 0.0

-0.2 0.0 0.5 1.0 1.5 2.0 2.5 3.0 t

Figure 15. Graph of approximations (order 6) to the integral2 of sin(t2). Figure 15. Graph of approximations (order 6) to the integral of sin()t . 6.6. Definite Integrals

483 6.6 DefiniteThe following Integrals examples illustrate the ability of spline based integral approximation to define new series for definite integrals. 484 The following examples illustrate the ability of spline based integral approximation to define new series for defi- 485 nite integrals.

486 6.6.1 Example 1 487 Consider the approximation

t n k i k sin()λ k + 1 ()–1 k! ()πki– ()πki– ()–1 488 ------dλ ≈ c t ⋅ ------⋅ sin ------+ sin t + ------⋅ ------(114)  λ  nk,  () i + 1 1 + ki– ! 2 2 ()1 + t 0 k = 0 i = 0

489 arising from (49), with cnk, as specified by (51), and based on the result

k k d k! ()ki– ()i 490 []ut()vt() = ------⋅ u ()t v ()t (115) k  ()ki– !i! dt i = 0

Math. Comput. Appl. 2019. FOR PEER REVIEW 26 Math. Comput. Appl. 2019, 24, 35 26 of 40

6.6.1. Example 1 Consider the approximation

t   Z (λ) Xn Xk ( )i " ( )π# " ( )π# ( )k sin k+1 1 k!  k i k i 1  dλ cn,kt − sin − + sin t + − −  (114) 1 + λ ≈ · (k i)! ·  2 2 · i+1  = = (1 + t) 0 k 0 i 0 − arising from (49), with cn,k as specified by (51), and based on the result

k Xk d k! (k i) (i) [u(t)ν(t)] = u − ν (t), (115) dtk (k i)!i! · i=0 −

i 1 (i) h iπ i (i) ( 1) i! where u(t) = sin(t), ν(t) = , u (t) = sin t + and ν (t) = − + . 1+t 2 (1+t)i 1 From (114), the following definite integral approximation

π    Z (λ) Xn Xk ( )i " ( )π# ( )k+1 sin k+1  1 k! k i  1  dλ cn,kπ  − sin − 1 + −  (116) 1 + λ ≈ ·  (k i)! · 2  i+1  = = (1 + π) 0 k 0 i 0 − is valid. An alternative form is

π Z 2 2n 1 sin(λ) π X− ν dλ dn π , (117) 1 + λ π n ,ν ≈ (1 + ) · ν= 0 0 where (ν) p (t) dn,ν = , ν! t 0 (118) n → " k i   # P P ( 1) k! (k i)π n k+1 n i 1 ( ) = k 1 − − [( + ) + ( ) ( + ) ] p t cn,kt − (k i)! sin 2 1 t 1 1 t − − k=0 · i=0 − · · − A sixth order approximation is

π  2 3 4 5 6  Z (λ) π2 3 + 33π + 4865π + 11105π + 5669π + 145651π 2257π sin  13 26 1716 3432 2970 308880 332640  dλ  7 8 9 10− 11−  (119) 1 + λ ≈ 6 ·  29977π 157π 1333π 101π 101π  (1 + π) 2882880 + 154440 4324320 + 864864 2882880 0 − −

The true value of the integral is 0.84381081 ... and the relative errors in the series approximation for n = 4, 8, 16, 64, 128, 256, respectively, are 0.035, 3.3 10 3, 3.9 10 5, 3.2 10 16, 9.2 10 31 and × − × − × − × − 1.1 10 59. × − 6.6.2. Example 2: Catalan’s Constant Consider the Catalan constant G which is defined by the series

k X∞ ( 1) G = − = 0.9159655941 (120) 2 k=0 (2k + 1) and, equivalently, by the integral, e.g., [18], pp. 56–57,

Zπ/4 G = 2 ln[2 cos(t)]dt. (121) 0 Math. Comput. Appl. 2019, 24, 35 27 of 40

A spline based approximation for Catalan’s constant, based on this integral, is

Xn k+1 π (k) k (k) G 2 cn,k [ f (0) + ( 1) f (π/4)], (122) ≈ · 4k+1 · − k=0 where cn,k is defined by (51) and

N(k, t) f (t) = ln[2 cos(t)], f (k)(t) = , k 1, 2, ... . (123) cos (t)k ∈ { }

Here: N(1, t) = sin(t), − (124) N(k, t) = d N(k 1, t) cos(t) + (k 1)N(k 1, t) sin(t), t 2 dt − · − − ≥ A sixth order approximation is

3π 3π2 5π3 5π4 9π5 π6 π7 G ln(2) + + + (125) ≈ 8 · 208 − 3328 109824 − 2928640 7907328 − 268369920 and has a relative error of 1.7 10 8. A sixth order series approximation, as specified by (120), yields × − an approximation with a relative error of 2.7 10 3. − × − 6.7. Use of Sub-Division of Integration Interval The region of convergence for a spline based integral approximation can be extended by demarcating the region of integration into sub-intervals and by using a change of variable. Consider R t f (λ)dλ the integral α which can be written as

α+ Z ∆m 1  X−  t α I =  f (λ + i∆)dλ, ∆ = − (126)   m α i=0 and can be approximated, consistent with (49) and (51), according to

Xn h i I c ∆k+1 g(k)(α) + ( 1)k g(k)(∆) (127) ≈ n,k − k=0 where m 1 X− g(t) = f (t + i∆), t [α, α + ∆]. (128) ∈ i=0

6.7.1. Example Consider the integral

t t m  Z Z/ m 1 sin(λ) X− sin(λ + q∆)  I = dλ =  dλ, ∆ = t/m, (129) 1 + λ  1 + λ + q∆   =  0 0 q 0 which has the approximation detailed in (114) and where the demarcation of the interval [0, t] into m sub-intervals of measure ∆ = t/m has been used. It then follows that

Xn k+1 t (k) k (k) I cn,k [g (0) + ( 1) g (t/m)], (130) ≈ · mk+1 · − k=0 Math. Comput. Appl. 2019, 24, 35 28 of 40 where m 1 X− sin(t + q∆) g(t) = (131) 1 + t + q∆ q=0 and, based on (115),   mX1 Xk " # i (k) −  k! (k i)π ( 1)  g (t) =  sin t + q∆ + − − . (132)  (k i)! · 2 · ( + + )i+1  q=0 i=0 − 1 t q∆

For the case integration over the interval [0, π], the use of four subdivision intervals yields, for the case of spline based integral approximations of orders n = 4, 8, 16, 64, 128, 256, relative errors, respectively, with magnitudes of 1.0 10 6, 4.3 10 11, 9.8 10 20, 4.5 10 71, 2.7 10 139 and × − × − × − × − × − 1.4 10 275. Such results indicate the significant improvement in convergence when compared with × − the non-subdivision case as detailed in Section 6.6.1. For the case integration over the interval [0, 100π], the use of 256 subdivision intervals yields, for the case of spline based integral approximations of orders n = 4, 8, 16, 64, 128, 256, relative errors, respectively, with magnitudes of 5.3 10 5, 3.3 10 8, 1.6 10 14, 7.5 10 52, 2.1 10 101 and × − × − × − × − × − 2.3 10 200. The true integral is 0.618276689 .... × − 6.7.2. Example: Electric Field Generated by a Ring of Charge A ring in free space defined by

n 2 2 2 o (x1, y1, z1) : x1 + y1 = a , z1 = b , (133) which has a free charge density of ρ f on it, generates an electric field at a point (x, y, z) away from the ring of Z2π [x a cos(t)]i + [y a sin(t)]j + [z b]k aρ f − · − · − E(x, y, z) = dt, (134) 4πεo · [x2 + y2 + z2 + a2 2ax cos(t) 2ay sin(t) 2bz]3/2 0 − − − where εo is the permittivity of free space. As an example, consider the x component of the electric field which is defined by the integral

Z2π Z2π aρ f [x a cos(t)] aρ f E (x, y, z) = − · dt = f (t)dt, (135) X 3/2 4πεo · h 2 i 4πεo · r ao cos(t φ) 0 o − − 0 where x a cos(t) f (t)= − · , 3/2 h 2 i ro ao cos(t φ) (136) − − q 2 2 2 2 2 2 2 r = x + y + z + a 2bz, ao = 2a x + y , φ = atan(y/x). o − Using (127), and demarcation of [0, 2π] into m sub-intervals of measure ∆ = 2π/m, this component of the electric field can be approximated according to

aρ Xn f k+1 (k) k (k) EX(x, y, z) cn,k∆ [g (0) + ( 1) g (∆)], (137) ≈ 4πεo · − k=0 where m 1 m 1 X− X− g(t) = f (t + i∆), g(k)(t) = f (k)(t + i∆) (138) i=0 i=0 Math. Comput. Appl. 2019, 24, 35 29 of 40

and N(k, t) f (k)(t) , k 0, 1, ... . (139) (2k+3)/2 h 2 i ∈ { } r ao cos(t + φ) N()0, t = xa– ⋅ocos− () t N()0, t = xa– ⋅ cos() t 563 2 ()2k + 1 (140) The algorithm for determining(), d N()(k, t,) is⋅ []()φ ------(), ()φ 563 Nkt =d Nk– 1 t 2ro – ao cos t – –()2k + 1 Nk– 1 t ao sin t – (140) Nkt(), = dNkt()– 1, t ⋅ []r – a cos()t – φ – ------2 -Nk()– 1, t a sin()t – φ dt o o 2 o 564 For exampleN(0, t) (simplificat= x a cosion (viat), Mathematica): − · h i (140) 564 For example( (simplificat) d (ion via Mathematica):) 2 ( φ) (2k+1) ( ) ( φ) N k, t = dt N k 1, t ro ao cos t 2 N k 1, t ao sin t . ()4 () − 3·a []a−⋅ cos()φ +−2xtcos−()– φ – 15a ⋅ −cos()2t – φ − f ()t = ------–acos t ++------[]o ⋅ ()φ ()------φ ⋅ ()φ ()4 –acos()t ⁄ 3ao a cos + 2xtcos– – 15a ⁄ cos 2t – Forf () examplet = ------[]2 (simplification()φ 32++ via------Mathematica):[]2 ------()φ 52 2ro – ao cos t – 32⁄ 4 2ro – ao cos t – 52⁄ []r – a cos()t – φ 4[]r – a cos()t – φ o 2o o o ( ) 15a []–2x ++14ata cos⋅ cos(t)() 14x3cosao[a()2cost –(φ2φ)+2–25xatcos⋅ cos(t φ())–152φa cos– (2taφ⋅ )]cos()3t – 2φ f 4 (t)2 =o − + · − − · − + 15------a []–2x ++214at⋅ cos() 3/14------2 xcos()2t – 2φ –252at⋅ cos()------– 2φ5/2– a ⋅ cos()3t – 2------φ -+ 565 o [r ao cos(t φ)] 4[r ao cos72(t⁄ φ)] (141) ------o − − ------2 o − ------− ------+ 565 15a2[ 2x+14a cos(t)+1614[]xrcos–(2at cos2φ)()ta–cosφ72(⁄t 2φ) 25a cos(3t 2φ)] (141) o − · []2 o o− ()− φ· − − · − + 16 ro –2ao cos t – 7/2 (141) 3 16[ro ao cos(t φ)] 2 4 4 105a []a ⋅ cos3()φ –56xtcos()– φ + −a ⋅ cos−()2t – φ sin()t –2φ 9454 a []xa– ⋅ cos() tsin4 ()t – φ ------3[]o ⋅ 105a()oφ[a cos(φ) 6()x------cosφ(t φ)+⋅5a cos()(2t φφ)] sin------(()t φφ) 2 +945------ao [4x[]oa cos(⋅t)] sin()(t φ) ()------φ 4 - 105ao a cos ·–56xtcos− – −+ a cos· 9⁄/22t −– sin −t – + 945ao −xa– cos t11−/sin2 t – ⁄ 2 2 φ 92 2 2 φ 11 2 ------8[]r ------–8[aro cosao cos()t (–t φ )]⁄ ------+ ------16[r16o []aro cos– (at cos)]()t – φ ------⁄ - []2 o o− ()φ− 92 []−2 o o− ()φ 11 2 8 ro – ao cos t – 16 ro – ao cos t – 566 TheThe integrand, integrand, ff, varies signifi significantlycantly with withthe point the () pointxyz,, ( xas, isy, eviz)dent as is in evident Figure 16 in where, Figure for 16the where, case of a for= 1 (),, 566the567 caseTheand of integrand, ab ==10 and , the f , bvariesgraph= 0, ofsignifi the f is graph cantlyshown ofwith forf is thethe shown pointspoint () forxyz110⁄ the,,110 as points⁄ is evi110⁄dent (1/10, ,in () 11Figure 1,,/10,⁄ 10 1 16/10),110 where,⁄ (1, , 1()for111/10,,, the 1 /case10), and of (1,() 10a 1,,,= 1 1)1 . ()⁄ ,,⁄ ⁄ (),,⁄ ⁄ (),, (),, 567and568 (10,andThe 1,b 1).change= 0 The , the in change graphthe integrand of inf is the shown with integrand four for thesub-divisions points with four110 of the sub-divisions110 interval110 []02 , 11 ofπ theis 10shown interval110 in ,Figure [1110, 2 17π] forisand shownthe 10 same 1 in1 four . 568 The change in the integrand with four sub-divisions of the interval []02, π is shown in Figure 17 for the same four Figure569 17points. for the same four points. 569 points. ft() ()110⁄ ,,110⁄ 110⁄ ft() ()110⁄ ,,110⁄ 110⁄ 0.4 0.4 ()111,, (),, 0.2 111 ()10,, 1 1 0.2 ()10,, 1 1 0.0 0.0 ()11,,⁄ 10110⁄ (),,⁄ ⁄ -0.2 11 10110 -0.2 -0.4 -0.4 -0.6 -0.6 0 1 2 3 4 5 6 t 0 1 2 3 4 5 6 t Figure 16. Graph of ft() for the case of a = 1 , b = 0 . For the case of ()10,, 1 1 a scaling factor of 10 has () (),, FigureFigurebeen 16. used;16.Graph for Graph the of casefof(t )ft forof ()for the11,, the case⁄ 10 case of110⁄ aof= a 1,a= sbcaling1= , 0.b Forfactor= 0 the . Forof case 0.1the ofhascase (10, been of 1, used.10 1) a 1 scaling 1 a scaling factor facto of 10r of has 10 has (),,⁄ ⁄ beenbeen used; used; forfor thethe case of (1,11 1/10, 10 1110/10) a scaling a scaling factor factor of of 0.1 0.1 has has been been used. used. π π () () ()π 3 gt = ft +++ft+π --- ft+ ft+3π------gt()= ft()+++ft+ --- 2 ft()+ π ft+ ------2   2 ()10,, 1 1 2 0.4 ()10,, 1 1 0.4 (),, 0.2 111 ()111,, 0.2 ()11,,⁄ 10110⁄ 0.0 ()11,,⁄ 10110⁄ 0.0 ()110⁄ ,,110⁄ 110⁄ -0.2 ()110⁄ ,,110⁄ 110⁄ -0.2 -0.4 -0.4 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 t 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 t FigureFigure 17. Graph 17. Graph of g(t ). of For gt() the . For case the of case (10, 1, of 1)()10 a,, scaling 1 1 a factor scaling of factor 10 has of been 10 has used; been for used the; case for the of case of () (),, (1,Figure 1()/10,11,, 1 ⁄/ 17. 1010) 110 a ⁄ scaling Graph a scaling of factor gt factor of . For 0.1 o hasthef 0.1 case been has of used.been 10 used. 1 1 a scaling factor of 10 has been used; for the case of ()11,,⁄ 10110⁄ a scaling factor of 0.1 has been used.

Math. Comput. Appl. 2019. FOR PEER REVIEW 30 Math. Comput. Appl. 2019. FOR PEER REVIEW 30 Math. Comput. Appl. 2019, 24, 35 30 of 40

Indicative results are detailed in Table9 and the use of four sub-intervals yields, in general, acceptable levels of error apart from the case of points close to the ring of charge where the integrand varies rapidly.

Table 9. Magnitude of relative error in evaluation of EX(x, y, z) using four sub-intervals and eight sub-intervals for the point (1, 0.1, 0.1).

Point: (1, 0.1, 0.1) Order of Approx. n Point: (0.1, 0.1, 0.1) Point: 90 (1, 1, 1) Point: (10, 1, 1) (8 Intervals) 2 0.015 0.15 0.067 3.1 10 4 × − 4 2.9 10 4 4.6 10 3 2.4 10 2 5.3 10 6 × − × − × − × − 8 2.6 10 8 2.3 10 3 2.6 10 3 1.1 10 9 × − × − × − × − 16 3.6 10 16 2.9 10 5 2.7 10 5 2.1 10 17 × − × − × − × −

7. Conclusions This paper has introduced the dual Taylor series which is a natural generalization of the classic Taylor series. Such a series, along with a spline based series, facilitates function and integral approximation with the approximations being summarized in Table2. In comparison with a antiderivative series, a Taylor series and a dual Taylor series, a spline based series approximation to an integral, in general, yields the highest accuracy for a set order of approximation. A spline based series for an integral has many applications and indicative examples include a series for the exponential function, which coincides with a Padé series, new series for the logarithm function as well as new series for integral defined functions such as the Fresnel Sine integral function. Such series are more accurate, and have larger regions of convergence, than Taylor series based approximations. The spline based series for an integral can be used to define algorithms for highly accurate approximations for the logarithm function, the exponential function, rational numbers to a fractional power and the inverse sine, inverse cosine and inverse tangent functions. Such algorithms can be used, for example, to establish highly accurate approximations for specific irrational numbers such as π and Catalan’s constant. The use of sub-intervals allows the region of convergence for an integral to be extended. The results presented are not exhaustive and other applications remain to be found.

Acknowledgments: The support of Prof. Zoubir, SPG, Technical University of Darmstadt, Darmstadt, Germany, who hosted a visit where significant work on this paper was completed, is gratefully acknowledged. Prof. Zoubir suggested the use of a set of test functions for a comparison of the integral approximations. Conflicts of Interest: The author declares no conflict of interest.

Appendix A. Proof of Remainder Expression for Dual Taylor Series

As m(t) + q(t) = 1 for t [α, β], it follows that the remainder function Rn(α, β, t), as specified by ∈ (28), can be written as

Rn(α, β, t) = f (t) fn(α, β, t) = [m(t) + q(t)] f (t) [m(t) fn(α, t) + q(t) fn(β, t)] − − (142) = m(t)[ f (t) fn(α, t)] + q(t)[ f (t) fn(β, t)] − − Using the result for the error in a nth order Taylor series approximation, as specified in (9), i.e.,

t β Z (t λ)n f (n+1)(λ) Z (t λ)n f (n+1)(λ) Rn(α, t) = − dλ, Rn(β, t) = − dλ, (143) n! − n! α t Math. Comput. Appl. 2019, 24, 35 31 of 40 the required results follow, namely:

t β Z (t λ)n f (n+1)(λ) Z (t λ)n f (n+1)(λ) Rn(α, β, t) = m(t) − dλ q(t) − dλ, t [α, β]. (144) n! − n! ∈ α t

Appendix B. Integral of a Dual Taylor Series with Polynomial Demarcation Functions Consider Zt Zt In(t) = fn(α, t, λ)dλ = [mn(λ) fn(α, λ) + qn(λ) fn(t, λ)]dλ. (145) α α

 t α  Substitution of fn(α, λ) and fn(t, λ) from (7), along with the definitions mn(t) = mN,n β− α and  β t  − qn(t) = mN,n β −α for the interval [α, β], it follows, using the form specified in (21) for mN,n(t), that −

t" n+1 n u n k ( ) # R P P ( 1) (n+ν)! h λ α iu+ν P (λ α) f k (α) ( ) = ( + ) − · − λ+ In t n 1 (n+1 u)! u! ν! t −α k! d α u=0 ν=0 − · · · − · k=0 " # (146) t n+1 n u +ν n k (k) R P P ( 1) (n+ν)! h t λ iu P (λ t) f (t) ( + ) − · − λ n 1 (n+1 u)! u! ν! t−α k! d α u=0 ν=0 − · · · − · k=0

Interchanging the order of and integration, and evaluation of the integrals, yields the required result:

n+1 n n u k+1 P P P ( 1) (n+ν)! (t α) ( ) k ( ) ( ) = ( + ) − · − [ k (α) + ( ) k ( )] In t n 1 (n+1 u)! u! ν! k! u+ν+k+1 f 1 f t u=0 ν=0 k=0 − · · · · · − n (147) P k+1 (k) k (k) = cn,k (t α) [ f (α) + ( 1) f (t)] k=0 · − · − where n+1 u  n  n + 1 X ( 1) X (n + ν)! 1  c = −  . (148) n,k k! · u! (n + 1 u)! ·  ν! · u + ν + k + 1 u=0 · − ν=0 The remainder is specified by

Zt Zt Rn(α, t) = [ f (λ) fn(α, t, λ)]dλ = f (λ)dλ In(t), (149) − − α α which implies ( ) ( ) R 1 (α, t) = f (t) I 1 (t). (150) n − n Differentiation of In(t), and use of the result cn,0 = 1/2, yields the required result:

n (1) P k (k) Rn (α, t) = cn,0[ f (t) f (α)] cn,k(k + 1)(t α) f (α)+ − − k=1 − n (151) P k+1 k (k) n+1 n+1 (n+1) ( 1) (t α) f (t)[cn,k(k + 1) cn,k 1] + cn,n( 1) (t α) f (t) k=1 − − − − − − Math. Comput. Appl. 2019, 24, 35 32 of 40

Appendix C. Proof of Spline Based Approximation

Consider the form specified by (39) for fn(α, β, t) and the results:

n+1 k n+1 k (k) (n+1)! (t β) − ( ) (n+1)! ( 1) − h (t) = − , h k (α) = − , n (n+1 k)! · (β α)n+1 (n+1 k)! · (β α)k − − n+1 k − − (152) (k) (n+1)! (t α) − ( ) (n+1)! g (t) = − , g k (β) = 1 n (n+1 k)! · (β α)n+1 (n+1 k)! · (β α)k − − − − Using these results, (39) allows the unknown coefficients to be sequentially solved. For example:

fn(α, β, α) = f (α) hn(α)a = 1 (153) ⇒ 00   (1) (1) (1)  hn (α)a00 + hn(α)a01 = 0 fn (α, β, α) = f (α)  (154) ⇒  hn(α)a10 = 1

 (2) (1)  hn (α)a00 + 2hn (α)a01 + 2hn(α)a02 = 0 ( )  f 2 (α, β, α) = f (2)(α)  (1) (155) n  2hn (α)a10 + 2hn(α)a11 = 0 ⇒   2hn(α)a20 = 1 etc. Sequential solving of the equations yields the result stated in (40). To rewrite (40) in a form that is similar to the form of a dual Taylor series, both the numerator and n i n i P (n+i)! (t α) P (n+i)! (β t) denominator expressions can be multiplied by − for the first term, and − i! n! (β α)i i! n! (β α)i i=0 · · − i=0 · · − for the second, to yield

n k i P− (n+i)! (t α) " n+1 n i # n k − (β t) (n+i)! (t α) (t α) i! n! · (β α)i P P (k) i=0 · − fn(α, β, t) = − + − − f (α) n + (β α)n 1 i! n! (β α)i k! P (n+i)! (t α)i · i=0 · · · k=0 · · − − − i! n! · (β α)i i=0 · − n k i (156) P− (n+i)! (β t) " n+1 n i # n k k − (t α) (n+i)! (β t) ( 1) (β t) i! n! · (β α)i P P (k) i=0 · − − + − − − f (β) n (β α)n 1 i! n! (β α)i k! P (n+i)! (β t)i · i=0 · · · k=0 · · − − − i! n! · (β α)i i=0 · − With the definition of the polynomial demarcation functions, as specified by (23), it follows that

 n k i  P− (n+i)! (t α) n k  i! n! − i  P (t α) (k)  i=0 · · (β α)  fn(α, β, t) = mn(t) − f (α)  − + k!  Pn (n+i)! (t α)i  · k=0 · ·  −   i! n! · (β α)i  i=0 · −  n k i  (157) P− (n+i)! (β t) n k k  i! n! − i  P ( 1) (β t) (k)  i=0 · · (β α)  qn(t) − − f (β)  −  k!  Pn (n+i)! (β t)i  · k=0 · ·  −   i! n! · (β α)i  i=0 · −

Adding and subtracting one from the bracketed terms, leads to the definitions for cn,k(t) and dn,k(t) as specified by (42) and the required form for fn(α, β, t) as stated by (41).

Appendix D. Convergence of Spline Approximation Consider the spline approximation defined by (41):

n k n k P (t α) ( ) P (t β) ( ) (α β ) = ( ) − k (α) [ + ( )] + ( ) − k (β) [ + ( )] fn , , t mn t k! f 1 cn,k t qn t k! f 1 dn,k t . (158) · k=0 · · · k=0 · · Math. Comput. Appl. 2019, 24, 35 33 of 40

First, assume the Taylor series

Xn (t α) k Xn (t β) k − f (k)(α), − f (k)(β) (159) k! · k! · k=0 k=0

β α β α converge, respectively, over the intervals α < t < α + −2 and α + −2 < t < β. Consistent with (32), a sufficient condition for convergence is for

( ) f n (β α)n lim max − = 0. (160) n 2n n! →∞ · It then follows that

Xn (t α) k Xn (t β) k − f (k)(α) [1 + c (t)] and − f (k)(β) [1 + d (t)] (161) k! · · n,k k! · · n,k k=0 k=0 both converge. To show this consider (42) and 1 + cn,k(δ):

n k P (n+i)! − δi i! n! · (t α) + ( ) = i=0 · = 1 cn,k δ n , δ − . (162) P (n+i)! i (β α) i! n! δ − i=0 · ·

It is clear that 1 + cn,k+1(δ) contains one less term than 1 + cn,k(δ) in the numerator and all terms are positive. Thus, 1 + c + (δ) < 1 + c (δ) and it is the case that 0 < 1 + c (δ) 1 with equality for the n,k 1 n,k n,k ≤ case of k = 0. For n and δ fixed, 1 + c (δ) is a monotonically decreasing series for k 0, ... , n , as is n,k ∈ { } clearly evident in the graphs shown in Figure5. It then follows, from Abel’s test for convergence [ 22], that the series specified in (161) are convergent. Second, the issue is the convergence of the spline approximation to the underlying function on the interval [α, β]. This follows if lim cn,k(δ) = 0 for k 0, 1, ... , n as the summation is then that of n →∞ ∈ { } a dual Taylor series. Further, mn(t) and qn(t) approach ideal demarcation functions as n . Thus, → ∞ the requirement is to prove converge of c (δ) to zero for 0 δ 1/2. First, using the definition of n,k ≤ ≤ cn,k(t) specified by (42), it can readily be shown that

n n k n ∂ [ ( )] = 1 P P− (n+i)! (n+j)! ( ) i+j 1 + 1 P (n+i)! i 1+ ∂δ cn,k δ D i! n! j! n! i j δ − D (i 1)! n! δ − − · i=n k+1 j=1 · · · · − · i=n k+1 − · · − − n n " n #2 (163) 1 P P (n+i)! (n+j)! i+j 1 P (n+i)! i D i! n! j! n! (i j)δ − ,D = i! n! δ · i=n k+1 j=n k+1 · · · · − i=0 · · − − h i and it then follows that ∂ c (δ) > 0 as the first two summations comprise only of positive terms ∂δ − n,k and the last double summation equals zero as the off-diagonal terms can be paired with one term being the negative of the another. Thus, for n and k fixed

cn,k(δ1) < cn,k(δ2) , (164) when δ1 < δ2. Hence, if lim cn,k(δ) = 0 for δ = 1/2, then the proof is complete. For δ = 1/2, it is the n →∞ case that the denominator term for cn,k(1/2) simplifies according to

n X (n + i)! 1 = 2n (165) i! n! · 2i i=0 · Math. Comput. Appl. 2019, 24, 35 34 of 40

It then follows that   (2n k+1)! n k+1 (2n k+2)! n k+2 (2n)! n ( ) = 1 − δ + − δ + + δ cn,k 1/2 2n (n k+1)! n! − (n k+2)! n! − ... n! n! · − · · − · · · · δ = 1/2 (166) (2n k+1)! δn k+1 h 2 k 1i − − + δ + 2δ + + k 1δ (n k+1)! n! 2n 1 2 2 ... 2 − − ≈ − · · δ = 1/2 assuming n k. Hence:  k 1 (2n k + 1)! k 2 − cn k(1/2) − · , k n. (167) | , | ≈ (n k + 1) n!· 22n  − · Using Stirling’s formula, n! √2π nn+1/2 e n, yields ≈ · · − k 1 cn,k(1/2) , (168) ≈ √π · √n which clearly converges to zero as n increases for all fixed values of k. This completes the proof.

Appendix E. Proof: Integral Approximation Based on Spline Approximation The spline based integral approximation, as specified by (49) and (50), arises from rewriting (40) in the form:

n (k) n k n+1 i+k 1 P f (α) P− (n+i)! (β t) (t α) fn(α, β, t) = − − + (β α)n+1 k! i! n! (β α)i − · k=0 · i=0 · · − n k n k n+1 i+k (169) P ( 1) ( ) P− (n+i)! (t α) (β t) 1 − f k (β) − − (β α)n+1 k! i! n! (β α)i − · k=0 · · i=0 · · − Integration of this expression over the interval [α, β] then yields:

β n (k) n k R 1 P f (α) P− (n+i)! I1 fn(α, β, λ)dλ = + (β α)n+1 · k! · i! n! · (β α)i α − k=0 i=0 · − (170) n k n k P ( 1) ( ) P− (n+i)! I2 1 − f k (β) (β α)n+1 k! i! n! (β α)i − · k=0 · · i=0 · · − where Zβ Zβ + + + + I = (β α)n 1 (λ α)i kdλ, I = (λ α)n 1 (β λ)i kdλ. (171) 1 − · − 2 − · − α α λ α A change of variable r = β−α yields − Z1 + + + + + + + I = (β α)n 2 i k (1 r)n 1 ri+kdr = (β α)n 2 i k B(i + k + 1, n + 2), (172) 1 − − · − · 0

Z1 + + + + + + + I = (β α)n 2 i k rn+1 (1 r)i kdr = (β α)n 2 i k B(n + 2, i + k + 1), (173) 2 − · − − · 0 where B is the Beta function Z1 a 1 b 1 B(a, b) = x − (1 x) − dx (174) − 0 Math. Comput. Appl. 2019, 24, 35 35 of 40

As Γ(m)Γ(n) (m 1)! (n 1)! B(m, n) = B(n, m) = = − · − , m, n 1, 2, ... , (175) Γ(m + n) (m + n 1)! ∈ { } − it follows that + + + (n + 1)! (i + k)! I = I = (β α)n 2 i k · . (176) 1 2 − · (n + i + k + 2)! Substitution yields the required result:

β n k+1 n k R P (β α) ( ) k ( ) P− (n+i)! (i+k)! (α β λ) λ = ( + ) − [ k (α) + ( ) k (β)] fn , , d n 1 k! f 1 f i! (n+i+k+2)! . (177) α · k=0 · − · · i=0 ·

Appendix E.1. Second Form By directly solving for the coefficients associated with a nth order spline approximation to a function over the interval [α, β], i.e., solving for d0, ... , d2n+1 in the following approximation function

2n+1 P i (k) (k) (k) (k) fn(α, β, t) = di(t α) , fn (α, β, α) = f (α), fn (α, β, β) = f (β), k 0, 1, ... , n (178) i=0 − ∈ { } and then integrating the approximation over [α, t], yields

t Z Xn k+1 (k) k (k) fn(α, t, λ)dλ = c (t α) [ f (α) + ( 1) f (t)], (179) n,k · − · − α k=0 where the coefficients form the array:

1 n = 0 2 1 1 n = 1 2 12 1 1 1 n = 2 2 10 120 1 3 1 1 n = 3 2 28 84 1680 1 1 1 1 1 . (180) n = 4 2 9 72 1008 30240 1 5 1 1 1 1 n = 5 2 44 66 792 15840 665280 1 3 5 5 1 1 1 n = 6 2 26 312 3432 11440 308880 17,297,280 k = 0 k = 1

n! (2n+1 k)! The explicit expression c = − can then be inferred. A direct proof of the equality n,k (n k)!(k+1)! · 2 (2n+1)! between this coefficient expression− and the· expression implicit in (177), i.e., a direct proof of

n k n + 1X− (n + i)! (k + i)! n! (2n + 1 k)! = − (181) k! i! · (n + k + i + 2)! (n k)!(k + 1)! · 2 (2n + 1)! i=0 − · remains elusive.

Appendix E.2. Remainder The remainder term, specified by (53), arises from differentiation of (48) which yields

n f (t) f (α) P k (k) k (k) f (t) = 2 + 2 + cn,k(k + 1)(t α) [ f (α) + ( 1) f (t)]+ k=1 − · − n (182) P k+1 k (k+1) (1) cn,k(t α) ( 1) f (t) + Rn (α, t) k=0 − − Math. Comput. Appl. 2019, 24, 35 36 of 40

as cn,0 = 1/2. A change of index u = k +1 in the second summation yields

n (1) f (t) f (α) P k (k) Rn (α, t) = − 2 + 2 + cn,k(k + 1)(t α) f (α)+ − k=1 − n (183) P k k (k) n n+1 (n+1) (t α) ( 1) f (t)[(k + 1)cn,k cn,k 1] + cn,n( 1) (t α) f (t) k=1 − − − − − −

Using the definition of cn,k, as specified by (51), it follows that

n + 1 (k + 1)cn,k cn,k 1 = (k + 1)cn,k (184) − − − · n k + 1 − and the required result follows, i.e.,

n h i (1)(α ) = P ( + )( α)k (k)(α) + ( )k+1 n+1 (k)( ) + Rn , t cn,k k 1 t f 1 n k+1 f t −k=0 − · − · − · (185) n+1 n+1 (n+1) cn,n( 1) (t α) f (t) − − Appendix F. Proof of Series Approximation for the Exponential Function First, the integral of the exponential function is well known, i.e.,

Zt eλdλ = et 1. (186) − 0

Second, a spline based integral approximation, as specified by (49) and (51), for the integral of the exponential function yields

t n R λ P k+1h k ti e dλ cn,kt 1 + ( 1) e 0 ≈ k=0 − (187) 2 n+1 t 2 n n+1 = [cn t + c t + ... + cn,nt ] + e [cn t c t + ... + ( 1) cn,nt ] ,0 n,1 ,0 − n,1 − Equating the right hand side of these two equations results in the required approximation

2 n+1 1 + cn,0t + cn,1t + ... + cn,nt et . (188) 2 n+1 n+1 ≈ 1 cn t + c t + ... + ( 1) cn,nt − ,0 n,1 − 1 1 The result stated in (75), for the case of n , arises from the result (54): c ,k = k+1 ( + ) . → ∞ ∞ 2 · k 1 ! The series convergence is based on the convergence of (49) for the case of an integrand of f (t) = exp(t). A sufficient condition for this is convergence of a spline based approximation for exp(t) tn (n) over the interval [0, t]. Consistent with (47), a sufficient condition for this is for lim n f = 0. n 2 n! max →∞ · · (n) t On the interval [0, t], fmax = e and, for t fixed:

n n t t (n) t e lim f = lim = 0 (189) n 2n n! · max n 2n n! →∞ · →∞ · as required. Math. Comput. Appl. 2019, 24, 35 37 of 40

Appendix G. Proof of Natural Logarithm Approximation Consider the integral of ln(t):

Zt ln(λ)dλ = t ln(t) t + 1. (190) − 1

The nth order based spline series approximation to the integral of ln(t), as defined by (49), is

Zt n X + ln(λ)dλ c (t 1)k 1[ f (k)(1) + ( 1)k f (k)(t)], (191) ≈ n,k − − = 1 k 0

k+1 ( ) ( 1) (k 1)! where f (t) = ln(t) and f k (t) = − − , k 1, 2, ... . Thus: tk ∈ { } t   Z Xn k k+1 k ( 1)  ln(λ)dλ cn,0(t 1) ln(t) + (t 1) cn,k( 1) (k 1)!(t 1) 1 + − . (192) ≈ − − − − −  k  = t 1 k 1

As cn,0 = 1/2, equating the right hand sides of this equation and (190) yields the approximation   Xn k (t 1) k+1 k ( 1)  t ln(t) t + 1 − ln(t) + (t 1) cn,k( 1) (k 1)!(t 1) 1 + − . (193) − ≈ 2 · − − − −  tk  k=1

Simplification yields the required result:    Xn k 2(t 1)  k+1 k ( 1)  ln(t) − 1 + cn,k( 1) (k 1)!(t 1) 1 + − . (194) ≈ t + 1  − − −  tk  k=1

Appendix H. Iterative Algorithm for Number to a Fractional Power Consider the integral result

Zxo 1 1/h xo 1/h dt = t = x z0. (195) 1 1/h zh o ht − | 0 − h z0

With k k k+ k 1 ( 1) Y 1 ( 1) 1 Y 1 f (t) = , f (k)(t) = − (j ) = − (j ), (196) ht1 1/h htk+1 1/h · − h tk+1 1/h · − h − − j=1 − j=0 where the last expression for f (k)(t) is valid for k 1, 2, ... , it follows, based on a nth order spline ∈ { } approximation as defined by (49) and (51), that

xo n k " 1/h # R 1 P k+1 h k+1 Q 1 1 k xo 1 1/h dt cn,k( 1) (xo z ) (j ) kh+h 1 + ( 1) k+1 ht − i h z − x h ≈ k=0 − − j=0 − · i − · o (197) zi 1/h = ui+1 + νi+1xo Math. Comput. Appl. 2019, 24, 35 38 of 40

Here   n k   P k+1 h k+1 Q 1  1 ui+ = c ( 1) (xo z )  j  + , 1 n,k i  h  zkh h 1 k=0 − − j=0 − · i −   (198) n k+1 k   ν = P ( h)  Q 1  1 i+1 cn,k xo zi  j h  k+1 −k=0 − j=0 −  · xo As Zxo 1 dt = x1/h z u + ν x1/h, (199) 1 1/h o i i+1 i+1 o ht − − ≈ h zi 1/h it then follows that an updated approximation for xo is

1/h zi + ui+1 xo . (200) ≈ 1 ν + − i 1 h This approximation is zi+1 and is the basis for the next lower integral limit of zi+1. Thus:

zi + ui+1 zi+1 = . (201) 747 Appendix 9. Proof: ArcCos, ArcSin and ArcTangent Approximati1 ν + on − i 1 748 Consider a point ()xy, on the first quadrant of a unit circle, as illustrated in Figure 18, which defines an angle θ . Appendix I. Proof: ArcCos, ArcSin and ArcTangent Approximation d 1 749 The relationships θ()y = asin()y , and θ()y = ------, imply that the path length around the unit circle defined Consider a point (x, y) ond they first quadrant2 of a unit circle, as illustrated in Figure A1, which 1 – y defines an angle θ. The relationships θ(y) = asin(y), and d θ(y) = 1 , imply that the path length i dy 2 750 by the angle of θ ⁄ 2 , to the point ()x , y , is √1 y o o i − around the unit circle defined by the angle of θ/2 , to the point (xo, yo), is y o yo θ Z1 751 ---- = θ ------dλ1 (202) i  = 2p dλ, (202) i λ 2 2 20 1 – 1 λ 0 − 752 where where  θ  π θ   θ  π θ  yθ= sin π= cosθ , x = cosθ = sinπ θ . (203) 753 y ==sin ----o cosi --- – ---- xi ==ocos ---- i sin --- – ---- i (203) o i 2 i 2 − 2o i 2 2 −i 2 2 2 2 2 2 2

(), 1 yo xo 2 i θ ⁄ 2 y = 1 – x (), y xy

distance = θ

(), θ xo yo i i θ ⁄ 2 distance = θ ⁄ 2

x 1 (), i FigureFigure 18. A1.Geometry,Geometry, based based on the on unit the unitcircle, circle, for defining for defining xo(xyoo, y basedo) based on on the angle θ/2 . i the angle θ ⁄ 2 .

754 To relate yo to x and y , consider the well known half angle results for the first quadrant:

1 – cos()θ sin()θ tan()θ ⁄ 2 ==------1 + cos()θ 1 + cos()θ 755 (204) 1 1 sin()θ ⁄ 2 = ------⋅ 1 – cos()θ cos()θ ⁄ 2 = ------⋅ 1 + cos()θ 2 2 756 It then follows that

sin()θ ⁄ 2 757 tan()θ ⁄ 4 = ------(205) 1 + cos()θ ⁄ 2 758 and iteration leads to the algorithm:

s i – 1 1 ⋅ 1 ⋅ 759 ti = ------si = ------1 – ci – 1 ci = ------1 + ci – 1 (206) 1 + ci – 1 2 2

()θ ⁄ i ()θ ⁄ i ()θ ⁄ i ()θ ()θ 760 where ti = tan 2 , si = sin 2 , ci = cos 2 , s0 ==sin y and c0 ==cos x . It then fol- 761 lows that

y ()θ ⁄ i o 762 ti ==tan 2 ----- (207) xo () 763 Using the notation gi x = ti it follows that

Math. Comput. Appl. 2019. FOR PEER REVIEW 40 Math. Comput. Appl. 2019, 24, 35 39 of 40

To relate yo to x and y, consider the well known half angle results for the first quadrant: q 1 cos(θ) sin(θ) tan(θ/2) = +− (θ) = + (θ) , 1 pcos 1 cos p (204) sin(θ/2) = 1 1 cos(θ), cos(θ/2) = 1 1 + cos(θ) √2 · − √2 · It then follows that sin(θ/2) tan(θ/4) = (205) 1 + cos(θ/2) and iteration leads to the algorithm:

si 1 1 p 1 p ti = − , si = 1 ci 1, ci = 1 + ci 1, (206) 1 + ci 1 √2 · − − √2 · − −

 i  i  i where ti = tan θ/2 , si = sin θ/2 , ci = cos θ/2 , s0 = sin(θ) = y and c0 = cos(θ) = x. It then follows that i yo ti = tan(θ/2 ) = . (207) xo

Using the notation gi(x) = ti, it follows that tv q g2(x) 2 i yo = 1 y g (x) yo = (208) − o · i ⇒ + 2( ) 1 gi x and gi(x) q 1+g2(x) Z i i 1 θ = 2 p dλ (209) · 1 λ2 0 − as required. The alternative definition for gi(x), as defined by (100), arises from a consideration of the results for t , i 0, 1, ... : i ∈ { }

y 4x √1 x2 n0 g0(x) = = − = , x 4x2 d0 ( ) = y = 2 √1 x2 = n1 g1 x 1+x 2(1+−x) d , q 1 2 d √2 2x √ 0 n2 g2(x) = − = − = , 2+ √2 √1+x 2+ √d d2 q1 (210) √ √ 2 √d1 √2 2 1+x − n3 g3(x) = − = = d , + √ + √ √ +x 2+ √d 3 2 q 2 2 1 q2 2 √2+ √2 √1+x 2 √d2 − n4 g4(x) = q− = = 2+ d d4 2+ 2+ √2+ √2 √1+x √ 3

The iterative formula defined by (100) and (101) is clearly evident.

References

1. Burton, D.M. The : An Introduction; McGraw-Hill: New York, NY, USA, 2005. 2. Katz, V.J. A History of Mathematics: An Introduction; Addison–Wesley: Boston, MA, USA, 2009. 3. Thomson, B.S. The natural integral on the real line. Scientiae Mathematicae Japonicae 2007, 67, 717–729. 4. Thomson, B.S. Theory of the Integral. Available online: http://classicalrealanalysis.info/com/documents/toti- screen-Feb9-2013.pdf (accessed on 17 December 2018). 5. Botsko, M.W. A fundamental theorem of calculus that applies to all Riemann integrable functions. Math. Mag. 1991, 64, 347–348. [CrossRef] 6. Spivak, M. Calculus; Publish or Perish: Houston, TX, USA, 1994. Math. Comput. Appl. 2019, 24, 35 40 of 40

7. Gradsteyn, I.S.; Ryzhik, I.M. Tables of Integrals, Series and Products; Academic Press: Cambridge, MA, USA, 1980. 8. Horowitz, D. Tabular integration by parts. Coll. Math. J. 1990, 21, 307–311. [CrossRef] 9. Olver, F.W.J. Asymptotics and ; Academic Press: Cambridge, MA, USA, 1974; Chapter 1. 10. Stenger, F. The asymptotic approximation of certain integrals. SIAM J. Math. Anal. 1970, 1, 392–404. [CrossRef] 11. Champeney, D.C. A Handbook of Fourier Theorems; Cambridge University Press: Cambridge, UK, 1987. 12. Pinkus, A. Weierstrass and Approximation Theory. J. Approx. Theory 2000, 107, 1–66. [CrossRef] 13. Davis, P.J.; Rabinowitz, P. Methods of ; Academic Press: Cambridge, MA, USA, 1984. 14. Howard, R.M. Antiderivative series for differentiable functions. Int. J. Math. Educ. Sci. Technol. 2004, 35, 725–731. [CrossRef] 15. Struik, D.J. A Source Book in Mathematics 1200–1800; Princeton University Press: Princeton, NJ, USA, 1986; pp. 328–332. 16. Kountourogiannis, D.; Loya, P. A derivation of Taylor’s formula with integral remainder. Math. Mag. 2003, 76, 217–219. [CrossRef] 17. Baker, G.A. Essentials of Pade Approximants; Academic Press: Cambridge, MA, USA, 1975. 18. Finch, S.R. Mathematical Constants, Encyclopedia of Mathematics and its Applications; Cambridge University Press: Cambridge, UK, 2003; Volume 94, pp. 56–57. 19. Weisstein, E.W. Formulas, MathWorld—A Wolfram Web Resource. Available online: http://mathworld. wolfram.com/PiFormulas.html (accessed on 17 December 2018). 20. Abramowitz, M.; Stegun, I.A. Handbook of Mathematical Functions with Formulas, Graphs and Mathematical Tables; Dover: Mineola, NY, USA, 1965. 21. Spiegel, M.R.; Lipshutz, S.; Liu, J. Mathematical Handbook of Formulas and Tables; McGraw Hill: New York, NY, USA, 2009. 22. Whittaker, E.T.; Watson, G.N. A Course of Modern Analysis; Cambridge University Press: Cambridge, UK, 1920.

© 2019 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).