This was a physics problem in my textbook ; however there is needed some math to solve it fully. You can read the last paragraph if you are not aware of circuits. The actual problem is in last paragraph.
There is a combination of identical cells of e.m.f. = $E$ and internal resistances $r$ each ; such that x cells of them are connected in series to form a line. Further, there are y such lines. Also, this combination is connected to an external resistance R . Thus, the current passing through the external resistance is
$I = (xyE)/(xr + yR)$ ......(i)
Now, the question was that x and y can be varied as to change the skeleton of circuit but $E,r,R$ are kept constant. We have to find the maximum current.
Thus, we have to maximize $I$ which is a function of $x$ and $y$ as shown by equation above. Also, we need to find the relation between $x,y,r,R$ for which $I$ is maximised.
The answer key says that for maximum current($I$) the required relation is $rx = Ry$ ; giving reason that the denominator of equation(i) becomes minimum . I know from A.M.-G.M. inequality that denominator will become minimum for this condition. However, I am not sure if this is correct way to use AM-GM equality because the numerator is variable and not a constant. So is there any other and correct method to solve for it?
Summary of Question
Determine the relation between $x,y,r,R$ such that this expression is maximised :
$xyE/(xr + yR)$ ; where only x and y are variables.
EDIT : $x,y,r,R,E$ are all positive.
Thank you!