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. Advertising

  2. "rockwell" <> wrote in message
    news:...
    > 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


    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. Advertising

  3. "rockwell" <> schrieb im Newsbeitrag
    news:...
    > 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


    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:

    >
    > "rockwell" <> schrieb im

    Newsbeitrag
    > news:...
    >> 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

    >
    > 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, 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. "JKop" <> schrieb im Newsbeitrag
    news:NuQ4d.31901$...
    > Gernot Frisch posted:
    >
    >>
    >> "rockwell" <> schrieb im

    > Newsbeitrag
    >> news:...
    >>> 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

    >>
    >> 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, 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).


    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:

    >
    > "JKop" <> schrieb im Newsbeitrag
    > news:NuQ4d.31901$...
    >> Gernot Frisch posted:
    >>
    >>>
    >>> "rockwell" <> schrieb im

    Newsbeitrag
    >>> news:...
    >>>> 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*Π*&#

    952;) ,the
    >>>> integration is from 0 to 1000.
    >>>>
    >>>> Thanks in advance,
    >>>> Bye
    >>>
    >>> 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, 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).

    >
    > 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.
    >




    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.




    "JKop" <> дÈëÓʼþ
    news:x6R4d.31913$...
    > Gernot Frisch posted:
    >
    > >
    > > "JKop" <> schrieb im Newsbeitrag
    > > news:NuQ4d.31901$...
    > >> Gernot Frisch posted:
    > >>
    > >>>
    > >>> "rockwell" <> schrieb im

    > Newsbeitrag
    > >>> news:...
    > >>>> 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*Π*&#

    > 952;) ,the
    > >>>> integration is from 0 to 1000.
    > >>>>
    > >>>> Thanks in advance,
    > >>>> Bye
    > >>>
    > >>> 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, 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).

    > >
    > > 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.
    > >

    >
    >
    >
    > I suppose...
    >
    >
    > -JKop
     
    Smith, Sep 25, 2004
    #7
  8. rockwell

    JKop Guest

    Smith posted:

    > 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.



    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. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. A.T.
    Replies:
    3
    Views:
    798
    Richard Light
    Jul 29, 2004
  2. Replies:
    2
    Views:
    317
    Peter Shaggy Haywood
    Apr 12, 2006
  3. Peng Yu
    Replies:
    14
    Views:
    657
    James Kanze
    Sep 15, 2008
  4. mickey

    Sort keys in a hash numerically

    mickey, Aug 8, 2006, in forum: Perl Misc
    Replies:
    5
    Views:
    231
    -berlin.de
    Aug 11, 2006
  5. Replies:
    4
    Views:
    154
    Ted Zlatanov
    Jul 18, 2008
Loading...

Share This Page