Integrate Issues



On 2013-05-29, Ben Blomberg <bblomberg at mail.bradley.edu> wrote:

> "Is 1554208430 phi + 1459173 %pi zero or non zero?".

My guess is that this originates from trying to determine if some
expression with floating point values is equal to zero. Somewhere along
the way a float is being rationalized.

> phi is a variable I plot over with values from 0 to 0.0015. x is my
> variable of integration. everything else (eigenfunctionsort, hbar1,
> c1, dp etc...) has a numerical value.

My advice is to avoid floats -- e.g. instead of 0.0015, write 15/10000
instead.

> *for n:1 thru 11 do for j:1 thru 21 do
> v[n,j]:1/sqrt(dp)*(sum(eigenfunctionsort[n,j][m+11]*exp(%i*2*%pi*m*x/dp),m,-10,10));
> *
> *
> *
> *define(P(a,b),integrate( v[6,1]*exp((-%i)*(10)*phi/(hbar1*c1)*x),x,a,b));*
> *plot2d((((1/sqrt(dp))*P(-dp/2,dp/2))^2),[phi,0,0.0015]);*

What is the value of P(-dp/2, dp/2) ?

best

Robert Dodier