I’m posting this as a means of remembering rather than sharing but if you find it useful then all the better.

So, here is the problem to be solved.  I needed to calculate, as a percentage of the total area under the sine wave, the area of the shaded region.

Curve

Ok, first step is to calculate t1 and t2 (for simplification of the calculations I assume an amplitude of 1 and a frequency of 1Hz).

t1 = asin B/A

t2 = Pi – t1

Ok, next I determined the area under the curve between t1 and t2 and then took away the area of the rectangle below the shaded area.  The resulting equation is: –

Equation

The result of this equation is then divided by the total area under the curve between t=0 and t=Pi (which is 2) to give the percentage of the shaded area.

I’m @craigt44 on Twitter.

Advertisements