12.07.2015 Views

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

integration 127✞/ / Trap . java trapezoid−rule integration of parabola☎public class Trap {public static final double A = 0. , B =3.; / / Constant endpointspublic static final int N = 100; // N points (not intervals )public static void main ( String [] args ) { / / Main does summationdouble sum , h , t , w;int i;h = (B − A) /(N − 1) ; // Initializationsum = 0 . ;for ( i=1 ; i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!