errors - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


combine/errors

combine quantities-with-error in an expression

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

combine( expr, errors, opts )

Parameters

expr

-

expression containing quantities-with-error

opts

-

(optional) equation(s) of the form option=value, where option is one of 'rule' or 'correlations'; determine behavior

Description

• 

The combine( expr, errors, opts ) command combines quantities-with-error in a mathematical expression, or in other words, propagates the errors through an expression.

• 

The opts argument can contain one or more of the following equations that determine the behavior:

  

 

  

'rule' = name

  

If the optional parameter rule=name is given, the rounding rule name is applied to the result of combine. Otherwise, the default rounding rule is used ('digits', or as set by ScientificErrorAnalysis[UseRule]).

  

 

  

'correlations' = true or false

  

If 'correlations'=true, combine/errors uses correlations defined between the quantities-with-error combined. The default value of 'correlations' is true. If 'correlations'=false, combine/errors ignores any correlations defined between the quantities-with-error.

  

If no correlations have been directly defined between the quantities-with-error in expr (using ScientificErrorAnalysis[SetCorrelation]), 'correlations'=false does not produce a result different from the default.

  

'correlations'=false has no effect on further induced error analysis calculations. That is, when combine/errors requires the variance of a quantity-with-error with functional dependence, that calculation is performed using correlations.

• 

The result of combine/errors is a quantity-with-error returned in a Quantity object.

• 

The uncertainty is calculated using the usual formula of error analysis involving a first-order expansion with the variances of the quantities-with-error.

  

The error u⁡y in y, where y is a function of variables xi, is

  

 

u⁡y2=∑i=1N⁡ⅆyⅆxi2⁢u⁡xi2

  

where u⁡xi is the error in xi, and the partials are evaluated at the central values of the xi.

  

When correlations are included, the formula also involves the covariances u⁡xi,xj between the quantities-with-error.

  

 

u⁡y2=∑i=1N⁡ⅆyⅆxi2⁢u⁡xi2+2⁢∑i=1N−1⁡∑j=i+1N⁡ⅆyⅆxi⁢ⅆyⅆxj⁢u⁡xi,xj

  

The covariance u⁡xi,xj can be expressed in terms of the correlation r⁡xi,xj and errors u⁡xi, u⁡xj as:

  

 

u⁡xi,xj=r⁡xi,xj⁢u⁡xi⁢u⁡xj

  

where u⁡xi and u⁡xj are the errors in xi and xj.

• 

ScientificErrorAnalysis[Variance] and ScientificErrorAnalysis[Covariance] are used to calculate the variances and covariances of the quantities-with-error. Thus, any quantity-with-error combined can have functional dependence on other quantities-with-error.

Examples

> 

with⁡ScientificErrorAnalysis:

> 

a≔Quantity⁡10.,1.:

> 

b≔Quantity⁡20.,1.:

> 

combine⁡a⁢b,errors

Quantity⁡200.,22.36067977

(1)
> 

combine⁡a⁢b,errors,rule=round2

Quantity⁡200.,22.

(2)
> 

combine⁡ba,errors

Quantity⁡2.000000000,0.2236067977

(3)
> 

SetCorrelation⁡a,b,0.1

> 

combine⁡a⁢b,errors

Quantity⁡200.,23.23790008

(4)
> 

combine⁡ba,errors

Quantity⁡2.000000000,0.2144761059

(5)
> 

combine⁡ba,errors,correlations=false

Quantity⁡2.000000000,0.2236067977

(6)
> 

with⁡ScientificConstants:

> 

e5≔Constant⁡h⁢Constant⁡c⁢a

e5≔Constant⁡h⁢Constant⁡c⁢Quantity⁡10.,1.

(7)
> 

combine⁡e5,errors

Quantity⁡1.986445824×10−24,1.986445824×10−25

(8)
> 

e6≔Constant⁡meConstant⁡mp

e6≔Constant⁡meConstant⁡mp

(9)
> 

combine⁡e6,errors

Quantity⁡0.0005446170214,5.176301769×10−14

(10)

See Also

combine

Overview of ScientificErrorAnalysis

Rounding rules

ScientificConstants

ScientificConstants[Constant]

ScientificErrorAnalysis

ScientificErrorAnalysis and ScientificConstants

ScientificErrorAnalysis[Covariance]

ScientificErrorAnalysis[GetCorrelation]

ScientificErrorAnalysis[Quantity]

ScientificErrorAnalysis[SetCorrelation]

ScientificErrorAnalysis[UseRule]

ScientificErrorAnalysis[UsingRule]

ScientificErrorAnalysis[Variance]