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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Where do imaginary solutions hide in the graph?

Cornel
19-Tanzanite

Where do imaginary solutions hide in the graph?

Hello,

The question is related to finding of solutions of the below equation:

Cornel_0-1686570037419.png

 

Solution with solve:

Cornel_1-1686570052872.png

 

Solution with root:

Cornel_2-1686570074686.png

Cornel_3-1686570081213.png

Cornel_4-1686570089827.png

 

From the graph we see that the graph cuts the x-axis only in 2 points. Where can we see the other 2  solutions (which are the imaginary solutions) with the root solution on the graph that solve gives above? Or can't we seen on the graph these 2 imaginary solutions of f(x) with the root function/solution?
How to find with root function the imaginary solution of the function f(x)?

Mathcad Prime 8 file attached.
Thank you.

 

 

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:Cornel)

BTW, a non-real number is not necessary imaginary (as this would mean its real part is zero).

 

In the 2D plot you can only "see" points with real valued coordinates.

To see the non-real ones you would need a 4D-plot, where the x-"axis" as well as the y-"axis" are Gauß-planes.

Could be a nice feature suggestion for prime 😉

 

As a workaround you could use two 3D-plots with x=real part of argument, y=imaginary part of argument and z=real part of function value or imag. part of function value.

Werner_E_0-1686572264456.png

 

 

View solution in original post

5 REPLIES 5
Werner_E
25-Diamond I
(To:Cornel)

BTW, a non-real number is not necessary imaginary (as this would mean its real part is zero).

 

In the 2D plot you can only "see" points with real valued coordinates.

To see the non-real ones you would need a 4D-plot, where the x-"axis" as well as the y-"axis" are Gauß-planes.

Could be a nice feature suggestion for prime 😉

 

As a workaround you could use two 3D-plots with x=real part of argument, y=imaginary part of argument and z=real part of function value or imag. part of function value.

Werner_E_0-1686572264456.png

 

 

Werner_E
25-Diamond I
(To:Werner_E)

Here in more detail, using implicit2d() from Viacheslav N. Mezentsev

Werner_E_3-1686579980186.png

The green curve is the intersection of the green surface (real parts of function values) with the a-b-plane (function is evaluated for a+b*i).

The orange curve is the intersection of the orange surface (imaginary parts of the function values) with the a-b-plane.

The four solutions of your equation can be found in the intersection of both curves.

The a-b-plane is of course the Gauß-plane of the complex function arguments.

 

Of course the four solutions also are part of the intersection of the green and orange surface (points where real and imaginary part of function value are equal, black line), but I found the plot too much overloaded to be informative. Maybe, if your would have some degree of transparency, but Prime does not have any means to make a surface semi-transparent.

Werner_E_4-1686580063920.png

 

Cornel
19-Tanzanite
(To:Werner_E)

So, there are 2 things that I put into discussion:

1. How to get all 4 solutions of f(x), especially the 2 imaginary solutions using root function, because the other 2 real solutions (-1.315 and 0.315) can be found with the root function (see my first post), but I don't know how to find the other two remaining solutions of f(x)  which in fact are the imaginary solutions of f(x) with root function. I ask also for the solution using the root function because let's say that the solve keyword will not be able to give all solutions of the function, so therefore we need to look at the other methods for finding all solutions of f(x). Initially I thought at using the root function, but I saw that root function cannot give the 2 imaginary solutions, or maybe I don't know how to use root function to get the 2 imaginary solutions.

2. How to plot all 4 solutions, so including also the 2 imaginary solutions of f(x).

For point 2 you post how to plot, but I do not know about point 1. For point 2 you defined P with the already known solutions. But how someone will define the P when he/she will not know the all the solutions of the function that will be put in the P?

Werner_E
25-Diamond I
(To:Cornel)

ad 1)

Using "root" by providing a range will never give you non-real results.

You will have to use "root" by providing a non-real guess

Werner_E_0-1686583281849.png

and as usual its hard to guess which guess will give you which result 😉

 

In case of a polynomial as in your example, its best to use the "polyroot" function. Of course you can provide the coefficient vector manually if you don't want to use the symbolics

Werner_E_1-1686583374457.png

 

ad 2)

Extend yourself to four euclidean dimensions (you would be the first one being able to do so, I guess), plot the function and look, where the fourdimensional curve intersects the a-b-plane

You have a function f(a,b)=(c,d) based on your function f(x)=y with x=a+i*b and y=c+i*d

As an alternative look at my second answer.

Plot the green and orange curve in simple 2D and look where they intersect. Here the axis must be seen as real and imaginary axis.

The equation of the green curve is Re(f(a+1i*b)) = 0  and the orange one analog with Im instead of Re.

As we can't do implicit plots in Mathcad and Prime, you have to resort to either brute force (making a grid and for each point decide if it fulfils the equation or not; plot consist of a cloud of points only) or you use a clever user-function as I did - credit goes to Viacheslav N. Mezentsev who posted this function among others here in he forum 15 to 20 years ago. As an alternative you can use a different software which is able to do implicit plots like SMath, Geogebra, and all the other well known products.

 

Announcements

Top Tags