Algebra, Equations & Number Patterns

Answer & solution
Official answer: C
Approach: Combine the logarithms and use the injectivity of the exponential function.
1. Derivation. Exponentiating yields(x+y)/2=√(xy), equality in the arithmetic-geometric mean inequality. Equivalently(x−y)²=0, so x=y>0. Hence x/y+y/x=1+1=2, option C.
2. Explanation and checks. In detail, (ln x+ln y)/2=ln(sqrt(xy)), so the two positive arguments must agree. Squaring x+y=2sqrt(xy) gives x²+2xy+y²=4xy, hence (x−y)²=0. Positivity licenses the logarithms, square root and later divisions. The equality condition matters: without the given equation, x/y+y/x is merely at least 2, not necessarily equal to 2. Another useful check is x/y+y/x−2=(x−y)²/(xy). The numerator vanishes for the forced equality x=y, so the excess above two is exactly zero.