# What means of tolerance in integral2 function?

1 visualización (últimos 30 días)
Hyunseop Lee el 5 de Feb. de 2018
Respondida: Jyotish Robin el 19 de Feb. de 2018
In the help of integral2 function, there is sentence about error tolerance.
'AbsTol', absolute error tolerance
'RelTol', relative error tolerance
integral2 attempts to satisfy |Q - I| <= max(AbsTol,RelTol*|Q|),
where I denotes the exact value of the integral. Usually RelTol
determines the accuracy of the integration. However, if |Q| is
sufficiently small, AbsTol determines the accuracy of the
integration, instead. The default value of AbsTol is 1.e-10, and
the default value of RelTol is 1.e-6. Single precision integrations
may require larger tolerances.
what means of this sentence, "where I denotes the exact value of the integral" ? How to calculate exact value in this function?
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

### Respuestas (1)

Jyotish Robin el 19 de Feb. de 2018
Hi!
I guess you are confused because you seem to think that we need to know Q to estimate q-Q, not true in general. One can still estimate how far q is from Q without actually knowing Q because we know what is the error in the computation based on the theory.
Typically, in most numerical algorithms you can bound the error even if you don't know the exact solution because the theoretical underpinning of a numerical algorithm states that the solution is computed (q in this example) and the actual solution (Q) is related by:
q = Q +/- err(...)
where error(..) is a function of various algorithm parameter.
For example, if you were to write a Taylor expansion of a function, you state the error in terms of distance from the point around which you wrote the Taylor expansion. So if the algorithm is approximating the function, we can know how much error the approximation will have. All numerical algorithm have some way to estimate this error(..) and stop when error(..) goes below certain tolerance.
Hope this helps!
Thanks,
Jyotish
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

### Categorías

Más información sobre 시작과 종료 en Help Center y File Exchange.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!