[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Intergration help required
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: Intergration help required |
Date: |
Tue, 31 Jul 2012 08:44:43 -0400 |
On 31 July 2012 07:06, Mahvish Nazir <address@hidden> wrote:
> Ok when i run this code, it says"error tolerance not met. estimated error
> 0.86536. ans=0.112577+0.018141i"
> Can i take this answer or it is wrong since error tolerance is not met?
You can't just mimic what I'm writing without attempting to understand
it. Analysis and reflection is required.
You're doing numerical integration of a highly oscillating function.
Octave has several different integration (quadrature) routines. I
pointed out two, quadgk and quadv. If you read their help, (e.g. "help
quadgk"), you will see that the methods they're using are,
respectively, Gauss-Kronrod and Simpson's rule:
http://en.wikipedia.org/wiki/Gauss%E2%80%93Kronrod_quadrature_formula
http://en.wikipedia.org/wiki/Simpson%27s_rule
Each of those formulae has advantages and disadvantages. You can
always attempt to get a better quadrature by increasing the
partitioning of the domain, but you have to bear in mind that you're
also limited by machine precision.
- Jordi G. H.
- Re: Intergration help required, (continued)
- Re: Intergration help required, Jordi Gutiérrez Hermoso, 2012/07/24
- Re: Intergration help required, Mahvish Nazir, 2012/07/24
- Re: Intergration help required, Juan Pablo Carbajal, 2012/07/24
- Re: Intergration help required, Mahvish Nazir, 2012/07/24
- Re: Intergration help required, Mahvish Nazir, 2012/07/24
- Re: Intergration help required, Mahvish Nazir, 2012/07/27
- Re: Intergration help required, Jordi Gutiérrez Hermoso, 2012/07/27
- Re: Intergration help required, Juan Pablo Carbajal, 2012/07/27
- Re: Intergration help required, Mahvish Nazir, 2012/07/31
- Re: Intergration help required, Mahvish Nazir, 2012/07/31
- Re: Intergration help required,
Jordi Gutiérrez Hermoso <=
- Re: Intergration help required, Martin Helm, 2012/07/24
Re: Intergration help required, Juan Pablo Carbajal, 2012/07/24