cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Solving systems of equations with R, X = real restriction

Zigor
1-Newbie

Solving systems of equations with R, X = real restriction

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.

7 REPLIES 7

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!

MichaelH
1-Newbie
(To:Zigor)

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??

RichardJ
19-Tanzanite
(To:Zigor)

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).

Werner_E
24-Ruby V
(To:Zigor)

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

RichardJ
19-Tanzanite
(To:Werner_E)

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.

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.

Zigor
1-Newbie
(To:Zigor)

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

Top Tags