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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

polyroots with two arguments

Liv
7-Bedrock
7-Bedrock

polyroots with two arguments

Hello everybody !

I am just curious if the first argument of polyroots has some (useful) meaning (see highlighted region in attached), since subsequent calculations in the worksheet work fine.

The equation originates from the simple DE :  dT(z)/dz = [deltaH/cpm(T)] * dgCO(z)/dz , with the initial conditions : T(0) = T0 and gCO(0) = some value.

I suppose that's something coming from the cuisine of muPad symbolic engine...

Note that value displayed as first argument at polyroots may change on re-opening the file.

Best regards, Liv.

ACCEPTED SOLUTION

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

Interesting!

The first parameter which is added by symbolic evaluation changes also when the expression is evaluated several times but it does no change when the sheet or expression is recalculated.

Basically polyroots is a function which should only be evaluated numerically.

I have no idea what the symbolics thinks it is.

Even in Mupad its a numerical function only and the syntax is different from the one used in Mathcad

-> Numerical roots of a univariate polynomial - MuPAD - MathWorks Deutschland

The expression produced by the symbolic eval cannot be evaluated numerically and the error message is remarkable

As far as I am aware accepts polyroot only 1 argument (the coeff vector), not 2, and as far as I see in the picture its applied to just 2 arguments and not to 4.

View solution in original post

7 REPLIES 7
Werner_E
25-Diamond I
(To:Liv)

Interesting!

The first parameter which is added by symbolic evaluation changes also when the expression is evaluated several times but it does no change when the sheet or expression is recalculated.

Basically polyroots is a function which should only be evaluated numerically.

I have no idea what the symbolics thinks it is.

Even in Mupad its a numerical function only and the syntax is different from the one used in Mathcad

-> Numerical roots of a univariate polynomial - MuPAD - MathWorks Deutschland

The expression produced by the symbolic eval cannot be evaluated numerically and the error message is remarkable

As far as I am aware accepts polyroot only 1 argument (the coeff vector), not 2, and as far as I see in the picture its applied to just 2 arguments and not to 4.

Liv
7-Bedrock
7-Bedrock
(To:Werner_E)

"remarkable" : agree...

One can get also something like :

polyr.jpg

Werner_E
25-Diamond I
(To:Liv)

Strange!

"solvecb" seems to be an internal command. I don't know any  CAS this command could stem from.

It looks like it has nothing to do with the symbolics. Its implemented in mathdllr.dll and is referenced in mpl\mcdtranslator.mpl and also in prolog\compute.prolog.

Liv
7-Bedrock
7-Bedrock
(To:Werner_E)

Anyway... it works (fortunately) with symbolics and proved useful since it was able to quickly provide all the roots.

Is the behavior the same in Prime 3.1 ? (don't have it yet)

Thank you a lot (again) Werner for your time & for documenting my curiosity,

Liv.

Werner_E
25-Diamond I
(To:Liv)

> Anyway... it works (fortunately) with symbolics and ...

You mean it works with numerics. The symbolic result is rather useless, I guess.

> Is the behavior the same in Prime 3.1 ?

Have Prime 3.0 here installed and the behavior is not the same, its more consistent here. As "polyroots" is a numerics-only function, the symbolic evaluation simply returns the very same expression.

And also the error message of the numerics is more meaningful (it moans about the first argument not being a vector).

Whats still a little bit strange in Prime is the fact, that the numerics still thinks that the function can accept two arguments (the help/documentation only describes the use with one vector argument). It seems that a second argument is simply ignored as long as the first one is a vector and more than 2 arguments throw an error.

Werner Exinger wrote:

Strange!

"solvecb" seems to be an internal command. I don't know any  CAS this command could stem from.

"solvecb" - "solve" callback?

Werner_E
25-Diamond I
(To:VladimirN)

callback??

We can't know and I never came across a command with that name in any math program I used.

Announcements

Top Tags