8
$\begingroup$

I am trying to approximate the following expression for values of $m$ close to 0 and for values large values of $Ne$ ($m$ is bounded between 0 and 1 and $Ne$ is a positive integer)

$$X=-\frac{(m-1)^2}{2 m^2 \text{Ne}-m^2-4 m \text{Ne}+2 m-1}$$

I tried

Normal[Series[-((-1 + m)^2/(-1 + 2 m - m^2 - 4 m Ne + 2 m^2 Ne)), {m, 
   0, 1}]]

and also

Normal[Series[-((-1 + m)^2/(-1 + 2 m - m^2 - 4 m Ne + 
      2 m^2 Ne)) /. {m -> a/Ne}, {a, 0, 1}]] /. {a -> m Ne}

and both returned

$$1-4 m Ne$$

However $1-4 m Ne$ is actually a very poor approximation. The approximation of this expression is a classic result in population genetics. The approximation I am trying to reach is $\frac{1}{1+4 m Ne}$. $\frac{1}{1+4 m Ne}$ is indeed a good approximation as seen visually

Manipulate[
 Plot[{1 - 4 m Ne, 1/(
   1 + 4 Ne m), -((-1 + m)^2/(-1 + 2 m - m^2 - 4 m Ne + 
     2 m^2 Ne))}, {m, 0, 0.1}, PlotRange -> {{0, 0.1} {0, 0.1}}, 
  PlotStyle -> {Green, Red, Black}], {Ne, 1*^3, 1*^4}]

enter image description here

red line is $\frac{1}{1+4 m Ne}$, green is $1-4 m Ne$ (that returns negative values for most of the range of $m$ values) and the black line is the function that I am trying to approximate.

Can you help me to approximate this expression?

$\endgroup$
  • $\begingroup$ I gave a computational way to arrive at the result in my answer, but I'm curious, why not just type 1/(1 + 4 m Ne)? $\endgroup$ – Michael E2 Aug 17 '16 at 0:39
  • $\begingroup$ because, I am trying to learn to make approximations. I did not know about Pade approximation technic. You say it is a "computational way", but it is not a numerical approximation (but an analytical one), right? $\endgroup$ – Remi.b Aug 17 '16 at 0:43
  • $\begingroup$ By "computational" I meant computed (analytically) from the function by Mathematica, instead of typing out the expression based on math knowledge that you personally have. $\endgroup$ – Michael E2 Aug 17 '16 at 1:08
7
$\begingroup$

Perhaps this?

PadeApproximant[-((-1 + m)^2/(-1 + 2 m - m^2 - 4 m Ne + 2 m^2 Ne)), {m, 0, {0, 1}}]
(*  1/(1 + 4 m Ne)  *)

Note: A Taylor series is a power series, so one cannot hope for a rational approximation in the form sought. Note also that 1 - 4 m Ne is the Taylor series approximant to the Padé approximant above.

$\endgroup$
  • $\begingroup$ I did not know about Pade approximation technic. Thanks +1. I don't know how you made the decision about the orders in the numerator and denominator but I suppose I'll have to further my understanding of Pade approximation to understand that, right? $\endgroup$ – Remi.b Aug 17 '16 at 0:47
  • 1
    $\begingroup$ @Remi.b Since the degrees of m in the numerator/denominator of the desired solution are 0/1 respectively, {0, 1} seems like the best thing to try first, yes? Wikipedia gives a pretty good summary of Padé approximation. $\endgroup$ – Michael E2 Aug 17 '16 at 1:10
3
$\begingroup$

If you inverse the given function, and inverse it's Taylor approximation, you would achieve a better approximation. it seems that the extreme changes around zero makes it unsuitable for Taylor expansion.

1/Normal[Simplify@Series[1/-((-1 + m)^2/(-1 + 2 m - m^2 - 4 m Ne + 2 m^2 Ne)), {m, 0,1}]] 

    (* 1/(1+4 m Ne)*)

Here is the verification of first order and second order approximations derived by this technique:

Manipulate[
 Plot[{-((-1 + m)^2/(-1 + 2 m - m^2 - 4 m Ne + 2 m^2 Ne)), 1/(
   1 + 4 m Ne), 1/(1 + 4 m Ne + 6 m^2 Ne)}, {m, 0, 0.1}, 
  PlotRange -> {{0, 0.1} {0, 0.1}}, 
  PlotStyle -> {Green, Red, Black}], {Ne, 1*^3, 1*^4}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.