# Sex Allocation in Solitary Bees and Wasps

## The Objective Functions to Minimize

To get the equation that Frank cites on page 317, we can minimize either of the following functions:

${\displaystyle F(\lambda )=\int _{0}^{\lambda }f(y)h(y)dy\int _{\lambda }^{1}g(y)h(y)dy}$

or

${\displaystyle E(\lambda )=\ln(F(\lambda ))=\ln \left(\int _{0}^{\lambda }f(y)h(y)dy\right)+\ln \left(\int _{\lambda }^{1}g(y)h(y)dy\right)}$

F is probably the more intuitive function: we can see that there's a trade-off point, ${\displaystyle \lambda }$, at which we switch from producing males to producing females. If we think of the two function ${\displaystyle f(x)}$ and ${\displaystyle g(x)}$ as "value" functions, with ${\displaystyle f(x)\geq g(x)}$ over the interval ${\displaystyle x\in [0,1]}$, and ${\displaystyle h(x)}$ as the probability density of the resources distribution (taken as a beta density by Frank), then we're saying that we want to maximize the product of the value of the males along with the value of the females. If we take ${\displaystyle \lambda =0}$ or ${\displaystyle \lambda =1}$, ${\displaystyle F(0)=F(1)=0}$; because ${\displaystyle F(x)\geq 0}$, we know that there is a maximum on the interior of the interval ${\displaystyle [0,1]}$.

If we differentiate either expression, we will ultimately obtain the equation that Frank cites in his text:

${\displaystyle {\frac {f(\lambda )}{\int _{0}^{\lambda }f(y)h(y)dy}}={\frac {g(\lambda )}{\int _{\lambda }^{1}g(y)h(y)dy}}}$

which we can then solve for ${\displaystyle \lambda }$, given the functions f, g, and h.

${\displaystyle F(\lambda )}$ can be normalized without changing the maximizing value of ${\displaystyle \lambda }$: hence we could use instead

${\displaystyle F(\lambda )={\frac {\int _{0}^{\lambda }f(y)h(y)dy\int _{\lambda }^{1}g(y)h(y)dy}{\int _{0}^{1}f(y)h(y)dy\int _{0}^{1}g(y)h(y)dy}}=\left({\frac {\int _{0}^{\lambda }f(y)h(y)dy}{f_{T}}}\right)\left({\frac {\int _{\lambda }^{1}g(y)h(y)dy}{g_{T}}}\right)}$;

hence we can think of ${\displaystyle F(\lambda )}$ as the product of the fraction of male value achieved by ${\displaystyle \lambda }$ and the fraction of female value achieved from ${\displaystyle \lambda }$ on out to the total resource allocation.

## The Minimization with Specific f, g, and h

Assume that ${\displaystyle f(x)=x^{r}}$, ${\displaystyle g(x)=x}$, and ${\displaystyle h(x)=\kappa x^{a}(1-x)^{a}}$.

We expand ${\displaystyle I=\int y^{s}y^{a}(1-y)^{a}dy=\int y^{s}y^{a}\left(\sum _{n=0}^{a}{n \choose k}(-1)^{n}y^{n}\right)dy}$

or

${\displaystyle I=\sum _{n=0}^{a}{n \choose k}(-1)^{n}\int y^{n+a+s}dy=\sum _{n=0}^{a}{n \choose k}(-1)^{n}{\frac {y^{n+a+s+1}}{n+a+s+1}}|}$

Given our choices of f and g, we want to evaluate

${\displaystyle I_{f}=\sum _{n=0}^{a}{n \choose k}(-1)^{n}{\frac {y^{n+a+r+1}}{n+a+r+1}}|_{0}^{\lambda }=\sum _{n=0}^{a}{n \choose k}(-1)^{n}{\frac {\lambda ^{n+a+r+1}}{n+a+r+1}}}$

and

${\displaystyle I_{g}=\sum _{n=0}^{a}{n \choose k}(-1)^{n}{\frac {y^{n+a+2}}{n+a+2}}|_{\lambda }^{1}=\sum _{n=0}^{a}{n \choose k}(-1)^{n}{\frac {1-\lambda ^{n+a+2}}{n+a+2}}}$

Now the equation that we're to solve for ${\displaystyle \lambda }$ can be written ${\displaystyle \lambda ^{r}I_{g}=\lambda I_{f}}$ which we can reduce by dividing by ${\displaystyle \lambda ^{r}}$ (since ${\displaystyle \lambda =0}$ is not a maximum); thus our equation becomes ${\displaystyle I_{g}-\lambda ^{1-r}I_{f}=0}$, or

${\displaystyle P(\lambda )=\sum _{n=0}^{a}{n \choose k}(-1)^{n}\left({\frac {1-\lambda ^{n+a+2}}{n+a+2}}-\lambda ^{1-r}{\frac {\lambda ^{n+a+r+1}}{n+a+r+1}}\right)=0}$

or

${\displaystyle P(\lambda )=\sum _{n=0}^{a}{n \choose k}(-1)^{n}\left({\frac {1-\lambda ^{n+a+2}}{n+a+2}}-{\frac {\lambda ^{n+a+2}}{n+a+r+1}}\right)=0}$

or

${\displaystyle P(\lambda )=\sum _{n=0}^{a}{n \choose k}(-1)^{n}\left({\frac {1}{n+a+2}}-\lambda ^{n+a+2}\left({\frac {1}{n+a+2}}+{\frac {1}{n+a+r+1}}\right)\right)=0}$

Here's a little script that shows some of those functions P.