An archive the questions from Mark's Spring 2019 Calculus I classes.

Applying the bisection method to your personal function

mark

(10 pts by Thursday, Jan 31)

Generate a random function using this Sage Cell link. Be sure to seed the random number generator by setting the value inside set_random_seed to be your position in the Groovy Class Randomizer on our class web page. Add 24 to your position, if you’re in the afternoon section.

Once you’ve got your random function,

  • show it to us by typing it into your answer,
  • write down a complete sentence showing that your function has a root in [0,1],
  • include a graph of your function,
  • implement five bisection steps and tell us what interval the root that the bisection method finds lies in.
ImpossiblyStupid

f(x)= -18x^4+33x^3-15x^2+2x-1

Bisection Values for N:
N=1, x= 0.5, f(x)= -0.75
N=2, x= 0.75, f(x)= 0.289
N=3, x= 0.625, f(x)= -0.299
N=4, x= 0.6875, f(x)= -0.013
N=5, x= 0.71875, f(x)= 0.138

The closest interval was the fourth interval and I believe the root to be 0.69.

jcantwel

10*x^5 - 10*x^4 - 10*x^3 + 10*x^2 + 2*x - 1
bisetion

[0,1], x=0.5, f(x)=0.9375
[0,0.5], x=0.25, f(x)=-0.060546875
[0.25,.05], x=.375, f(x)=0.5053100586
[0.25, 0.375], x=0.3125, f(x)=0.2308216095
[0.25, 0.3125], x=0.28125 f(x)=0.0860698819

The interval that was closest to the root was [0,0.5]. The root is somewhere on the interval of [0.25,0.28125]

ssteel

f(x)= 18x^5-54x^4+54x^3-18x^2+2x-1
image
f(x)= 18x^5-54x^4+54x^3-18x^2+2x-1 has a root in (0,1), by IVT since f (-1) = -143 < 0, f(1) = -3 < 0 and f is continous on [0,1]
N=1, [0,1], x=0.5 f(x)= -0.5625
N=2, [0,0.5], x=0.25 f(x)= -0.9746
N=3, [0.25,0.05], x=.375 f(x)= -0.8679
N=4, [0.25,0.375], x=0.3125 f(x)= -0.9462
N=5, [0.25,0.3125], x=0.28125 f(x)= -0.9662
The interval that eas closest tothe root was [0,0.25]

audrey

Since I’m not really in the class, I’m going to use the random seed zero. That gives me the function:
f(x) = 4*x^4 + 4*x^3 - 8*x^2 + 2*x - 1
whose graph looks like so:

image

It sure looks like there’s a root and we can use the intermediate value theorem to prove it:

f(x) = 4*x^4 + 4*x^3 - 8*x^2 + 2*x - 1 has a root in (0,1) by the intermediate value theorem since f(0)=-1<0, f(1)=1>0, and f is continuous on [0,1].

We can zoom in on a root with the bisection method. We compute:

  1. f(1//2)=-5//4<0 so there’s a root in [1//2,1],
  2. f(3//4) = -67//64<0 so there’s a root in [3//4,1],
  3. f(7//8) = -359//1024<0 so there’s a root in [7//8,1],
  4. f(15//16) = 3761//16384>0 so there’s a root in [7//8,15//16], and
  5. f(29//32) = -21647//262144<0 so our final interval containing a root is [29//32,15//16].

I can still edit this, even after the question closed!

amonroe

The function f(x)=12x^5+18x^4-30x^3+2x-1 has a root between [0,1] since f(0)=-1<0, f(1)=1>0 and because f is continuous on [0,1]

image

bisections:
[0,1], x=0.5, f(0.5)=−2.25
[0.5,1], x=0.75, f(0.75)=−3.61
[0.75,1], x=0.875, f(0.875)=−2.64
[0.875,1], x=0.9375, f(0.9375)=−1.25
[0.9375,1], x=0.975, f(0.975)=-0.0163

the root falls in the interval between [0.975, 1]

tsnyder

f(x)=18x^5-54x^4+54x^3-18x^2+2x-1

Since f(0) = -1 which is less than 0 and f(1) is greater than 0 and f(x) is a polynomial that is continuous everywhere there must be at least one zero in the interval.

n=1 [0.5,1] x=-0.5625 f(x)= 1
n=2 [0.75, 0.5] x=0.3418 f(x)=-0.5625
n=3 [0.625, 0.75] x=-0.12079 f(x)=0.3417
n=4 [0.6875, 0.625] x=0.1154 f(x)=-0.12079
n=5 [0.65625,0.6875] x=-0.0024 f(x)=0.1154

The root lies somewhere in-between the interval (0.65625, 0.6875)

hhill

The function f(x)=30x^4-66x^3+36x^2+2x-1 has a root between [0,1] by the Intermediate Value Theorem, since f(0)=-1<0, f(1)=1>0, and f(x) is continuous on [0,1].
image
Bisectional Steps:
1: [0,1] c=0.5, f(0.5) = 2.625
2: [0, 0.5] c=0.25, f(0.25) = 0.8359375
3: [0, 0.25] c=0.125, f(0.125) = −0.30908203125
4: [0.125, 0.25] c=0.1875, f(0.1875) = 0.242645263672
5: [0.125, 0.1875] c=0.15625, f(0.15625) = −0.0424823760986
Root must be between: (0.15625, 0.1875)

sbatten

f(x)=15x^4+3x^3-18x^2+2x-1

image

f(x)=15x^4+3x^3-18x^+2x-1 has a root in (0,1) by the intermediate value theorem since f(0)=-1<0, f(1)=1>0, and f is continuous on [0,1].

f(.5)=-3.1875 < 0
f(.75)=-3.61328125 < 0
f(.875)=-2.2257 < 0
f(.9375)= -0.88672 < 0
f(.97)= 0.021270 > 0
f(.1)= -0.97 < 0 so our final interval containing a root is [.97,.1]

Max

[0.4375,0.5]
The function has a root between [0,1].
https://sagecell.sagemath.org/?z=eJyNTssKwjAQvOcrRrzspomaHgRBf8GLR5UidEVBm5JWiH9vQi3orafdeezMdtJX4dLU_ll1IjW5DWOOrbUWB-nx9q-AQUfWcZMgM6WuFBk7kHWsddbvTU8rk9AInFkzNKL-YUrW5Gzkfy65TgqgCWEoplWm0AKljtZhfDWPhcQ2eYmVakO-yCR_931CbllyJh5-0MwxmlRx5g-c4VF-&lang=sage

nspicer

https://sagecell.sagemath.org/?z=eJyNTssKwjAQvOcrRrzspomaHgRBf8GLR5UidEVBm5JWiH9vQi3orafdeezMdtJX4dLU_ll1IjW5DWOOrbUWB-nx9q-AQUfWcZMgM6WuFBk7kHWsddbvTU8rk9AInFkzNKL-YUrW5Gzkfy65TgqgCWEoplWm0AKljtZhfDWPhcQ2eYmVakO-yCR_931CbllyJh5-0MwxmlRx5g-c4VF-&lang=sage
The root of this equation is (0,1). The IVT falls between (0.75,1)

dcarr

My equation is: -12x^5+18x^4-6x^3+2x-1

By looking at the graph, you can see that there is a root between the interval [0,1].
The equation f(x)= -12x^5+18x^4-6x^3+2x-1 has a root in the the interval [0,1] because f(0)=-1 < 0, f(1)=1 > 0, and f(x) is continuious on the interval [0,1].

N1
Lower: f(0)=-1
Upper: f(1)=1
Midpoint: f(1/2)=0
Luckily, my root falls at the bisection of my first interval, so the root is in the interval [0,1] at f(1/2).

CaptainJackSparrow

f(x)=-3x^5-6x^4+9x^3+2x-1
image
f(x)=-3x^5 - 6x^4 + 9x^3 + 2x - 1 has a root in (0,1) by the IVT because f(0) = -1<0,f(1)=1>0, and f is continuous on [0,1].
f(.50) = .6563 a root in [0,0.5],
f(.25) = -0.386 a root in [.25,0.5]
f(.375)= 0.084 a root in [.25, 0.375]
f(.3125)= -0.166 a root in [0.3125, 0.375]
f(.3437)=-0.045 a root in [0.3437,0.375]
so the root of this function lies between [0.3437,0.375]

bloodwolf

My function gives me f(x)=-6x^4+18x^3-12x^2+2x-1 and the graph looks like:

f(x)= -6x^4+18x^3-12x^2+2x-1 has a root in [0,1] by the intermediate value theorem since f(0)=-1<0 , f(1)=1>0, and f(x) is continuous on [0,1].

Bi-sectional Steps:

  1. [0,1], x=0.5, f(0.5)=-1.125
  2. [0.5,1], x=0.75, f(0.75)=-0.554
  3. [0.75,1], x=0.875, f(0.875)=0.104
  4. [.075.875], x=0.8125, f(0.8125)=-0.2569
  5. [.8125,0.875], x=0.8437, f(0.8437)=-0.0845
    Root must be between (0.8125,0.875)
shendricks

image

f(x)=4x^4-16x^3+12x^2+2x-1
Because f(0)=-1<0<f(1)=1, and f(x) is continuous on the interval (0,1), f(x) has a root within the interval (0,1) according to the IVT.

f(,5)=1.25
f(.25)=.015625
f(.175)=-.3644984375
f(.2125)=-.1784999023
f(.23125)=-.0822055603 the root must lay in the interval (.21,.23)

Dylonm

My function is: f(x)=-5x^5 + 5x^4 + 5x^3 - 5x^2 +2x - 1

The graph looks like this: Graph%20image%20HW%20discuss

f(x) = -5x^5 + 5x^4 + 5x^3 - 5x^2 +2x - 1 has a root in (0,1). Using the Intermediate value therom we can conclude since f(0)= -1<0, also f(1) = 1>0,
and f is continuous on [0,1].

By using the bisection method

Step 1. f(.5) = -.4687 < 0 which = a root at [.5,1]
Step 2. f(.75) = .1924 > 0 which = a root at [.5,.75]
Step 3. f(.625) = -.1963 < 0 which = a root at [.625,.75]
Step 4. f(.6875) = -.0144 < 0 which = a root at [.6875,.75]
Step 5. f(.695) = .009 > 0 which = a root at [.6875,.695]

Final Interval: [.6875,.695]

mark

@Dylonm Be sure to typeset your function by wrapping it in percentage symbols. Thus, I can create
f(x) = x^2-2
by typing

%f(x)=x^2-2% 

Also, copy and past the image of the graph from the web page, rather than the URL as you’ve done.

achow1

Using the random seed one, I got the function f(x)=4*x^4-24*x^3+20*x^2+2*x-1 with its graph below:

image

f(x)=4*x^4-24*x^3+20*x^2+2*x-1 has a root in (0,1) by the Intermediate Value Theorem since f(0)=-1<0, f(1)=1>0, and f is continuous on [0,1].

Using the bisection method, the following was calculated:

  1. f(1/2)=9/4>0, so a root is in [0,1/2],
  2. f(1/4)=25/64>0, so a root is in [0,1/4],
  3. f(1/8)=-495/1024<0, so a root is in [1/8,1/4],
  4. f(3/16) =-0.0751<0, so a root is in [3/16,1/4],
  5. f(7/32)=0.1525 > 0.

After 5 bisections, the final root-containing interval is [3/16,7/32].

ndudde

f(x)=-30x^5 + 30x^4 + 30x^3 - 30x^2 + 2x - 1
sage1

f(x)=-30x^5 + 30x^4 + 30x^3 - 30x^2 + 2x - 1 has a root in (0,1) by the intermediate value theorem since f(0)=−1&lt;0, f(1)=1&gt;0, and f is continuous on [0,1].

5 bisections:

  1. f(.5)=−2.8125 so root is in [.5, 1]
  2. f(.75)=−1.3457 so root is in [.75, 1]
  3. f(.875)=.0771 so root is in [.75, .875]
  4. f(.8125)=-.637 so root is in [.8125, .875]
  5. f(.84375)=-.2739 so root is in [.875, .84375]

Therefore, the root falls in the interval between [.875, .84375]

tippuh

My random function: -30*x^4 + 35*x^3 - 5*x^2 + 2*x - 1

Graph:
Bisection%20Graph

f(x) = -30*x^4 + 35*x^3 - 5*x^2 + 2*x - 1 has a root in (0,1) by the intermediate value theorem since f(0) = -1 <0, f(1) = 1 > 0 and f is continuous on [0,1]

Five bisections:

  1. f(0.5) = 1.25 > 0 so theres a root in [0,0.5]

  2. f(0.25) = -0.3828125 < 0 so theres a root in [0.25,0.5]

  3. f(0.375) = 0.29931640625 > 0 so theres a root in [0.25,0.375]

  4. f(0.3125) = -0.0812683105469 < 0 so theres a root in [0.3125,0.375]

  5. f(0.3437) = −0.935787307265 < 0 so theres a root in [0.327,0.3437]

Our final root interval lies between [0.327,0.3437]