sin(cos(x)) versus cos(sin(x))

A few days ago I wrote about sufficient conditions for f(g(x)) to bound g(f(x)). This evening I stumbled on an analogous theorem.

For real numbers γ and δ,

cos(γ sin(x)) > sin(δ cos(x))

for all real x provided

γ² + δ² < (π/2)².

Source: American Mathematical Monthly. February 2009. Solution to problem 11309, page 184.

The reference gives two proofs of the theorem above.

Here’s a quick and dirty Python script that suggests the theorem and its converse are both true.

from numpy import *
import matplotlib.pyplot as plt

N = 200
xs = linspace(0, pi, N)
ds = linspace(-0.5*pi, 0.5*pi, N)
gs = linspace(-0.5*pi, 0.5*pi, N)

def f(x, d, g): return cos(g*sin(x)) - sin(d*cos(x))

for d in ds:
    for g in gs:
        if all(f(xs, d, g) > 0):
            plt.plot(d, g, 'bo')
            if d**2 + g**2 > (pi/2)**2:
                print(d, g)
                
plt.gca().set_aspect("equal")
plt.show()

This produces a big blue disk of radius π/2, confirming that the condition

γ² + δ² < (π/2)²

is sufficient. Furthermore, it prints nothing, which suggests the condition is also necessary.