2
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ 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$ – Artes Dec 18 '13 at 14:18
  • $\begingroup$ That works - thanks! What does (a | b) mean? Specifically, what's the pipe? $\endgroup$ – GregH Dec 18 '13 at 14:21
  • 1
    $\begingroup$ See Alternatives. You can use Solve[a b I/(a + b I) == 4 - 2 I && a ∈ Reals && b ∈ Reals, {a, b}] as well. $\endgroup$ – Artes Dec 18 '13 at 14:23
  • $\begingroup$ @Artes If you make your comment an answer I'd mark it as my favorite. The one given currently is essentially the same, but yours is more succinct and, imo, more intuitive. $\endgroup$ – GregH Dec 19 '13 at 11:39
  • $\begingroup$ I'm glad I could help, but I think you could accept the answer given by Alexei since that one is quite appropriate. On the other hand you might find helpful more detailed discussion of Reduce and Solve: What is the difference between Reduce and Solve?. $\endgroup$ – Artes Dec 19 '13 at 15:27
4
$\begingroup$
Reduce[a b I/(a + b I) == 4 - 2 I && a \[Element] Reals && 
  b \[Element] Reals]

(* b == -10 && a == 5 *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.