# Finding area of semi circle with simpson's rule?

This topic is 4476 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I've got a question where I have to find the area of a semi circle with the centre (2,0), radius 2 by using the Simpson's rule with 4 sub intervals. The problem is i'm having a hard time understanding how to use the simpsons rule. Would someone beable to explain it? thx

##### Share on other sites
Check out http://hepwww.ph.qmw.ac.uk/mcps/numint.html?desc=Numerical+Integration+techniques&file=numint.html

They have a pretty good explanation of how the simpson's rule is used.

##### Share on other sites
This may sound like a stupid question, but if the object is a semi-cirlce and the radius is known to be 2, then (apart from philosophical reasons) why bother with Simpson's rule at all?
What's wrong with: float A = 2.0f*2.0f*3.1415f;

##### Share on other sites
Quote:
 Original post by Damon ShamkiteThis may sound like a stupid question, but if the object is a semi-cirlce and the radius is known to be 2, then (apart from philosophical reasons) why bother with Simpson's rule at all?What's wrong with: float A = 2.0f*2.0f*3.1415f;

Because thats the area of a circle?

wouldnt float A = 2.0f*3.1415f; be the radius (or (pi*r*r)/2 )

##### Share on other sites
Quote:
 Original post by Damon ShamkiteThis may sound like a stupid question, but if the object is a semi-cirlce and the radius is known to be 2, then (apart from philosophical reasons) why bother with Simpson's rule at all?What's wrong with: float A = 2.0f*2.0f*3.1415f;

If you want to implement Simpson's rule, how would you test that you are getting reasonable results? I would try to measure the area of some figure for which there is an explicit formula, so I have something to compare my resuts to. Of course, you need to get the formula right. :)

##### Share on other sites
Quote:
 Original post by Damon ShamkiteWhat's wrong with: float A = 2.0f*2.0f*3.1415f;

This is based on the maths equation A = pi * r^2. But remember that this would work out the area for the entire circle. For example:

Finding the area of a circle with radius of 5cm would mean that using the formula the following answer would be reached:

A = pi * r^2
= pi * 5 x 5
= pi * 25
= 79 cm^2

=====================================================================

This will work out the area for the entire circle. For the area of half of the circe, just half the area.

=====================================================================

In the most evil scenario of circles, you may have to work out only a sector of a circle. The area for that equation is as follows:

A = (angle of sector / 360) * (pi * r^2)

So that for a 45 degree slice of the circle above would give the answer:

A = (angle of sector / 360) * (pi * r^2)
= (45 / 360) * (pi * 5^2)
= 0.125 * (pi * 25)
= 9.8175 cm^2

This can be proved to be correct as 9.8175 * 8 (for the whole circle) is 79 cm^2

=====================================================================

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 10
• 11
• 13
• 9
• 11
• ### Forum Statistics

• Total Topics
634089
• Total Posts
3015458
×