22.04.2015 Views

Numerical Integration

Numerical Integration

Numerical Integration

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Trapezoidal Code (p.3)<br />

double FUN(double x) // User supplied function<br />

{<br />

return 0.2 + 25*x - 200*x*x + 675*x*x*x - 900*x*x*x*x<br />

+ 400*x*x*x*x*x;<br />

}<br />

int main()<br />

{<br />

<strong>Integration</strong> I(FUN,0,0.8);<br />

0 int i;<br />

for(i=1;i

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

Saved successfully!

Ooh no, something went wrong!