program to numerically integrate

Discussion in 'C++' started by rockwell, Sep 24, 2004.

  1. rockwell

    rockwell Guest

    Hi groups i want to write a program ro numerically integrate an
    equation using the rectangle method,i know a little bit about the
    rectangle method but never used it abd dont quite really know how to
    program it.if you guys know how to do it, can you help me out.
    the equation looks like

    eq = ∫ sin(θ*Π) / cos(2*Π*θ) ,the
    integration is from 0 to 1000.

    Thanks in advance,
    Bye
     
    rockwell, Sep 24, 2004
    #1
    1. Advertisements

  2. Post the effort you made, and someone will help you with it. No-one is going
    to do your homework for you, you would not learn anything that way so it
    wouldn't be good for anyone.

    john
     
    John Harrison, Sep 24, 2004
    #2
    1. Advertisements

  3. eq = x^2
    integration from 0 to 100
    So, basically you make smal stips of let's say 0.01 width and
    calculate the area of this strip.

    di = (value_left + value_right) / 2 * detla_width;

    Then you only sum it up.

    HTH,
    Gernot
     
    Gernot Frisch, Sep 24, 2004
    #3
  4. rockwell

    JKop Guest

    Gernot Frisch posted:
    Gernot, I'd prefer if you wouldn't fully answers people's
    questions like that when they've shown no effort at all,
    especially when it looks like a homework question.

    Rockwell, if you want me to do your homework for you, head
    to rentacoder.com and I'll do it for a nominal fee.

    But if you want some help with C++, make an effort and I'll
    be more than willing to share what I know (and can do).


    -JKop
     
    JKop, Sep 24, 2004
    #4
  5. I just explained how to do it. I didn't post any line of code. I think
    it's fair to explain _how_ things work for a homework. Because
    understanding how it works is the aim of a homework.
     
    Gernot Frisch, Sep 24, 2004
    #5
  6. rockwell

    JKop Guest

    Gernot Frisch posted:


    I suppose...


    -JKop
     
    JKop, Sep 24, 2004
    #6
  7. rockwell

    Smith Guest

    JKOP,
    go back to your java group. we don't need java cop jkop jgop or whatever,
    things like you are not appropriate in comp.lang.c++ group. especially for
    bagging money. back to your NULL land.

    Gernot is right.
     
    Smith, Sep 25, 2004
    #7
  8. rockwell

    JKop Guest

    Smith posted:

    Disgusting grammar.

    Really Smith, I'd love to help you here on this one, but I don't know Java,
    nor can I comprehend how a person could possibly be not appropriate in a
    newsgroup. "NULL land" doesn't exist, that's just where Mammy tells you
    Daddy's gone.


    -JKop
     
    JKop, Sep 25, 2004
    #8
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.