Results 1 to 1 of 1

Math Help - Mathmatica help, Riemann Sums

  1. #1
    Junior Member
    Joined
    Oct 2009
    Posts
    29

    Mathmatica help, Riemann Sums

    Let f(x)=100 (x-1)^3e^-x^2.
    We want to approximate the value of the integral f(x) from .6 to 1.5

    (a) Using Mathematica, create a table of the Simpson's Rule approximations for each of the following n: 3, 6, 12, 24, 48, 96, 192. You should be able to alter the code above to make these.


    These codes were given:

    Grid[Join[{{TextCell["Nints"], TextCell["Ln"]}}, Table[a = 1;
    b = 2; dx = (b - a)/Nints;
    x[i_] = a + i*dx; {Nints,
    N[Sum[f[x[i]]*dx, {i, 0, Nints - 1}]]}, {Nints, {2, 4, 8, 16,
    32, 64, 128,
    256}}]], Frame -> All]

    OR

    a = .6;
    b = 1.5;
    n = 192;
    Deltax = (b - a)/n;
    xmid[i_] = a + ((i + (i - 1))/2) Deltax;
    Table[xi[i], {i, 0, n - 1}]
    Sum[f[xmid[i]]*Deltax, {i, 1, n}]
    N[%]

    But, I have no idea how to manipulate it so that it makes a table of Simpson's Rule values.

    I started out with:

    [B]Grid[Join[{{TextCell["Nints"], TextCell["Ln"]}}, Table[a = .6;
    b = 1.5; dx = (b - a)/Nints;
    x[i_] = a + i*dx; {Nints,
    N[Sum[f[x[i]]*dx, {i, 0, Nints - 1}]]}, {Nints, {3, 6, 12, 24, 48, 96, 192}}]], Frame -> All]

    How do I manipulate this code so that it will correspond to the riemann sum formulas? It's more of laying out the notation. It's hard to look at math this way.


    Help very much appreciated.
    Last edited by Kimmy2; December 2nd 2009 at 03:02 PM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Riemann Sums
    Posted in the Calculus Forum
    Replies: 7
    Last Post: September 4th 2010, 04:14 PM
  2. YAY - Riemann Sums!!
    Posted in the Calculus Forum
    Replies: 2
    Last Post: December 2nd 2008, 11:55 AM
  3. riemann sums
    Posted in the Calculus Forum
    Replies: 4
    Last Post: October 8th 2008, 07:47 PM
  4. Riemann Sums
    Posted in the Calculus Forum
    Replies: 4
    Last Post: April 10th 2008, 01:00 PM
  5. Riemann Sums and Riemann Integrals
    Posted in the Calculus Forum
    Replies: 1
    Last Post: October 1st 2006, 02:08 PM

Search Tags


/mathhelpforum @mathhelpforum