I am currently doing some work on modelling the effects of treated nets usage on mosquito populations. Nets do not retain their maximum efficacy forever. They lose their chemical efficacy after about three years and all that is left is the physical protection offered by the net which I estimate to be 20% of the original efficacy.

I am trying to model this behaviour. I need continuous function over the interval $[0,1095]$ which decreases slowly from 1 when $x=0$ and asymptotically approaches 0.2 when $x \rightarrow 1095 $.

I tried an ellipse of the form $y=\sqrt{1-\dfrac{x^2}{(1095)^2}}$, but i realized the function is equal to zero when $x=1095$ which is not what i want.

Any help will be appreciated. Thank you.

  • $\begingroup$ This is more suited for math-SE. The term "asymptotically" is used to denote value that will be reached in $x\to \infty$. You can rather ask for a condition in which the system reaches within 99% of the desired value i.e. 0.2 at $x=1095$. $\endgroup$
    Commented Jun 17, 2015 at 9:17
  • $\begingroup$ Can you describe the shape you are after more clearly, and what you mean with "continuouos cap shaped function"? Would a simple negative exponential function similar to $y(x) = e^{-bx+c}+0.2$ be insufficient? Do you have data that will be used to fit the parameters of the function? $\endgroup$ Commented Jun 17, 2015 at 9:26
  • $\begingroup$ @WYSIWG, I agree the word asymptotic is not appropriate. What I meant was a concave function which has value 1 at $x=0$, and has a value of 0.2 at $x=1095$, beyond 1095, the function should not have a value below 0.15. $\endgroup$
    – Ozymandais
    Commented Jun 17, 2015 at 10:22
  • 1
    $\begingroup$ @fileunderwater I meant a concave function. I have no data to fit the parameters. I am hoping to generate a function such that the net loses efficacy gradually to about $65\%$ in two years, then the chemical protection ebbs completely over the last year. The remaining protection level is $20\%$ of the original protection. $\endgroup$
    – Ozymandais
    Commented Jun 17, 2015 at 10:27
  • 2
    $\begingroup$ I'm voting to close this question as off-topic because it is about mathematical functions and does not involve any biological principle. Moreover, many functions can be constructed that can fulfil OP's criteria and hence this question is broad. $\endgroup$
    Commented Jun 17, 2015 at 11:37

1 Answer 1


As @WYSIWYG suggested, this is probably more suitable for Math-SE.

From you question, it is unclear exactly what shape you are looking for, and there are many functions that could describe the behaviour you're after, i.e. a continuous, smooth decrease towards an asymptote. However, two possible options could be the negative exponential and a negative gompertz function. Possible forms of these could be:

Negative exponential


where $b=0.2$ and a is a rate parameter.

Negative Gompertz

$y(x) = 1-\alpha e^{-\beta e^{-\gamma x}},$

where $\alpha=0.8$ (describing the asymptote), $\beta$ in an inflection parameter (given a displacement along the x-axis), and $\gamma$ is a rate parameter.

These functions can give results such as: enter image description here

In these examples, $a = 0.005$ for the negative exponential and $\beta = 150$, $\gamma = 0.008$ for the gompertz v1 and $\beta = 5$, $\gamma = 0.005$ for the gompertz v2.

An alternative parametrization of the Gompertz, which might be easier to understand, is:

$y(x) = 1-\alpha e^{-e^{-\gamma (x-\beta)}},$

where the inflection point ($\beta$) is directly related to the scale of the x-axis (so $\beta = 400$ would give an inflection at x = 400).

Are these examples interesting for your application? Hopefully they can provide a starting point for you.

  • $\begingroup$ I think the OP is looking for a concave-down function with no inflections. $\endgroup$
    – canadianer
    Commented Jun 17, 2015 at 11:32
  • $\begingroup$ @fileunderwater the gompertz look very interesting, v2 especially. Could you please explain to me how the various parameter affect the concavity of the curve? $\endgroup$
    – Ozymandais
    Commented Jun 17, 2015 at 11:32
  • $\begingroup$ @canadianer I thought so as well, but this will be very hard to achieve continuously if the loss during the first two years is only 35% and the rest (down to 20% protection) is lost in the last year $\endgroup$ Commented Jun 17, 2015 at 11:36
  • $\begingroup$ @Ozymandais the parameters $\beta$ and $\gamma$ interact to produce the shape. If you increase $\gamma$ the loss is more rapid (almost a step function if $\gamma$ is very large), and $\beta$ sets the inflection point of the function. $\endgroup$ Commented Jun 17, 2015 at 11:38
  • $\begingroup$ Actually one can make many functions that can fulfil the criteria. Because the OP has just mentioned the initial and final behavior of the function, there can be infinitely many shapes. For example one can use a linear combination of polynomials. $\endgroup$
    Commented Jun 17, 2015 at 11:40

Not the answer you're looking for? Browse other questions tagged .