I have a question regarding the calculation of the area in part of a circle with a resource gradient.
I have some trouble with figuring out how to do this, and unfortunately couldn't find this on google or in other questions.
The problem is as follows: I want to calculate the amount of resources in part of a circle, see the picture below.
Calculating the area is easy, if I assume the distances are in meters, this is:
r^2*(pi/360°*degrees-sin(degrees))
In this example:
1^2*(pi/360°*135°-sin(135°))=1.089729 m^2
However, I want to know the amount of resources (e.g. food or something like that) in this part of the circle. This is not constant, so it is not e.g. always 1 food item/m^2, in which case I could simply multiply the area by the resource density. Instead, it is a continuous gradient, from 0 food items/m^2 at the bottom to 1 food item/m^2 at the top.
To clarify: it is a continuous gradient, and therefore there can be 0 food items/m^2, 0.0001 food items/m^2, etc. The area is not divided into squares but continuous.
Of course, in this case, a much larger part of the circle has a low resource density, and only a small part has high resource density. If I could calculate the average, I would already be able to calculate the total amount of resources, but I cannot figure out how to do that.
Anyone who can help me with this? Would be much appreciated!
Be careful working with degrees and radians at the same time - it's either one or the other, and radians is certainly preferable.
Let's call the angle in your diagram subtended at the centre of the circle $\theta$. Let the area of the triangle be $A$ and the area of the segment above it $B$ and we have that radius, $r = 1$. Then we have:
$A + B = \frac{\theta}{2\pi} * \pi 1^{2} = \frac{\theta}{2}$
The area of a triangle is given by $\frac{1}{2}ABsin(c)$
$\Rightarrow A = \frac{1}{2} *1*1*sin(\theta)$
$A = \frac{sin\theta}{2}$
$B = \frac{1}{2} (\theta - sin\theta)$
In the example you gave, $\theta = \frac{3\pi}{4}$
$\Rightarrow B = 0.825$ (3s.f.)
Now moving on to the 'resources'. If we take the gradient to be $0$ at the bottom of the circle, then it is $0.5$ at the centre and $1$ at the top.
Let $A_{i}$ denote the number of resources in segment $A_{i}$.
Then $\delta A_{i} = (y_{i}+\delta y - y_{i})*2(1-y_{i}^{2})^\frac{1}{2}*\frac{1}{2}(y_{i}+\delta y + y_{i})$
Then let $A$ = the total number of resources in the semi-circle.
$A = lim_{y\rightarrow \infty}\sum_{i = 1}^{y}2y_{i}(1-y_{i}^{2})\delta y$
From the definition of an integral we then get as $\delta y \rightarrow 0$:
$A = \int_{\frac{1}{2}}^{1}\frac{2y}{(1-y^{2})^\frac{1}{2}} dy$
This then reduces to: $A = \frac{3\sqrt{3}}{8}$
I'm now stuck, but I think doing a similar approach by deriving an integral for the segment itself rather than the semi-circle would enable progress. I'm posting this so maybe you can get some ideas.