# Maximize returns indeterminate when I give it constraints

The documentation for Maximize says that it returns Indeterminate and minus infinity if the constraints cannot be satisfied. I'm puzzled when I try to solve the following (power equation for a pair of resistors with voltage == 1):

ClearAll[rS,rL]
Maximize[{rL/(rS + rL)^2, rL > 0 && rS > 0}, rL]


I've told Maximize that rL>0 and rS>0 so I expect only the first solution. Why do I get the indeterminate condition?

This is v12.1 on Mac OS if that matters. The solution should set rL to rS so the first solution is the expected solution. I have also tried specifying the domain of Reals for rL and rS and that doesn't change the returned value.

• I think Maximize is being extra cautious on you behalf, by providing a result that would be valid in general, even outside of the context of your constraints, so you can use it safely elsewhere where those constraints may not be respected. If you do want only the solution for rS > 0, you can use Refine or Simplify on the result, together with the appropriate condition, e.g. Refine[Maximize[{rL/(rS + rL)^2, rL > 0 && rS > 0}, rL], rS > 0]. Jun 4, 2020 at 20:43
• Thanks for the explanation. Please write this up as an answer and I'll happily accept it. Jun 5, 2020 at 2:00
• Will do! Glad it helped. Jun 5, 2020 at 3:14

I think Maximize is being extra cautious on your behalf, by providing a result that would be valid in general, even outside of the context of your constraints, so you can use it safely elsewhere where those constraints may not be respected.
If you want only the solution for $$r_S > 0$$, you can use Refine or Simplify on the result, together with the appropriate condition:
Refine[