Skip to main content
1-Visitor
May 6, 2014
Question

How to solve an equation with a complex variable

  • May 6, 2014
  • 15 replies
  • 6250 views

Hi!

How to solve an equation with a complex variable.
G(s):=1/[(s^2)*(s+1)^2]; s- complex variable

like this does not work:

solve,s,assume,s=complex

|G(s)|=1 ----------------------------------------->0.682

with respect Fynjy....

15 replies

19-Tanzanite
May 6, 2014

How about:

Gs.PNG

Alan

25-Diamond I
May 6, 2014

There is an infinite number of solutions - s=0,682 sure is one of it.

You may try if you get a more general result by adding the modifier "fully"

|G(s)|=1 solve,s,fully --->

23-Emerald I
May 6, 2014

Interesting!

Version 15 doesn't agree:

25-Diamond I
May 6, 2014

Fred Kohlhepp wrote:

Interesting!

Version 15 doesn't agree:

Neither do I 😉 It should have been 0.618, not 0.682.

BTW, there is no keyword "complex" in Mathcad 15 and so complex is simply seen as variable. muPad defaults to complex (unfortunately) and we can use something like "assume,x=real" whioch sometimes work as expected and sometimes is ignored.

12-Amethyst
May 6, 2014

Dependant on the constraints that you impose on the values for 's' there may be an infinite number of solutions.

Given that s=a+i*b you have 1 equation & 2 (potentially) independant variables.

In this case, it appears that the solutions all exist on a circular (?) locus (see attached),

but minor changes could give a variety of shapes.

25-Diamond I
May 6, 2014

Interesting approach. Would n't have thought of a 3D plot.

I also played with the s=a+jb approach and simplified the function, splitting the result in real and imaginary part and solving (magnitude=1) for b in dependence of a. It worked but later I came up with a much simpler way.

Here is a simple way to get "all" solutions to the task and the locus looks like an ellipse, the axis lengths sqrt(5) and sqrt(3).

gs.png

BTW, Alan's solutions are included in this one for theta=0.

25-Diamond I
May 6, 2014

I send my sheet and also a pdf printout of it as Fynjy Serg wrote he is using Prime (I won't bother converting it).

I also add my first approach with s=a+j*b and I think I ran into a bug of Mathcad's symbolics - take a look:

06.05.png

1-Visitor
May 7, 2014

Yes.

here's another look.

Let: G(s):=1/[s*(s+1)];

this way he(MathCad Prime 3.0) can:

solve,b,assume,b=real,b>0,float,3

|G(0+1j*b)| =1 ------------------------------------------------------>0.786

but since there is no:

solve,s,assume,Re(s)=0,Im(s)>0,float,3

|G(s)| =1 -------------------------------------------------------------->ops!

although the second method elegant...


25-Diamond I
May 7, 2014

We already know that Prime is not able to solve that kind of equations, mainly because of the absolute value used I guess. As I showed in my other posts we also get definitely wrong solutions in some cases and the reason seemed to be the absolute value again.

Your initial task seems to be solved though using some different approach.

If the reason of this thread wasn't to find a solution for a concrete problem but to point out that Prime' s symbolics fail in some cases, you should consider opening a support case and turning in a bug report to PTC support staff.