+1(316)4441378

+44-141-628-6690


Warning: Use of undefined constant woothemes - assumed 'woothemes' (this will throw an Error in a future version of PHP) in /home/admin/web/qualityessayresearch.com/public_html/wp-content/themes/cushy/archive.php on line 47
Archive for the ‘coding/numerical analysis’
Warning: Use of undefined constant woothemes - assumed 'woothemes' (this will throw an Error in a future version of PHP) in /home/admin/web/qualityessayresearch.com/public_html/wp-content/themes/cushy/archive.php on line 47
Category

Romberg integration code

Write a program that numerically computes the integral of any given continuous function using Romberg integration. You may hardcode the to-be-integrated function in your program, but it should only appear once in your code, so its easy to change to a different function. Likewise for the endpoints of the interval of integration and error tolerance.

You may use any common programming language, such as Python, C/C++, Java.

I've posted the spreadsheet (attached) where I demoed Romberg integration; the output of your program should look like that table. You should also run your program on at least one integral for which you "can't" do analytically to see if it works. (Integral of e^(-x^2/2) over any finite interval is a good one if you can't think of another one you like.