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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Problems with polyroots function

kdaniel97
2-Guest

Problems with polyroots function

Im a newbie in mathcad, im using mathcad 15. My problem is that somehow polyroots isnt working properly for me. I attached an example, which explains my problem. My original task is to create a program, which solves a function, similar to the one u can find in the example file. One of the coeffecients (the constant) is the function of time in my task. Then i have to pick out the appropriate real root and illustrate it as the function of time. Unfortunately polyroots is the only suitable way to execute the task according to my short term mathcad knowledge. Thanks for the help!

1 ACCEPTED SOLUTION

Accepted Solutions

Luc guessed it without seeing your worksheet - chapeau bas!

The problem is the algorithm which is per default "LaGuerre". If you change it to "Companion Matrix" by right clicking the word "polyroots" you get what you want.

B1.png

 

I am not sure if I understood correctly what you are finally after. You want to change the constant (-30.995) and pick the real valued solution (possibly the positive one). If thats true, you might as well use a solve block which you can turn into a function of that variable constant:

B2.png

And if you know for sure that the seached for values always are, lets say, between 0 and 10, you may even use the "root" command for the task.

B3.png

 

Worksheet attached (in Format MC11)

View solution in original post

2 REPLIES 2
LucMeekes
23-Emerald III
(To:kdaniel97)

I can't read your file. Does this help:

LM_20190527_Polyroots.png

?

Note that when your dynamic range is big (large ratio's of coefficients) it may be wise to choose the best algorithm. Select the polyroots function, press the right-mouse button and select between LaGuerre (default) and Companion Matrix...

 

Success!
Luc

Luc guessed it without seeing your worksheet - chapeau bas!

The problem is the algorithm which is per default "LaGuerre". If you change it to "Companion Matrix" by right clicking the word "polyroots" you get what you want.

B1.png

 

I am not sure if I understood correctly what you are finally after. You want to change the constant (-30.995) and pick the real valued solution (possibly the positive one). If thats true, you might as well use a solve block which you can turn into a function of that variable constant:

B2.png

And if you know for sure that the seached for values always are, lets say, between 0 and 10, you may even use the "root" command for the task.

B3.png

 

Worksheet attached (in Format MC11)

Top Tags