gauss chebychew quadrature in integration package

Ben Abbott bpabbott at mac.com
Sun Jun 22 17:08:45 CDT 2008


On Jun 22, 2008, at 3:59 PM, Thomas Plehn wrote:

> my whole octave session with all user input is shown on the picture  
> accessible under the posted link
>
> ----- Original Message ----- From: "Ben Abbott" <bpabbott at mac.com>
> To: "Thomas Plehn" <tplehn at gmx.de>
> Cc: <help-octave at octave.org>
> Sent: Sunday, June 22, 2008 9:14 PM
> Subject: Re: gauss chebychew quadrature in integration package
>
>
>>
>> On Jun 22, 2008, at 2:54 PM, Thomas Plehn wrote:
>>
>>> http://img28.picoodle.com/img/img28/4/6/22/f_quadraturem_a5f90c3.png
>>>
>>> hello,
>>> I have tried to integrate a simple function in octave using the  
>>> integration
>>> package.
>>> the function is f(x,y)=x^2*sin(y)
>>> the integration limits for both x and y are from 0 to 1.
>>> the result should be (1-cos(1))/3 = 0,15323
>>> this result is yielded by quadndg, gquadnd
>>> but cquadnd yield a different result
>>>
>>> should this be considered as a bug?
>>
>> Can you post a bit more information. Perhaps a short script   
>> illustrating specifically what you did?
>>
>> Ben
>

ok,

I've not used the integration package before, but modified you example  
to create a simpler version.

 > pkg load integration
 > function y = f (x)
 > y = 1;
 > endfunction
 > cquadnd ("f", 0, 1, 1)
ans =  1.5708

The answer is obviously wrong (should be 1), and as far as I can tell  
you are using cquadnd in manner consistent with the documentation.  
Thus, it does look like a bug to me.

To report the bug, please go to the link below

	https://lists.sourceforge.net/lists/listinfo/octave-dev

Ben




More information about the Help-octave mailing list