# Arithmetic-geometric mean for rationals?

Let $$\operatorname{AGM}(x,y)$$ be the arithmetic-geometric mean of $$x$$ and $$y$$. Given an error $$\varepsilon>0$$, a bound $$b\in\mathbb R_+$$ and a function $$f:\mathbb R\rightarrow\mathbb R$$ with $$f(x)=O(\log x)$$ and $$f(x)=\Omega(\log\log x)$$ for which rationals $$\frac pq\in\mathbb Q_+$$ with $$0 and $$0 is it possible to find $$x=\frac{p'}{q'},y=\frac{p''}{q''}\in\mathbb Q$$ with $$\mathsf{\max}(|p'|,|q'|,|p''|,|q''|) such that $$\Bigg|\frac pq-\operatorname{AGM}(x,y)\Bigg|<\varepsilon$$ holds?

Is there explicit methods to write such $$x,y$$ down?

The density of such representable $$\frac pq$$ should be tiny. Nevertheless are there special forms where this can be done. So are there special family of rationals?

• What's AGM? ${}$ May 16 '20 at 8:15
• @Wojowu The arithmetic-geometric mean, I think. May 16 '20 at 11:08

Since $$x,y>0$$ for $$AGM(x,y)$$ to be defined, why the absolute values?
I will assume $$f(\cdot)$$ takes only integer values and that $$p’,p’’,q’,q’’ \leq f(b)$$
Let $$F(b)$$ be the set of fractions with numerator and denominator bounded by $$b$$. Then $$|F(b)| and the largest members are integers until $$\frac{b}2$$. The smallest are their reciprocals. One would expect things to be densest near $$1.$$
Fix $$b$$ And let $$c=f(b)$$, then the $$|F(c)|$$ values of $$x,y$$ are all between $$1/c$$ and $$c$$ so $$p/q$$ better be between $$1/c-\epsilon$$ and $$c+\epsilon$$ . Then there are somewhat under $$\binom{c^2}2$$ values for $$AGM(x,y)$$ . Each determines an interval of radius $$\epsilon$$.
Certainly we can get all rationals in the $$\epsilon$$ neighborhoods of the members of $$F(c)$$ using $$x=y.$$ Those alone should allow all rationals in some interval , depending on $$\epsilon$$, and containing $$1$$ near its lower bound. Taking $$x$$ near $$y$$ would seem to allow a larger interval.
Past that I would suggest starting with $$c=10$$ or smaller and computing to see what the collection of intervals looks like.