Hello,

We ran into this problem today during our class.  It appears that the 'int' command truncates Pi at a different digit than we have set, which changes our answer. We expect the orthogonality of the two sin(Pi*x) functions, but there is a sensitive truncation error that we would like to get to the bottom of.

Here is the code:

> Digits:=10;

This is what we expect:

> evalf(int(x*sin(Pi*x)*sin(Pi*x),x=0..1));

0.2500000000

But, when we enter in our function, we get this:

> evalf(int(x*sin(Pi*x)*sin(3.141592653*x),x=0..1));
0.004074626508


Does anyone know why these are different, or what I could do to avoid this in the future? Thank you in advance,

 

mw99aj


Please Wait...