Why i have got two different answer with two logical method?

28 Views Asked by At

I have to find the root of following function

$$f(x)=81.45472 \cdot x^2+ 96.5008\cdot x-283.6563.$$

There are two methods: finding by mathematical formula, delta method, which gives this answer: delta= 96.5008^2+4*81.45472*283.6563=101733, so x=9060.017. I have tried sing multiroot in R

multiroot(f1,start=c(0,100000)) $root [1] 1.365515 1.365515

$f.root [1] 0.000000e+00 1.136868e-13

$iter [1] 21

$estim.precis [1] 5.684342e-14

The result based on multiroot is true. But i do not know where i am doing mistake? Any one know?

1

There are 1 best solutions below

0
On

There is no problem with the multiroot method. It is your calculation error.

f(x) = 81.45472 * x^2 + 96.5008 * x - 283.6563

So, delta = 101733, which is right in your calculation.

but equation for finding root is,

x = [-b +(or -) sqrt(D)] / [2*a]

Solving this equation gives

x = 1.36 or -2.54 (Approx)

Which is same as multiroot() output.