Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hello,
I would like to know if you could help me please with some idea how could I solve the following 3rd degree equation:
- equation is of type ax^3+bx^2+cx+d=0
- each of the coefficients has a max and min value:
It results a high number of 3rd equations to be solved from all the possible combinations of the min and max values of the coefficients.
Solving each combination in part takes lot of time, so I would like to know if there is any possible way to get the solutions from all the equations obtained from all the possible combinations of coefficients?
Thank you,
Marius
Solved! Go to Solution.
Yes, you are right. I used the order used by polyroots which is coefficient of x^0 as first value.
Actually I hadn't noticed that thats differently from the function definition the IP used in his question.
If thats an issue it can easily be changed
> get the solutions from all the equations
ALL equations? For sure?
There is an infinite(!) number of possible coefficients "a" from amin to amax and the same goes for b, c and d.
Every equation will have 3 solutions. So you have to expect 3*infinity^4 values. No matter which method you may chose to calculate them, it will take infinity time and if you are using Prime it even may take much longer 😉
So maybe you may reconsider what you really are looking for.
I took the question as meaning just use the two extreme values for each coefficient. Of course, if the requirement is for all values in between the extremes, then, as you say, there is an infinite number of possible solutions!
Alan
No, my question is referring only to the max & min values of each coefficient. I am using PTC Mathcad Prime 7 for worst case calculations.
Could you tell me please how to build the matrix of coefficients?
Hello Werner,
Thank you for your help. I followed your solution but it seems to not work for me. Could you tell me please why?
You should attach the worksheet, not (just) a small picture.
Success!
Luc
What do you expect us to see at the picture you posted?
You hardly can expect us to read the error message to get a clue as to what went wrong.
From what hardly can be seen at vector A is that the first entry seems to be positive and the second is negative. While in ,my sheet i had chosen the opposite order (lowest value first), this should actually be no problem at all. Actually you can put even more values in each vector at any order at all and you may also chose to use vectors of different length. The method should work equally well.
You will have to attach the sheet for further help.
Addon
I don't experience any errors when I use the values you might have used. No matter if I use them with my original function (wher the order of a,b,c,d was reversed compared with your initial posting, nor with the "correct" order as seen here:
Hmm, so -4 (second row of the table, x1) should be a solution for
Let's see:
Is it polyroots, or did you place the a...d in the wrong order?
Guess it should be:
(This is the full solution for any a,b,c and d)
Now we can build the table with:
Now:
That's close enough to 0.
Success!
Luc
P.S. Checked. You did change the order of the coefficients:
Yes, you are right. I used the order used by polyroots which is coefficient of x^0 as first value.
Actually I hadn't noticed that thats differently from the function definition the IP used in his question.
If thats an issue it can easily be changed