I wish to use Mathematica to rearrange the following equation:
Ia Ra + Ia Ma s == (-Ia + Iref) kp Ma + Ia Ra
into this form:
Ia / Iref == kp/(kp + s)
I defined an additional variable lhs == Ia / Iref
and tried to use Solve to re-arrange it like so:
Solve[{Ia Ra + Ia Ma s == (-Ia + Iref) kp Ma + Ia Ra , lhs == Ia/Iref}, {lhs}]
This returned no output, I don't understand why.
However, if I substitute the expression before passing it into Solve, it works:
Ia Ra + Ia Ma s == (-Ia + Iref) kp Ma + Ia Ra /. {Ia -> lhs Iref}
Solve[%, {lhs}]
{{lhs -> kp/(kp + s)}}
Why does the first method work and not the second?
Is there a better way to achieve the re-arranging using Mathematica?