3 x 5 = 1 x 4 + 4 x 3 + 1 x 2 + 5 x + 9
The above polynomial has exactly one real root α . Find ⌊ 1 0 0 0 × α ⌋ .
Notation: ⌊ x ⌋ denotes the greatest integer smaller than or equal to x . This is known as the greatest integer function .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Some programs when checking the midpoint of an interval will multiply the middle with one boundary, and if the multiplication is a negative, we know that those 2 numbers have different signs and can be used for the next boundaries. This helps if you not have to worry about a zero having positive slope or negative slope.
Wow, I tend to use Newton Approximation but this is more intuitive!
Or, you could do your sign change to find where the root lies, then separate an x (I used the one on the LHS and use fixed point iteration). I know fixed point iteration doesn't always converge, but you can just try different iterative formula until it works. It's still less time consuming than your method
First get a general idea about where to find the root x 0 . Define
p ( x ) : = − 3 x 5 + x 4 + 4 x 3 + x 2 + 5 x + 9 , p ( 1 ) = 1 7 > − 2 5 = p ( 2 ) ⇒ x 0 ∈ ( 1 ; 2 )
I used fix point iteration - guessing there was a reason why there was a left hand side in the assignment. Taking φ ( x ) : = 3 − 5 1 ( x 4 + 4 x 3 + x 2 + 5 x + 9 ) 5 1 , x k + 1 : = φ ( x k ) , x 1 : = 1
we need 10 iteration for the fourth digit to remain constant, leading to
k 1 2 3 4 5 6 7 8 9 1 0 1 0 0 0 x k 1 4 6 1 . 4 4 2 5 5 1 6 2 1 9 2 5 4 1 6 3 9 . 0 6 9 8 5 2 0 2 5 5 4 4 2 1 7 1 6 . 5 7 5 6 3 1 1 8 6 9 6 2 1 7 5 1 . 4 5 7 2 8 4 9 6 8 4 5 0 4 1 7 6 7 . 3 3 0 6 9 9 8 5 5 3 3 4 6 1 7 7 4 . 5 8 7 1 0 2 9 1 5 4 3 4 5 1 7 7 7 . 9 1 0 9 1 0 4 2 1 9 0 6 1 7 7 9 . 4 3 4 7 4 4 2 2 5 3 6 9 1 7 8 0 . 1 3 3 6 4 4 4 6 7 5 5 4 2 1 7 8 0 . 4 5 4 2 5 1 5 2 3 2 2 8 4 Check: p ( 1 . 7 8 0 ) > 0 . 0 5 > − 0 . 0 2 > p ( 1 . 7 8 1 ) ⇒ x 0 ∈ ( 1 . 7 8 0 ; 1 . 7 8 1 )
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Explanation is up to mark
Mark it to 5. then Mark it back down again to 0.
100000000000000000000000000 is not equaled to 0.
2×2=4+4=7+7=14+14=18 soooooooooooooooo. it muust be 5π+34π
p (x) := 3.
Problem Loading...
Note Loading...
Set Loading...
Let f ( x ) = 3 x 5 − 1 x 4 − 4 x 3 − 1 x 2 − 5 x − 9
We need to find the only real root of f ( x ) = 0 .
Observe that since f ( x ) is a odd degree polynomial and has only one real root α , we can say that
f ( x ) < 0 if x < α ,
f ( x ) = 0 if x = α and
f ( x ) > 0 if x > α .
Note that f ( 0 ) = − 9 < 0 . Hence the root is greater than 0.
f ( 1 ) = − 1 7 < 0 , therefore α > 1
f ( 2 ) = 2 5 > 0 , therefore α < 2
We can conclude that 1 < α < 2 . Thus, 1 and 2 are lower and upper bounds of α . We can use the bisection method to make these bounds tighter and find the approximate value of the root to great precision.
The initial lower and upper bounds are 1 and 2 respectively.
The algorithm evaluates the function f ( x ) at the arithmetic mean of the bounds, i.e. (Lower Bound + Upper Bound)/2 .
If the f ( 2 L + U ) < 0 , then α > 2 L + U and 2 L + U is a better lower bound than L , therefore the lower bound is updated to 2 L + U .
If the f ( 2 L + U ) > 0 , then α < 2 L + U and 2 L + U is a better upper bound than U , therefore the upper bound is updated to 2 L + U .
By repeatedly applying this algorithm, the upper and lower bounds get pretty close to each other, and we can find the value of α to as much precision as required.
The following python code is an implementation of the bisection algorithm. The while loop repeats 20 times, and the final bounds are 1.78072547913 and 1.7807264328. Thus, α ≈ 1 . 7 8 0 7 and ⌊ 1 0 0 0 × α ⌋ = 1 7 8 0 □
We can carry out the same calculation by hand too. It is tedious, but has less error than using computers since floats are not exact
We will now test f ( 2 1 + 2 )
We will now test f ( 2 1 . 5 + 2 )
We will now test f ( 2 1 . 7 5 + 2 )
We will now test f ( 2 1 . 7 5 + 1 . 8 7 5 )
We will now test f ( 2 1 . 7 5 + 1 . 8 1 2 5 )
We will now test f ( 2 1 . 7 5 + 1 . 7 8 1 2 5 )
We will now test f ( 2 1 . 7 6 5 6 2 5 + 1 . 7 8 1 2 5 )
We will now test f ( 2 1 . 7 7 3 4 3 7 5 + 1 . 7 8 1 2 5 )
We will now test f ( 2 1 . 7 7 7 3 4 3 7 5 + 1 . 7 8 1 2 5 )
We will now test f ( 2 1 . 7 7 9 2 9 6 8 7 5 + 1 . 7 8 1 2 5 )
We will now test f ( 2 1 . 7 7 9 2 9 6 8 7 5 + 1 . 7 8 1 2 5 )
We will now test f ( 2 1 . 7 8 0 2 5 9 9 3 7 5 + 1 . 7 8 1 2 5 )
We see that 1 . 7 8 0 2 5 9 9 3 7 5 < α < 1 . 7 8 0 7 5 4 8 7 7 5 , therefore 1 7 8 0 . 2 5 9 9 3 7 5 < 1 0 0 0 α < 1 7 8 0 . 7 5 4 8 7 7 5 .
Thus, the greatest integer less than equal to 1 0 0 0 × α is 1 7 8 0 . □