Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Hi folks wondering if you can help me? I am using mathcad to solve polynomial equation. I have attempted the question and wanted to see if the question is correct and I am doing what is asked of me. I have to solve it in two different ways other than graphical. I have tried to solve it this way first. Basically h(x)=6 to four decimal places. The answer is in the uploaded file. Would be grateful for some insight.
b) Using MathCad solve the polynomial h(x) = 6 using at least two different methods other than graphical, giving your answers to 4 decimal places........ h(x)=x4-x3-19x2-11x+30
Solved! Go to Solution.
Salim Ahmed wrote:
Gentlemen Thankyou so much, so my method is correct and then I would use werners method and that question would be correct wouldn't it guys?
I would rather do it without the float modifier and evaluate X in a separate region as Mike has done. The reason is that using float you actually lose precision. "float" is not just for display but actually affects the values. Furthermore float,4 gives you 4 significant digits while you need 4 decimals!
This is the orignal polynomial h(x)=x4-x3-19x2-11x+30, because h(x)=6 I minused 6 from 30 which left me with 24. So now I am confused?
Salim Ahmed wrote:
This is the orignal polynomial h(x)=x4-x3-19x2-11x+30, because h(x)=6 I minused 6 from 30 which left me with 24. So now I am confused?
So am I because I don't understand why you are confused and what confuses you.
Both you and Mike solved the correct equation (original polynomial function - 6 = 0)
I wouldn't have named the polynomial decrease by 6 h(x), too, but thats another story.
Anyway you had found a way using polyroot to get all four solutions and Mike showed you a different way using the symbolic solve command. Both methods yield the same results (but in slightly different order).
So what on earth are you confused about?
Ok so I have to solve it two different ways other than graphical, so lets say my method is method 1, so method 1 was solved to four decimal places, and if I formatted Mikes to four decimal places thats the question complete isn't it?
Salim Ahmed wrote:
Ok so I have to solve it two different ways other than graphical, so lets say my method is method 1, so method 1 was solved to four decimal places, and if I formatted Mikes to four decimal places thats the question complete isn't it?
Yes, just use the float command as Werner has shown.
Mike Armstrong wrote:
Salim Ahmed wrote:
Ok so I have to solve it two different ways other than graphical, so lets say my method is method 1, so method 1 was solved to four decimal places, and if I formatted Mikes to four decimal places thats the question complete isn't it?
Yes, just use the float command as Werner has shown.
Sorry, I have just noticed that you mentioned formatting. This can be achieved simply by changing the display settings.
Salim Ahmed wrote:
Ok so I have to solve it two different ways other than graphical, so lets say my method is method 1, so method 1 was solved to four decimal places, and if I formatted Mikes to four decimal places thats the question complete isn't it?
I would guess - Yes - but thats something you'll have to ask your teacher.
Other numerical methods would be to use root() or a solve block with find(). But here would just get one solution for a provided guess value. So you would have to do it four times with different guesses to get all four solutions.
Salim Ahmed wrote:
This is the orignal polynomial h(x)=x4-x3-19x2-11x+30, because h(x)=6 I minused 6 from 30 which left me with 24. So now I am confused?
What are you confused about?
Gentlemen Thankyou so much, so my method is correct and then I would use werners method and that question would be correct wouldn't it guys?
Salim Ahmed wrote:
Gentlemen Thankyou so much, so my method is correct and then I would use werners method and that question would be correct wouldn't it guys?
Yes. Werner's method is mine and your method brought together.
Salim Ahmed wrote:
Gentlemen Thankyou so much, so my method is correct and then I would use werners method and that question would be correct wouldn't it guys?
I would rather do it without the float modifier and evaluate X in a separate region as Mike has done. The reason is that using float you actually lose precision. "float" is not just for display but actually affects the values. Furthermore float,4 gives you 4 significant digits while you need 4 decimals!
So to answer my question who's methods will I use, mine and Mikes, or Mine and werners? or Mikes and Werners? or are all 3 combinations correct? Because I just noticed with my method mine isn't to 4 decimal places but its an easy rectification.
Salim Ahmed wrote:
So to answer my question who's methods will I use, mine and Mikes, or Mine and werners? or Mikes and Werners? or are all 3 combinations correct? Because I just noticed with my method mine isn't to 4 decimal places but its an easy rectification.
Use your own method becuase you thought of it and use the symbolic method. My example or Werners, it doesn't matter.
Thankyou gentlemen I really appreciate your help. Do any of you guys know the Newton Raphson method? I have solved a quibic equation but wanted to know if that was correct? Shall I start another thread?
Salim Ahmed wrote:
Thankyou gentlemen I really appreciate your help. Do any of you guys know the Newton Raphson method? I have solved a quibic equation but wanted to know if that was correct? Shall I start another thread?
I would suggest creating a new thread as this one has been marked as answered.
Salim Ahmed wrote:
Thankyou gentlemen I really appreciate your help. Do any of you guys know the Newton Raphson method? I have solved a quibic equation but wanted to know if that was correct? Shall I start another thread?
I agree with Mike - open a new thread.
But this time please show your work by attaching the worksheet, not just a pic.
If you just want to check if your solution is correct you may let Mathcad solve that equation by any method shown in this thread and simply compare solutions.
Using Newton you will get just one solution depending on your start (guess) value similar to using root() or a solve block with find().
I would also suggest to use the method you found out in any way. What Mike an I had shown is basically the same - usage of the symbolic solve - so they do not qualify as two different methods. I had just used the float modifier to avoid the red error which signals that the exact solution with fractions and roots is so large that Mathcad (unfortunately) refuses to display it. But, as Mike has shown, it can be evaluated numerically to as many decimals you like.
So either follow Mikes's way or use something like float,15 and then in any case evaluate numerically in a separate region.
In case you are interested in the exact solution - while Mathcad refuses to show the whole vector with all four solution, its willing to show the solutions one by one and its quite frightening so I want show the complete result here 😉
Is there a way of doing it in a matrix form?
Doing what in Matrix form?
can you solve the equation using a matrix method on mathcad?
rahad miah wrote:
can you solve the equation using a matrix method on mathcad?
What exactly do you have in mind?
Salim Ahmed wrote:
Is there a way of doing it in a matrix form?
?????
Given the new question you have (Newton) which you will open anew thread for - could it be that you are meant to implement two numerical algorithms (lets say Newton and bisection) yourself instead of using Mathcads facilitites?
And could it be that by "doing it in matrix form" you mean that you want to see the intermediate results of the iteration??
If any of the above is guessed correctly I would urge you to open a new thread and state your problem more clearly. In any case you'll have to show what you have done so far.
Werner mate I will start a new thread later.. I have just a small query about the equation on this page h(x), if there is a way I can solve it using matrix method on mathcad.
What exactly do you mean by matrix method? What do you have in mind?
You know that its a single equation and not a system of linear equations?
Yes you are right. So I am happy with the two methods I have completed. Thanks.