Hello everyone, I'm having a difficult time making a calculus equation for my programming assignment. This is a intermediate programming class and I currently am in college algebra. Apparently this class uses calculus that wasn't in the pre req, the instructor said that this is college algebra yet I'm struggling with it. Here is the question.
You are the game warden in your town and are responsible for stocking the local lake
(see Figure 1) prior to the opening of the fishing season. The average depth of the lake is
20 feet. Your plan is to stock the lake with 1 fish per 1000 cubic feet, and have
approximately 25% of the original fish population remaining at the end of the season.
What is the maximum number of fishing licenses that can be sold if the average catch is
20 fish per license?
Figure 1
http://i995.photobucket.com/albums/af77/mrboggies/figure1_zpsbfb3e5fc.png
-from learning simpsons rule by myself I noticed that it must be even yet there are 9 points in figure 1, does this pose a problem?
Hint
You will have to compute the volume of the lake, since the criterion for stocking is 1 fish
per 1000 ft3
. Volume can be computed as Area × Depth. The area can be computed
using calculus. In particular, use Simpson’s Rule to compute the area. Recall we can
compute the area under a curve using Simpson’s Rule as follows.
http://www.mathwords.com/s/simpsons_rule.htm
(example from the web as the equation wouldnt copy and paste correctly)
where h=(b-a)/n = 200 ft, n is an even number (8 in our problem), and the yi (i=0, 1, …)
are data elements read from a file.
I understand the coding as it must retrieve data from a txt file and then run through the equation by function and once the function outputs the value,
-it needs to be multiplied by 25%
-then have that added to the current value
-then divided by 20 as in 20 fish per license.
-then output to the screen as in maximum number of licenses allowed,
Can anyone help me figure the equation out? It would be greatly appreciated. I only got so far from youtube videos and online tutorials as I dont fully understand Simpson’s Rule. Thank you.