2

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.

GregH
  • 1,909
  • 12
  • 25

1 Answers1

5
Reduce[a b I/(a + b I) == 4 - 2 I && a ∈ Reals && 
  b ∈ Reals]

(* b == -10 && a == 5 *)
AsukaMinato
  • 9,758
  • 1
  • 14
  • 40
Alexei Boulbitch
  • 39,397
  • 2
  • 47
  • 96