I want to solve the equation $\frac{abi}{a+bi}=4-2i$, where $a$ and $b$ are real numbers. I know from hand-solving the answer is $a=5$, $b=-10$. How do I get Mathematica to tell me this?
I tried:
Solve[a b I/(a + b I) == 4 - 2 I, {a, b}]
but this returns
{{b -> -(((2 + 4 I) a)/((-4 + 2 I) + a))}}.
I tried
Solve[a b I/(a + b I) == 4 - 2 I, {a, b},Reals]
but this returns
Solve[a b I/(a + b I) == 4 - 2 I, {a, b},Reals].
Is there a simple way of getting Mathematica to solve this, without knowing lots of special Mathematica commands? In searching out the answer on this site, I see workarounds that a newbie to MMA would never think of themselves, nor understand what they are doing that gives the right answer.
Solve[a b I/(a + b I) == 4 - 2 I && (a | b) ∈ Reals, {a, b}]
. This might be slightly related: Solve an equation in R+. $\endgroup$Alternatives
. You can useSolve[a b I/(a + b I) == 4 - 2 I && a ∈ Reals && b ∈ Reals, {a, b}]
as well. $\endgroup$Reduce
andSolve
: What is the difference between Reduce and Solve?. $\endgroup$