# TaylorModel.jl API

## Types

`RTaylorModel1{T,S}`

Relative Taylor model in 1 variable, providing a rigurous polynomial approximation given by a Taylor polynomial `pol`

(around `x0`

) and a relative remainder `rem`

for a function `f(x)`

in one variable, valid in the interval `dom`

. This corresponds to definition 2.3.2 of Mioara Joldes' thesis.

Fields:

`pol`

: polynomial approximation, represented as`TaylorSeries.Taylor1`

`rem`

: the interval bound`x0`

: expansion point`dom`

: domain, interval over which the Taylor model is defined / valid

The approximation $f(x) = p(x) + \delta (x - x_0)^{n+1}$ is satisfied for all $x\in \mathcal{D}$; `n`

is the order (degree) of the polynomial $p(x)=\sum_{i=0}^n p_i (x - x_0)^i$.

`TaylorModel1{T,S}`

Absolute Taylor model in 1 variable, providing a rigurous polynomial approximation given by a Taylor polynomial `pol`

(around `x0`

) and an absolute remainder `rem`

for a function `f(x)`

in one variable, valid in the interval `dom`

. This corresponds to definition 2.1.3 of Mioara Joldes' thesis.

Fields:

`pol`

: polynomial approximation, represented as`TaylorSeries.Taylor1`

`rem`

: the interval bound`x0`

: expansion point`dom`

: domain, interval over which the Taylor model is defined / valid

The approximation $f(x) = p(x) + \Delta$ is satisfied for all $x\in \mathcal{D}$ ($0\in \Delta$); `n`

is the order (degree) of the polynomial $p(x)=\sum_{i=0}^n p_i (x - x_0)^i$.

`TaylorModelN{N,T,S}`

Taylor Models with absolute remainder for `N`

independent variables.

## Methods

bound_remainder(::Type{TaylorModel1}f::Function, polf::Taylor1, polfI::Taylor1, x0::Interval, I::Interval)

Bound the absolute remainder of the polynomial approximation of `f`

given by the Taylor polynomial `polf`

around `x0`

on the interval `I`

. It requires the interval extension `polfI`

of the polynomial that approximates `f`

for the whole interval `I`

, in order to compute the Lagrange remainder.

If `polfI[end]`

has a definite sign, then it is monotonic in the intervals [I.lo, x0] and [x0.hi, I.hi], which is exploited; otherwise, it is used to compute the Lagrange remainder. This corresponds to Prop 2.2.1 in Mioara Joldes PhD thesis (pp 52).

bound_remainder(::Type{RTaylorModel1}, f::Function, polf::Taylor1, polfI::Taylor1, x0::Interval, I::Interval)

Bound the relative remainder of the polynomial approximation of `f`

given by the Taylor polynomial `polf`

around `x0`

on the interval `I`

. It requires an the interval extension `polfI`

of a polynomial that approximates `f`

for the whole interval `I`

, in order to compute the Lagrange remainder.

If `polfI[end]`

has a definite sign, then it is monotonic in the interval `I`

, which is exploited; otherwise, the last coefficients bounds the relative remainder. This corresponds to Prop 2.3.7 in Mioara Joldes' PhD thesis (pp 67).

```
fp_rpa(tm::TaylorModel1{Interval{T},T})
fp_rpa(tm::RTaylorModel1{Interval{T},T})
```

Convert a `tm`

TaylorModel1 to a TaylorModel1 whose polynomial coefficients are `Float64`

. The accumulated error is added to the remainder. The mid point of the expansion interval is preferentially rounded down if it is not an exactly representable value.

rpa(g::Function, tmf::TaylorModel1) rpa(g::Function, tmf::RTaylorModel1) rpa(g::Function, tmf::TaylorModelN)

Rigurous polynomial approximation (RPA) for the function `g`

using the Taylor Model with absolute/relative remainder `tmf`

. The bound is computed exploiting monotonicity if possible, otherwise, it uses Lagrange bound.

`integrate(a, [x])`

Return the integral of `a::Taylor1`

. The constant of integration (0-th order coefficient) is set to `x`

, which is zero if ommitted.

`integrate(a, r)`

Integrate the `a::HomogeneousPolynomial`

with respect to the `r`

-th variable. The returned `HomogeneousPolynomial`

has no added constant of integration. If the order of a corresponds to `get_order()`

, a zero `HomogeneousPolynomial`

of 0-th order is returned.

`integrate(a, r, [x0])`

Integrate the `a::TaylorN`

series with respect to the `r`

-th variable, where `x0`

the integration constant and must be independent of the `r`

-th variable; if `x0`

is ommitted, it is taken as zero.

`integrate(a, c0)`

Integrates the one-variable Taylor Model (`TaylorModel1`

or `RTaylorModel1`

) with respect to the independent variable; `c0`

is the interval representing the integration constant; if omitted it is considered as the zero interval.

`integrate(fT, which)`

Integrates a `TaylorModelN`

with respect to `which`

variable. The returned `TaylorModelN`

corresponds to the Taylor Model of the definite integral ∫f(x) - ∫f(expansion_point).