The power is RI^2=R[E/(R+r)^2]=f(R)
The extrem condition is to annule the first derivative:
=[E^2/(R+r)^3](r-R)=0, so R=r
The adjustment theorem says that the extreme nature could be found from the sign of the second derivative:
f"(R)=2[E^2/(R+r)^4](R-2r). For the r root of the first derivative is negative, so the extrem is maxim.
The result could be found right away, without derivatives:
At denominator we have the sum of 2 terms, which product is constant, so the sum is minim when the terms are equal
r/(sqrt R)=sqrtR, meaning R=r.
The denominator is minim, so the ratio, power, will be maxim.
E=2Pm:Im=6V, where Im=E/2r