maple minimax函数

numapprox[minimax] - minimax rational approximation

Calling Sequence

 

minimax(fx=a..b, [mn], w, 'maxerror')

minimax(fa..b, [mn], w, 'maxerror')

 

Parameters

 

f

-

procedure or expression representing the function

x

-

variable name appearing in f, if f is an expression

a, b

-

numerical values specifying the interval of approximation

m

-

integer specifying the desired degree of the numerator

n

-

integer specifying the desired degree of the denominator

w

-

(optional) procedure or expression specifying the weight function, default 1

maxerror

-

(optional) a name which will be assigned the minimax norm

 

 

Description

 
• 

This procedure computes the best minimax rational approximation of degree (mn) for a given real function f(x) on the interval [ab] with respect to the positive weight function w(x), via the Remez algorithm.

• 

Specifically, it computes the rational expression p(x)/q(x) such that

max(w(x)*abs(f(x)-p(x)/q(x)), `in`(x, [a, b]))

(1)

 

  

is minimized over all rational expressions p(x)/q(x) with numerator of degree <= m and denominator of degree <= n.

• 

Note that if f(x) is nonzero on the interval of approximation then the relative error will be minimized by specifying the weight function w(x) = 1/abs(f(x)).

• 

If the second argument is a range a..b then the first argument is understood to be a Maple operator, and the result will be returned as an operator. If the second argument is an equation x = a .. b then the first argument is understood to be an expression in the variable x, and the result will be returned as an expression. In all cases, the numerator and denominator of the result are each expressed in Horner (nested multiplication) form.

• 

Note that for the purpose of evaluating a rational function efficiently (minimizing the number of arithmetic operations), the rational function should be converted to a continued-fraction form. See numapprox[confracform].

• 

If n = 0 or if the third argument is simply an integer m then the best minimax polynomial approximation of degreem is computed.

• 

If the fourth argument w is specified then it is assumed to be an operator if f is an operator, and it is assumed to be an expression if f is an expression. If the fourth argument is omitted then the weight function is understood to be w(x) = 1 for all x.

• 

If the fifth argument 'maxerror' is present then it must be a name. Upon return, its value will be an estimate of the minimax norm specified by equation (1) above.

• 

Various levels of user information will be displayed during the computation if infolevel[minimax] is assigned values between 1 and 3.

• 

The command with(numapprox,minimax) allows the use of the abbreviated form of this command.

 

Examples

 

with(numapprox)

minimax(exp(x), x = 0 .. 1, 5)

.9999988706+(1.000079450+(.4990961405+(.1704019041+(0.3480060952e-1+0.1390372558e-1*x)*x)*x)*x)*x

(1)

minimax(sin(x)/x, x = 0 .. 2, [2, 2])

(.9502547393+(-0.529094917e-1-0.8416376466e-1*x)*x)/(.9501754297+(-0.5104192162e-1+0.6724432790e-1*x)*x)

(2)

minimax(sin+cos, -1 .. 1, [1, 2])

proc (x) options operator, arrow; (.8647502927+1.115735845*x)/(.8498225980+(.2651029392+.3003548040*x)*x) end proc

(3)

Digits := 14

Digits := 14

(4)

proc (x) options operator, arrow; (1.2602800366369+(.66158211600441+(.14246094729905+0.13527436108012e-1*x)*x)*x)/(1.2602800381631+(-.59869807134142+(.11102132866190-0.82048023700096e-2*x)*x)*x) end proc

(5)

0.12110972781516e-8

(6)
 

See Also

 

numapprox[confracform]



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值