<br><br><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="h5"><br>
><br>
> Thanks. I like your insistance in that discussion, Sam.<br>
><br>
> Although a "known-limitation-of-current-algorithm" might be a correct<br>
> description of the current algorithm, it nevertheless does not help<br>
> much when one wants the algorithm to give the correct solution and<br>
> observes that a guy like Wolfram has apparently has done something<br>
> about this issue: for y given function, Scilab's intg/integrate gives<br>
> ok value for bounds (-50,50), but screws up for (-100,100) and larger<br>
> bounds, which I consider still pretty narrow. On the contrary, Wolfram<br>
> Alpha<br>
><br>
> <a href="http://www.wolframalpha.com/input/?i=integration&a=*C.integration-_*Calculator.dflt-&f2=%281%2Fsqrt%282*pi%29%29*log%28abs%281%2B.1*x%29%29*exp%28-%28x" target="_blank">http://www.wolframalpha.com/input/?i=integration&a=*C.integration-_*Calculator.dflt-&f2=%281%2Fsqrt%282*pi%29%29*log%28abs%281%2B.1*x%29%29*exp%28-%28x</a>^2%29%2F2%29&x=0&y=0&f=Integral.integrand_%281%2Fsqrt%282*pi%29%29*log%28abs%281%2B.1*x%29%29*exp%28-%28x^2%29%2F2%29&f3=-infinity&f=Integral.rangestart_-infinity&f4=%2Binfinity&f=Integral.rangeend_%2Binfinity&a=*FVarOpt.1-_**-.***Integral.variable---.**Integral.rangestart-.*Integral.rangeend---<br>

><br>
> gives ok values for bounds (-50,50), (-100,100), (-1000,1000) and it<br>
> allows to directly use infinite bounds and get ok result (interim<br>
> bounds like (-1e9,1e9) are not ok). I consider this a superior<br>
> solution. If Wolfram can, why shouldn't Scilab try? The status quo<br>
> might hurt Scilab's reputation in the domain in long run.<br>
><br>
> Gin.<br>
<br>
On Tue, May 24, 2011 at 12:07 PM, Calixte Denizet <span dir="ltr"><<a href="mailto:calixte@contrib.scilab.org">calixte@contrib.scilab.org</a>></span> wrote:<br>Hi Ginters,<br>
<br>
You could use something like:<br>
subintlen=1;<br>
xmin=-1e2;<br>
xmax=1e2;<br>
out=0;<br>
l=list(f,1,.1);// to avoid to create again the list<br>
for i=xmin:subintlen:(xmax-subintlen);out=out+intg(i,i+subintlen,l);end;<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
out<br>
<font color="#888888"><br>
Calixte</font></blockquote><br>
<br>
</div></div></blockquote>This is a natural, direct treatment of the problem and seems absolutely sufficient for my current applications.<br>Thanks to all.<br><br>Gin.<br>
</div><br>