Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
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.
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!
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??
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).
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
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.
Thank you all for your prompt answers. They were very helpful.