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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Translate the entire conversation x

How to find all solutions of equation (with two variables)

AB_14100650
3-Newcomer

How to find all solutions of equation (with two variables)

Hi 🙂

How can I solve this equation f(a,b) = 0 ? Orange plot - f(a,b), grey plot is zero surface, so as you can see orange plot intersects grey plot 4 times, so there should be 4 solutions. Root() works fine, but by this method I have to change manually  guess/initial values. Is it possible to get all solutions together for ex. in a matrix ?

 

AB_14100650_0-1757281852877.png

 

4 REPLIES 4
Werner_E
25-Diamond I
(To:AB_14100650)

Where is the worksheet?

 

Only automatic way to get all solutions is symbolic calculation using "solve", maybe with additional modifier "fully", but Primes symbolics (FriCas/Axiom) often is to weak and fails to deliver solutions, let alone all of them.

You could write a program which cycles through x and y values within given ranges, uses them as guess values for a numeric solve (either a solve block with "find" or the "root" function), collects the solutions in a matrix and to finish sort the solution matrix and remove duplicate values.
That may work, but there is no guarantee to get really all solutions and maybe you get the same solution multiple times because they are considered different due to tiny round off errors.

 

In your case its quite easy. For each value of x there is a solution. That way the matrix with all solutions you are asking for would be too large for Prime - after all there is an infinite number of solutions ... 😉

You simply can symbolically solve f(x,y) for y and you get a function g(x) which consists of all solutions:

Werner_E_0-1757292339741.pngWerner_E_3-1757295933394.png

 

Can also be done in Prime, but of course with a much more limited 3Dplot (no transparency, no contour lines, no lighting and much more artefacts at the border where the surface is extremely steep, and ... you name it, Prime is missing it 😉 )

Werner_E_1-1757295716901.png

 

 

 

Thank you for answer 🙂

As Werner has noted there are an infinite number of solutions.  Perhaps the easiest way to see that is as follows:

InfiniteSolns.png

 

Alan

Hello @AB_14100650,

 

It looks like you have some responses from some community members. If any of these replies helped you solve your question please mark the appropriate reply as the Accepted Solution. 

Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Vivek N.
Community Moderation Team.

Announcements

Top Tags