# Why doesn't Solve work unless I request a solution for both unknowns?

I have two circuit equations

power == voltage*current
voltage == resistance*current


You can plug the second equation into the first and get

power == current^2 * resistance


I'm wondering why this input is returning no solution

Solve[{power == voltage*current, voltage == resistance*current}
/. {voltage -> 5, resistance -> 10}, current]


If I manually solve for power, then I can get the correct result

Solve[{power == voltage*current, voltage == resistance*current}
/. {voltage -> 5, resistance -> 10, power -> 5^2/10}, current]

{{current -> 1/2}}


I also get the correct solution if I request the solution for both current and power

Solve[{power == voltage*current, voltage == resistance*current}
/. {voltage -> 5, resistance -> 10}, {current, power}]

{{current -> 1/2, power -> 5/2}}


I did some more testing and found that if I provide the MaxExtraConditions->All that I get a solution. Is this what I should be using?

{{current -> ConditionalExpression[1/2, power == 5/2]}}

• The issue is that unless you solve for power, it is assumed to be a parameter of the equations. And the equations do not have solutions for arbitrary values of power, hence nothing is returned (Solve normally only returns generic solutions as mentioned in the documentation) - as you've realized, MaxExtraConditions->All can help with that Jan 9, 2019 at 20:23

It can't read your mind to understand that power is a free variable rather than a parameter you intend to define later. One way to deal with this is to solve for both current and power. Another way is to simplify by eliminating power:
Eliminate[{power == voltage*current, voltage == resistance*current}, power]

• Or eliminate power with Solve using this form: Solve[{power == voltage*current, voltage == resistance*current} /. {voltage -> 5, resistance -> 10}, current, {power}][[1]] Jan 10, 2019 at 0:43