Message Boards Message Boards

0
|
2829 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

Why roundoff error in solving cubic equation?

Posted 11 years ago
Hey guys!!

while solving the following cubic equation in Wolfram Mathematica 9

-0.363700352e-2*x^3-.4041941000*x^2+3.397775673*x-2.377540486 = 0

I got these three roots

x = .7709248124
x= 7.123944371
x= -119.0286907

But,

While looking for step to step solution, it shows round-off error at each roots. Why is it so?
I want answers in simple forum directly only by using these formulas. As i have to show the proof!


Both files are attached.


Thanks in advance,
Attachments:
POSTED BY: Syeda Sarah
You can avoid round-off error in the steps by rationalizing the problem and solving it symbolically and then finding the numerical value of the answer.
 In[18]:= res =
   Solve[Rationalize[(-0.363700352*10^-2)*x^3 - .4041941000*x^2 +
       3.397775673*x - 2.377540486 == 0, 10^-16], x];
 
 In[19]:= N[res, 16]
 
 Out[19]= {{x ->
    7.123944370913387 + 0.*10^-16 I}, {x -> -119.02869068703848 +
     0.*10^-15 I}, {x -> 0.7709248124293782 + 0.*10^-17 I}}
POSTED BY: Frank Kampas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract