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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Why Mathcad does not want to show all solutions of an equation?

Cornel
19-Tanzanite

Why Mathcad does not want to show all solutions of an equation?

Hello,

Cornel_0-1691045451146.png


But also we can see that if:

Cornel_1-1691045521404.png

 

Cornel_2-1691045538380.png

 

Why Mathcad (at least Prime 8 ) does not want to show all solutions of an equation?

 

31 REPLIES 31
Cornel
19-Tanzanite
(To:Cornel)

Another example:

Cornel_0-1691046600689.png

Cornel_3-1691046687247.png

LucMeekes
23-Emerald III
(To:Cornel)

Have you tried using the modifier ALL.  ?

 

Success!

Luc

Cornel
19-Tanzanite
(To:LucMeekes)

 

Cornel_2-1691047690971.png

Cornel_3-1691047701422.png

Cornel_4-1691047707989.png

Cornel_5-1691047732731.png

Cornel_8-1691047800255.png

 

 

 

Cornel_0-1691047631073.png

Cornel_1-1691047637811.png

Cornel_6-1691047749641.png

 

Cornel_7-1691047764627.png

Cornel_9-1691047807863.png

 

Cornel
19-Tanzanite
(To:LucMeekes)

Luc, can you try these equations in Mathcad 11 to see what MC11 gives as results?

LucMeekes
23-Emerald III
(To:Cornel)

Here you go:

LucMeekes_0-1691084825010.png

LucMeekes_1-1691084830071.png

LucMeekes_2-1691084846751.png

 

If the symbolic result for y comes back as y, it means that you can use any (even complex) value for y.

 

Success!
Luc

 

Cornel
19-Tanzanite
(To:LucMeekes)

Is it possible for example to restrict in Mathcad 11 the solutions for the first equation: x^2+y^2+z^2=484 at (x,y,z) only to integer numbers? In this case we should see all the triplet solutions of this equation

LucMeekes
23-Emerald III
(To:Cornel)

It is possible in Mathcad 11, to solve some Diophantic equations. The (symbolic only) function isolve (integer solve) of the Maple engine must be used:

LucMeekes_1-1691184792661.png

Another one is:

LucMeekes_2-1691184819917.png

But unfortunately:

LucMeekes_3-1691184843120.png

 

Success!
Luc

 

ttokoro
20-Turquoise
(To:Cornel)

image.pngWe also have imaginary answers.

Cornel
19-Tanzanite
(To:ttokoro)

But how you got these results? Can you upload a Mathcad file or some images with the entire solution?

Cornel
19-Tanzanite
(To:Cornel)

@ttokoro @LucMeekes 
Another example:

Cornel_1-1691048073566.png

Cornel_2-1691048086499.png

Cornel
19-Tanzanite
(To:Cornel)

@ttokoro @LucMeekes

Another example:

Cornel_0-1691048386148.png

Cornel_1-1691048405542.png

 

Cornel_2-1691048422921.png

 

EDIT:
Mathcad found wrong solutions:

Cornel_3-1691048545928.png

Cornel_4-1691048563027.png

Cornel_5-1691048581086.png

Werner_E
25-Diamond I
(To:Cornel)


 

EDIT:
Mathcad found wrong solutions:

 


Correct observation! In the meantime you should know that Prime and especially the symbolics is buggy and not very capable.

Ib this case Prime had mixed up the two columns in the solution. The first column actually are the y-values and the second column (all zero) are the x-values.

Its quite obvious the Prime had solved for y with x=0 as otherwise you would not expect three but only two solutions!

 

The bug is still present in Prime 9:

Werner_E_6-1691058705037.png

 

Here is how it should be (Prime 6 with legacy symbolic)

Werner_E_5-1691058575343.png

 

But you instead may simply use something like

Werner_E_7-1691058961717.png

 

ttokoro
20-Turquoise
(To:Cornel)

Even only real answers, we have infinite answers.

image.png

Werner_E
25-Diamond I
(To:Cornel)


@Cornel wrote:

But how you got these results? Can you upload a Mathcad file or some images with the entire solution?


Maybe brute-force?

Werner_E_1-1691062387615.png

As we have all squares every value could as well be negative, too,.

Furthermore the values are exchangeable because the equation is symmetrical in x, y and z.

So in total the first rows results in 6, the second in 48=2^3*3! and the third in 24 solution triples, making up for a total of 78 solution triples with all integer values.

 

Of course you may also have Prime find them all

Werner_E_3-1691063006850.png

And here is the plot of the sphere with the points with all-integer coordinates

Werner_E_5-1691064323593.png

Cornel
19-Tanzanite
(To:Werner_E)

Cornel_0-1691071529223.png

Cornel_1-1691071535748.png

 

Cornel_2-1691071556646.png

Why lookFor2 is not able to find also the solution x=0.747 and y=0?

Or does lookFor2 only look for positive integer solutions? Then is it possible to adapt this lookFor2 so that it can look also for real and complex solutions?

Cornel
19-Tanzanite
(To:Cornel)

@Werner_E 
But I see also that this program lookFor has limits. Or?

Cornel_3-1691072303383.png

 

Cornel_1-1691072186880.png

Cornel_2-1691072200759.png

Cornel_4-1691072318052.png

Cornel_5-1691072331562.png

Cornel_6-1691072344108.png

 

EDIT1: 

Cornel_10-1691072500277.png

Cornel_11-1691072506638.png

Cornel_12-1691072516246.png

Cornel_13-1691072524241.png

And when we can't guess the somewhat exact values, what do we do then?

 

EDIT:

Cornel_0-1691073038002.png

 

 

Cornel_1-1691073046630.png

 

EDIT2:

 

Cornel_2-1691073079468.png

Cornel_3-1691073089000.png

 

 

 

Werner_E
25-Diamond I
(To:Cornel)


@Cornel wrote:

@Werner_E 
But I see also that this program lookFor has limits. Or?

SURPRISE!!

Werner_E
25-Diamond I
(To:Cornel)


@Cornel wrote:

Cornel_0-1691071529223.png

Cornel_1-1691071535748.png

 

Cornel_2-1691071556646.png

Why lookFor2 is not able to find also the solution x=0.747 and y=0?

Or does lookFor2 only look for positive integer solutions?


Yes, it does. Look at the program! There is a for-loop for the x values which runs from 0 to end (=200) with a step width of 1 -> only integer values. Obviously it isn't testing for x=0.747.....

Furthermore y is running starting with the current value of x. So even if x=0.747... would be considered, it woil dnever be tested with y=0.

The program was provided for the one specific equation you had and took advantage of the symmetry in x,y and z in that equation. And yes, it was looking for all-integer solutions only, because otherwise we would get a vector with an infinite number of solutions for which the memory in your computer possibly would not suffice 🙂

 


@Cornel wrote:

Is it possible to adapt this lookFor2 so that it can look also real and complex solutions?


Seriously? Its a brute force attack! It tries ALL (integer) values within a certain interval.

You want to do the same with real and complex numbers?

Trying with ALL real numbers within an interval???? Are you aware that there is an infinite number of reals within every interval, no matter how small?? And how would you like to define an interval for complex numbers???

 

And then - finding the infinite number of  solutions to your equation would take an infinite amount of time. Unfortunately my time is limited.

Furthermore storing most reals would require storing an infinite number of decimals requiring an infinite amount of memory for just one number. You have to solve this problem first before you go any further!

 

Whats wrong with choosing an value for x and calculating the corresponding y-value or doing vice versa?

In the following picture you can ALL infinite solutions for 0<x<10.   Have fun!

Werner_E_1-1691073703075.png

 

BTW, whats the sense of all these senseless looking questions for an infinite number of ALL solutions?

 

 

Cornel
19-Tanzanite
(To:Werner_E)

Doesn't it seem strange how the solution x=1 and y=1 is not also displayed on the graph you made?

Cornel_0-1691074046564.png

 

Cornel_1-1691074062891.png


And when we will have an equation with more than 4 variables, what we will do? because this technique with choosing values for variables I think is limited at 2 or 3 variables, for which we can make 2D plot and 3D plot. And also another problem arises then: what we will do if we cannot rewrite/solve the equation in other remaining variables?

Cornel
19-Tanzanite
(To:Cornel)

@Werner_E 
So, from my understanding until now is that this program lookFor looks for natural and integer numbers only. This program also covers solutions like: 0.5, 0.6, -0.5, -1.5, etc, but does not cover solutions like 0.453, or -0.1895, etc, and real and complex solutions, right?

 

Cornel_14-1691077043510.png

Cornel_15-1691077056730.png

Cornel_16-1691077062636.png

 

Also, for multiple solutions of the same values also this program faill.

 

 

Cornel_5-1691076891409.png

 

Cornel_4-1691076881010.png

Cornel_6-1691076899894.png

 

 

Cornel_7-1691076934259.png

Cornel_8-1691076940542.png

Cornel_11-1691076986841.png

 

 

 

Cornel_10-1691076976961.png

 

Cornel_12-1691077016232.png

 

Cornel_13-1691077022075.png

 

Werner_E
25-Diamond I
(To:Cornel)


@Cornel wrote:

Doesn't it seem strange how the solution x=1 and y=1 is not also displayed on the graph you made?

What are you talking about? Just because YOU used wrong scale when editing a picture(!) you think the plot is wrong?

Why don't you plot it yourself and possibly zoom in to have a closer look.

Werner_E_0-1691080012095.png

And when we will have an equation with more than 4 variables, what we will do?

I don't know what YOU would do. I would define the goal, would define what I really would need the solutions for and then go ahead trying to to find a solution which satisfies my needs.
You seem to be on the lookout for the jack of all trades, a method that can equally solve every possible problem. Good luck with it!

 

When you create a new thread with a new question, then please stay with that very question and don't modify it multiple times with your "yes, but what if ... " etc. Different problem -> different thread. Your threads tends to get very long, very unclear and confusing that way so that its very hard to follow.  Sooner or later you give up following the thread because it becomes too tedious.

You started this thread with a semi-clear question - How to get Prime to show ALL solutions of x^2+y^2+z^2=484.
Obviously a silly question because there is an infinite number. As you showed only a few integer solutions I assumed you were only interested in them because the question now would make sense. I showed you a way to find all 78 solutions.
As so often you ignored the answer but rather followed with a series of unrelated additional questions which is annoying. And now look what has become of this thread! Terrible, isn't it?

 

Cornel
19-Tanzanite
(To:Werner_E)

Cornel_0-1691133730616.png

 I will try to say that I wanted to point out.

So, I will show you this with an example:

Cornel_1-1691134199225.png

Cornel_2-1691134206011.png

Cornel_3-1691134213893.png

So, we can see that the solutions: x=1.5 and x=0.5 cut the x axis.

But in the case of:

Cornel_4-1691134580705.png

Cornel_5-1691134587482.png

 

Cornel_6-1691134595077.png

Cornel_7-1691134601826.png

Cornel_8-1691134612406.png

Cornel_9-1691134619175.png


In this case we cannot see that only one solution cut the x axis, so we cannot conclude that x=1 is the solution for f(x,y).
Here, my question is: how to see and make all solutions to cut the (x,y) axis? Because if the plot does not cut the x axis or (x,y) axis we cannot conclude that the value of x or the value of (x,y) is the solution of that equation.

Also, I am not sure how you got this plot:

Cornel_10-1691135034300.png

 

Cornel_11-1691135070329.png

Cornel_12-1691135078964.png

Cornel_13-1691135085342.png

Cornel_14-1691135092033.png

Cornel_15-1691135103969.png

Cornel_17-1691135267135.png

MartinHanak
24-Ruby III
(To:Cornel)

Hi,

it would be nice if you send your questions to PTC Support, too. It's always good to ask directly at the source...


Martin Hanák
Cornel
19-Tanzanite
(To:MartinHanak)

What is the procedure for this?

MartinHanak
24-Ruby III
(To:Cornel)


@Cornel wrote:

What is the procedure for this?


Hi,

you can access PTC Support only in case that you own commercial license of PTC product. Also your PTC account must be joined to PTC Customer item assigned to your company.

 

 


Martin Hanák
Cornel
19-Tanzanite
(To:MartinHanak)

But if I don't open any ticket then development team/application engineers/owners/or any other person from PTC Mathcad won't care and won't be interested about the problems of their software which they sell, right?
So, even if the user of their software found a possible problem in their software, shouldn't those working at PTC Mathcad have notified themselves and taken over the problems for further investigations if any problem of their software is visible somewhere (even if the user does not open any ticket)?

MartinHanak
24-Ruby III
(To:Cornel)


@Cornel wrote:

But if I don't open any ticket then development team/application engineers/owners/or any other person from PTC Mathcad won't care and won't be interested about the problems of their software which they sell, right?
So, even if the user of their software found a possible problem in their software, shouldn't those working at PTC Mathcad have notified themselves and taken over the problems for further investigations if any problem of their software is visible somewhere (even if the user does not open any ticket)?


Hi,

I apologize but I have no interest in continuing this kind of discussion.


Martin Hanák
Werner_E
25-Diamond I
(To:Cornel)

PTC developers usually don't scan this forum for possible bug reports. So if you don't open a ticket they may not be aware of the bug and of course can't fix it. Even the best testing board can never find all bugs in software in finite time and I don't know anything about the resources PTC puts into testing their software. You can only guess based on the overall development speed of that software ...

But I, too, got the impression over time that interestingly PTC seems not be be much interested in bug reports by users as otherwise the procedure to do so would be more obvious, more low-threshold and not limited to paying customers.

Cornel
19-Tanzanite
(To:Werner_E)

In my case I am using Mathcad Prime 8 at my company where I work. My company has a server license for Mathcad. From my understanding, if I want to send a ticket at PTC I need to write the customer number (this number I don't even know where to read it in Options -> License because I do not see this number in the License window), and/or Service Contract # (number) - this service contract number I can see it in Options -> License. I am able to see also a Host ID number in the License Window.
If I put/send somewhere these numbers or If I ask IT guys for customer number/product code, and so on, then IT guys (also my manager, and maybe other people (cyber security guy for example)) will question me further (why I need these details, where I will send these details, etc.), and I will have to give some kind of explanation for a simple equation, or whatever bug report. This process of reporting a bug seems cumbersome, it requires all sorts of details, for something that is in PTC Mathcad's best interest. Sometimes, as is the case here, these types of equations do not fall into my area of calculations at work quite like that, but I stumble upon them by chance.

Announcements

Top Tags