0% found this document useful (0 votes)
24 views

Numerical Computing: Lab Assignment

This document contains information about using the bi-section method to find the root of equations numerically. It includes the formulas used in the bi-section method, an example of applying the method to find the root of f(x)=x^3-10, and the results from 7 iterations of the method in a table. It also includes a second example of applying the bi-section method to find the root of f(x)=0.4x^2-39 over 10 iterations.

Uploaded by

Adeel Durrani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Numerical Computing: Lab Assignment

This document contains information about using the bi-section method to find the root of equations numerically. It includes the formulas used in the bi-section method, an example of applying the method to find the root of f(x)=x^3-10, and the results from 7 iterations of the method in a table. It also includes a second example of applying the bi-section method to find the root of f(x)=0.4x^2-39 over 10 iterations.

Uploaded by

Adeel Durrani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Numerical Computing

Lab Assignment

Bi-Section Method

Bi-Section Method
Formulas
f(x) = x3-10
Error = 0.5 * ((x2 - x1)/xm)
xm = (x1 + x2 )/2
Variables:
x1 = 2
x2 = 3
E = 0.01

x1

x2

f(x1)

f(x2)

xm

f(xm)

-2

17

2.5

5.625

0.2

2.5

-2

5.625

2.25

1.390625

0.111111

2.25

-2

1.390625

2.125

-0.4043

0.058824

2.125

2.25

-0.4043

1.390625

2.1875

0.467529

0.028571

2.125

2.1875

-0.4043

0.467529

2.15625

0.025299

0.014493

2.125

2.15625

-0.4043

0.025299

2.140625

-0.19107

0.007299

Formulas used in Excel Sheet as per given values and formulas:


A2
B2

=2
=3

f(x1)

=(A2^3)-10

f(x2)

=(B2^3)-10

xm

=(A2+B2)/2

f(xm)

=(E2^3)-10

Error (E)

=0.5*((B2-A2)/E2)

Formulas used in second row for x1 & x2 values


A3
B3

=IF(C2*F2<0, A2, E2)


=IF(D2*F2<0, B2, E2)

Bi-Section Method
Formulas

27-2-2014

f(x) = 0.4 * x^2 -39


Error = 0.5 * ((x2 - x1)/xm)
xm = (x1 + x2 )/2
Variables:
x1 = 9 , x2 = 11
E = 0.01
n = 10

x1

x2

f(x1)

f(x2)

xm

f(xm)

Status

11

-6.6

9.4

10

0.1

InProgress

10

-6.6

9.5

-2.9

0.05263

InProgress

9.5

10

-2.9

9.75

-0.975

0.02564

InProgress

9.75

10

-0.975

9.875

0.00625

0.01266

InProgress

9.75

9.875

-0.975

0.00625

9.8125

-0.4859

0.00637

Complet
ed

9.8125

9.875

-0.4859

0.00625

9.84375

-0.2402

0.00317

9.84375

9.875

-0.2402

0.00625

9.85938

-0.1171

0.00158

9.85938

9.875

-0.1171

0.00625

9.86719

-0.0554

0.00079

9.86719

9.875

-0.0554

0.00625

9.87109

-0.0246

0.0004

Formulas used in Excel Sheet as per given values and formulas:

Root Possible
A2
B2
C2
f(x1)
f(x2)
xm
f(xm)
Error (E)

=IF(D2*G2<0, "Possible", "Not Possible")

=n
=9
= 11
=(0.4*B2^2)-39
=(0.4*C2^2)-39
=(B2+C2)/2
=(0.4*F2^2)-39
=0.5*((C2-B2)/F2)

Formulas used in second row for x1 & x2 values


A3
=IF(D2*G2<0, B2, F2)
B3
=IF(E2*G2<0, C2, F2)
Status
=IF(OR(H2<0.01,A2=10),"Completed, In-Progress")

You might also like