Approximate function calculation apparatus, method and program
An approximate function calculation apparatus includes: a first error upper bound calculating unit which obtains an upper bound of a first error of an approximation of a function f(x) by the function g b (x) in a section [x 0 , b]; an expansion position calculating unit which obtains an expansion position b′ that represents a maximum b at which the upper bound of the first error; a second error upper bound calculating unit which obtains an upper bound of a second error of an approximation of the function f(x) by a function g b ′(x) in a section [b′, x 2 ]; a right end position calculating unit which calculates a right end position x 2 ′ that represents a maximum x 2 at which the upper bound of the second error; and a control unit which repeats processing of the respective units with a section [x 2 ′, x 1 ] as the section D.
1 . An approximate function calculation apparatus, comprising:
when x 0 and x 1 represent predetermined numbers satisfying a relationship expressed as x 0 <x 1 , D=[x 0 , x 1 ] represents a section in which a function f(x) is to be approximated, ε represents a predetermined number that is an error allowed in approximation, k represents a predetermined integer equal to or larger than 0, b represents a number satisfying a relationship expressed as x 0 <b<x 1 , and a function g b (x) represents a Taylor expansion of the function f(x) up to a k-th degree at b:
Taylor expansion circuitry configured to obtain the function g b (x);
first error upper bound calculating circuitry configured to receive the function g b (x) from the Taylor expansion circuitry and obtain an upper bound of an error of an approximation of the function f(x) by the function g b (x) in a section [x 0 , b];
expansion position calculating circuitry configured to obtain an expansion position b′ that represents a maximum b at which the upper bound of the error of the approximation of the function f(x) by the function g b (x) in the section [x 0 , b] is equal to or smaller than ε using the upper bound of the error of the approximation of the function f(x) by the function g b (x) in the section [x 0 , b];
second error upper bound calculating circuitry configured to receive the function g b (x) from the Taylor expansion circuitry and obtain an upper bound of an error of an approximation of the function f(x) by a function g b ′(x) in a section [b′, x 2 ], where x 2 represents a number satisfying b′<x 2 ≤x 1 ;
right end position calculating circuitry configured to calculate a right end position x 2 ′ that represents a maximum x 2 at which the upper bound of the error of the approximation of the function f(x) by the function g b ′(x) in the section [b′, x 2 ] is equal to or smaller than ε using the upper bound of the error of the approximation of the function f(x) by the function g b ′(x) in the section [b′, x 2 ];
output circuitry configured to output information related to a section [x 0 , x 2 ′] and the function g b ′(x); and
control circuitry configured to repeat processing of the Taylor expansion circuitry, the first error upper bound calculating circuitry, the second error upper bound calculating circuitry, the expansion position calculating circuitry, the right end position calculating circuitry, and the output circuitry with a section [x 2 ′, x 1 ] as the section D.
2 . The approximate function calculation apparatus according to claim 1 , wherein
when the function g b (x) is represented by the following expression
g b ( x )= a 0 +a 1 ( x−b )+ . . . + a k ( x−b ) k
a i =f (i) (a)/i!, where f (i) represents a function obtained by differentiating a function fi-number of times,
an upper bound of an absolute value of a residual term corresponding to the Taylor expansion is represented by ε 1 , an upper bound of an error of a j is represented by Δ j , an upper bound of an error of b is represented by Δ*, R represents a predetermined section and w satisfies w=max x∈R |x−b|, and ε 2 is defined by the following expression
ε 2 =((| a 0 |+Δ 0 )+(| a 1 |+Δ 1 )( w +Δ*)+ . . . +(| a k |+Δ k )( w +Δ*) k )−(| a 0 |+|a 1 |w+ . . . +|a k |w k ).
the first error upper bound calculating circuitry adopts ε 1 +ε 2 when the section [x 0 , b] is adopted as the predetermined section R as the upper bound of the error, and
the second error upper bound calculating circuitry adopts ε 1 +ε 2 when the section [b′, x 2 ] is adopted as the predetermined section R as the upper bound of the error.
3 . The approximate function calculation apparatus according to claim 1 , wherein
when the function g b (x) is represented by the following expression
g b ( x )= a 0 +a 1 ( x−b )+ . . . + a k ( x−b ) k
a i =f (i) (a)/i!, where f (i) represents a function obtained by differentiating a function fi-number of times,
an upper bound of an absolute value of a residual term corresponding to the Taylor expansion is represented by ε 1 , an upper bound of an error of a j is represented by Δ j , an upper bound of an error of b is represented by Δ*, R represents a predetermined section and w satisfies w=max x∈R |x−b|, and ε 2 is defined by the following expression
ε 2 =((| a 0 |+Δ 0 )+(| a 1 |+Δ 1 )( w +Δ*)+ . . . +(| a k |+Δ k )( w +Δ*) k )−(| a 0 |+|a 1 |w+ . . . +|a k |w k ),
the first error upper bound calculating circuitry adopts ε 1 +ε 2 when the section [x 0 , b] is adopted as the predetermined section R as the upper bound of the error.
4 . A non-transitory computer readable medium that stores a program for causing a computer to function as the approximate function calculation apparatus according to claim 1 .
5 . An approximate function calculation method, comprising:
when x 0 and x 1 represent predetermined numbers satisfying a relationship expressed as x 0 <x 1 , D=[x 0 , x 1 ] represents a section in which a function f(x) is to be approximated, & represents a predetermined number that is an error allowed in approximation, k represents a predetermined integer equal to or larger than 0, b represents a number satisfying a relationship expressed as x 0 <b<x 1 , and a function g b (x) represents a Taylor expansion of the function f(x) up to a k-th degree at b:
a Taylor expansion step in which Taylor expansion circuitry obtains the function g b (x);
a first error upper bound calculation step in which a first error upper bound calculating circuitry obtains an upper bound of an error of an approximation of the function f(x) by the function g b (x) in a section [x 0 , b];
an expansion position calculation step in which expansion position calculating circuitry obtains an expansion position b′ that represents a maximum b at which the upper bound of the error of the approximation of the function f(x) by the function g b (x) in the section [x 0 , b] is equal to or smaller than ε using the upper bound of the error obtained by processing by the first error upper bound calculating circuitry;
a second error upper bound calculation step in which second error upper bound calculating circuitry obtains an upper bound of an error of an approximation of the function f(x) by a function g b ′(x) in a section [b′, x 2 ], where x 2 represents a number satisfying b′<x 2 ≤x 1 ;
a right end position calculation step in which right end position calculating circuitry calculates a right end position x 2 ′ that represents a maximum x 2 at which the upper bound of the error of the approximation of the function f(x) by the function g b ′(x) in the section [b′, x 2 ] is equal to or smaller than ε using the upper bound of the error obtained by processing by the second error upper bound calculating circuitry;
an output step in which output circuitry outputs information related to a section [x 0 , x 2 ′] and the function g b ′(x); and
a control step in which control circuitry repeats processing of the Taylor expansion circuitry, the first and second error upper bound calculating circuitry, the expansion position calculating circuitry, the right end position calculating circuitry, and the output circuitry with a section [x 2 ′, x 1 ] as the section D.