Skip to main content
1-Visitor
November 20, 2012
Question

Solving systems of equations with R, X = real restriction

  • November 20, 2012
  • 5 replies
  • 2579 views

Hello,

I need to solve a system of equations where I have defined in different parts "R + 1j*X" type expressions. But I get complex number results for both R and X. How can I define a restriction for R and X making them real numbers with no imaginary part?

Thanks in advance.

5 replies

24-Ruby IV
November 20, 2012

Larrabe Uribe wrote:

Hello,

I need to solve a system of equations where I have defined in different parts "R + 1j*X" type expressions. But I get complex number results for both R and X. How can I define a restriction for R and X making them real numbers with no imaginary part?

Thanks in advance.

Attach your sheet plese!

1-Visitor
November 20, 2012

The solutions are what they are.

Your restriction seems unrealistic in general.

Why do you think they should not have imaginary parts??

And why do you think it's a good idea to throw part of the solutions away??

19-Tanzanite
November 20, 2012

You have chosen to represent the complex number, call it C, as

C=R+j*X

where R and X are real, and then you solve for R and X. I think what you really want though, is simply to solve for C, which will be complex, and then split it into the real and imaginary parts, which are R and X (if you are solving symbolically, use the "rectangular" keyword).

25-Diamond I
November 20, 2012

Please attach a worksheet to render more precisely your request.

You may try to evaluate the find-expression (or whatever you use) symbolically and use assume, variable=real.

Anybody knows why assume, ALL=real does not work (see attached worksheet)??

But its not possible to evaluate symbolically in every case and assume is rather unreliable anyway.

Another posiibility would be to solve for the complex variables directly and recover real and imaginary part afterwards.

Look at the attached worksheet (Mathcad 15)

WE

19-Tanzanite
November 20, 2012

Anybody knows why assume, ALL=real does not work (see attached worksheet)??

Since it is advertised to work that way, and it doesn't, it's a bug.

25-Diamond I
November 21, 2012

Anybody knows why assume, ALL=real does not work (see attached worksheet)??

Since it is advertised to work that way, and it doesn't, it's a bug.

Bad - seems to have to do with the symbolic processor Mupad which defaults to domain complex in contrary to the former Maple which defaults to real and you could use the keyword complex to change that - more comfortable.

@Larrabe: If solving for complex variables, as Richard pointed out first, and using the symbolic processor with assume is not an option for you for some reason, you may try to add constraints like Im(X)=0, Im(R)=0 in your solve block. See attched.

Zigor1-VisitorAuthor
1-Visitor
November 21, 2012

Thank you all for your prompt answers. They were very helpful.