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]}}
power
, it is assumed to be a parameter of the equations. And the equations do not have solutions for arbitrary values ofpower
, 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 $\endgroup$