(1 − z) / (1 + z)

“I keep running into the function f(z) = (1 − z)/(1 + z).” I wrote this three years ago and it’s still true.

This function came up implicitly in the previous post. Ramanujan’s excellent approximation for the perimeter of an ellipse with semi-axes a and b begins by introducing

λ = (ab)/(a + b).

If the problem is scaled so that a = 1, then λ = f(a). Kummer’s series for the exact perimeter of an ellipse begins by introducing the same variable squared.

As this post points out, the function f(z) comes up in the Smith chart from electrical engineering, and is also useful in mental calculation of roots. It also comes up in mentally calculating logarithms.

The function f(z) is also useful for computing the tangent of angles near half a right angle because

tan(π/4 − z) ≈ f(z)

with an error on the order of z³. So when z is small, the error is very, very small, much like the approximation sin(x) ≈ x for small angles.

2 thoughts on “(1 − z) / (1 + z)

  1. John,
    Good insight! everyone knows sin approx, I had not come across the tan approx.

    … computing the tangent of angles near a right angle
    should be
    … computing the tangent of angles near a HALF right angle (45 degrees)

    Also the error in sin(z) is approx parabola (>0, with minimum at z=0), whereas error in tan(π/4 – z) is approx cubic (stationary inflection at z=0) The tan(π/4 – z) approx has a better relative error than the sin(z) approximation.

    Ian

    Using J (https://jsoftware.com)
    where z is integers -20 to 20 divided by 100

    z =. 0.01 * i: 20
    plot (] ; [: (-/ % {.) (-. % >:) ,: 3 o. 0.25p1&-) z
    and
    plot (] ; [: (-/ % {.) ] ,: 1&o.) z
    produces plots of tan relative error and sin relative error.

    Where (-/ % {.) gives relative error
    – corresponding diff ( -/ ) divided by first ( {. )
    and (-. % >:) gives f(z) = (1-z) % (1+z)
    and 1 o. x gives first circular fn (sin) of x
    and 3 o. x gives third circular fn (tan) of x
    and 0.25p1 is constant one quarter times π to the power 1

  2. Thanks Ian. The error in approximating sin(x) by x is O(x^3) because sine is an odd function and so the even terms of the power series drop out. But the relative error is O(x^2).

    With the tangent approximation, both the absolute and relative error are O(x^3) because tan(pi/4) is non-zero.

Leave a Reply

Your email address will not be published. Required fields are marked *