473,387 Members | 1,528 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

program to numerically integrate

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
Jul 22 '05 #1
7 2470

"rockwell" <ro**********@yahoo.com> wrote in message
news:6b**************************@posting.google.c om...
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
Jul 22 '05 #2

"rockwell" <ro**********@yahoo.com> schrieb im Newsbeitrag
news:6b**************************@posting.google.c om...
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
Jul 22 '05 #3
Gernot Frisch posted:

"rockwell" <ro**********@yahoo.com> schrieb im Newsbeitrag news:6b**************************@posting.google.c om...
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
Jul 22 '05 #4

"JKop" <NU**@NULL.NULL> schrieb im Newsbeitrag
news:Nu*******************@news.indigo.ie...
Gernot Frisch posted:

"rockwell" <ro**********@yahoo.com> schrieb im

Newsbeitrag
news:6b**************************@posting.google.c om...
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.
Jul 22 '05 #5
Gernot Frisch posted:

"JKop" <NU**@NULL.NULL> schrieb im Newsbeitrag
news:Nu*******************@news.indigo.ie...
Gernot Frisch posted:

"rockwell" <ro**********@yahoo.com> schrieb im Newsbeitrag news:6b**************************@posting.google.c om...
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
Jul 22 '05 #6
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" <NU**@NULL.NULL> дÈëÓʼþ
news:x6*******************@news.indigo.ie...
Gernot Frisch posted:

"JKop" <NU**@NULL.NULL> schrieb im Newsbeitrag
news:Nu*******************@news.indigo.ie...
Gernot Frisch posted:
"rockwell" <ro**********@yahoo.com> schrieb im Newsbeitrag news:6b**************************@posting.google.c om...
> 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

Jul 22 '05 #7
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
Jul 22 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: A.T. | last post by:
Am trying to sort the following file with the <xsl:sort> function, but can't get it to work properly. Would like the id column sorted according both alphabetically & numerically. (e.g. A-01, A-02,...
7
by: Federico G. Babelis | last post by:
Hi All: I have this line of code, but the syntax check in VB.NET 2003 and also in VB.NET 2005 Beta 2 shows as unknown: Dim local4 As Byte Fixed(local4 = AddressOf dest(offset)) ...
8
by: Saputra | last post by:
Does anyone know how to sort a data view numerically? By default, when you sort a field from a table in a database, it sorts it in alpha-numerical order. In MS Access, sort is by alpha-numeric,...
0
by: Paul McGuire | last post by:
My son showed me this Flash game, Orbit (there are *many* links on the web out there for it, here's one for the Google-challenged: http://uploads.ungrounded.net/250000/250408_orbit.swf), and it is...
2
by: pdmountaineer | last post by:
hi, I am writing a C program and I would like to integrate some executables (.EXE files) from my C program. Is this possible and how should one do this exactly? kind regards
3
by: pdmountaineer | last post by:
hi, I would like to integrate some executable files (.EXE files) into a new C program. Is this possible and if so, how should it be done exactly??? kind regards
7
by: analfabete | last post by:
Hi, I begin in python program and I would like to know how I can do to integrate Internet Explorer into my python program without titlebar statusbar etc... Just with the main windows (windows which...
0
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi all, I have a "connected" datagridview that uses a bindingsource/datatable to load the grid and update the user's modifications to the database. I have a column that is set in the database...
15
by: Peng Yu | last post by:
Hi, Suppose T is 'float' or 'double'. T x; x < 10 * std::numeric_limits<T>::epsilon(); I can use the above comparison to test if 'x' is numerically zero. But I'm wondering what should be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.