When working on an applied math topic, I have come across the following general problem.

Let $f(x_1, x_2, ..., x_n)$ be a real function of $n$ real variables $x_1, x_2, ..., x_n$ which is defined on a unit $n$-cube $I_n = [0, 1]^n$. Let $A_n$ be the integral of this function over $I_n$ (thus $A_n$ is the average value of this function on $I_n$). Now consider a function $g(x) := f(x, x, ..., x)$. It is defined on the unit interval $I_1$. Let $B$ be the integral of the function $g(x)$ over $I_1$.When it is true that $A_n < B$?

This general problem was motivated by the following specific question which is of great interest to me. Consider a function $f(x_1,x_2)= 1/(1+a_1x_1+a_2x_2)$ defined on a unit square $I_2=[0,1]^2$. It depends on two real parameters, $a_1$ and $a_2$ (ensuring that the denominator in the expression for the function $f$ is non-zero). Let $A_2$ be the integral of this function over $I_2$, and let $B$ be the integral of $g(x):= f(x,x)$ over the unit interval $I_1$. When the inequality $A_2 < B$ holds?

Having performed some tedious calculations I was able to investigate this problem in 2 special cases: $a_1=a_2$ (the inequality $A_2 < B$ holds) and $a_1=-a_2$ (the opposite inequality holds). I wonder if the analysis could be performed using some general ideas (using perhaps such properties as convexity upward/downward or monotonicity). Do you know if there is some general theory/results studying this type of problems?

Thank you very much for reading my question.