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

Assignment3

The document outlines several iterations of the false position method and other numerical methods to find roots of various equations. It includes detailed calculations for multiple questions, demonstrating the iterative process and convergence to solutions. The final results for each question indicate the approximate roots found and the corresponding error percentages.

Uploaded by

omarsherief247
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)
2 views

Assignment3

The document outlines several iterations of the false position method and other numerical methods to find roots of various equations. It includes detailed calculations for multiple questions, demonstrating the iterative process and convergence to solutions. The final results for each question indicate the approximate roots found and the corresponding error percentages.

Uploaded by

omarsherief247
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/ 6

ASSIGNMENT 3

Name: Omar Sherief AbdelGhany


Ahmed
Code:2227193
f ( Xu)( Xu− Xl)
For the false position method Xr =Xu- f ( Xu)− f (Xl )
and same as Bisecting method for choosing
Xr = Xu or Xl and getting ea and comparing it with
es
And putting F(x)=0

𝑥3+cos 𝑥 =0
Question 1

1-st iteration => Xl=-1 Xu =1


f(Xu)=1.5403 f(Xl)=-0.4597
Then Xr = -0.5403 f(Xr) =0.6998
==> Xr=Xu

2-nd iteration => Xl=-1 Xu =-0.5403


f(Xu)=0.6998 f(Xl)=-0.4597
Then Xr =-0.817745 f(Xr )=0.13703
==> Xr=Xu
3-rd iteration => Xl=-1 Xu =-0.817745
f(Xu)=0.13703 f(Xl)=-0.4597
Then Xr =-0.8596 f(Xr )=0.01757
==> Xr=Xu
4-th iteration => Xl=-1 Xu =-0.8596
f(Xu)=0.01757 f(Xl)=-0.4597
Then Xr =-0.86477 f(Xr )=0.00211666
==> Xr=Xu

5-th iteration => Xl=-1 Xu =-0.86477


f(Xu)=0.00211666 f(Xl)=-0.4597
Then Xr =-0.86539 f(Xr )=0.0002528
==> Xr=Xu

6-th iteration => Xl=-1 Xu =-0.86539


f(Xu)=0.0002528 f(Xl)=-0.4597
Then Xr =-0.86464 f(Xr )=0.0025072
==> Xr=Xu

7-th iteration => Xl=-1 Xu =-0.86464


f(Xu)=0.0025072 f(Xl)=-0.4597
Then Xr =-0.865374 f(Xr )=0.0003009
==> Xr=Xu

8-th iteration => Xl=-1 Xu =-0.865374


f(Xu)=0.0003009 f(Xl)=-0.4597
Then Xr =-0.866254 f(Xr )=0.0003009
==> Xr=Xu

Continue till we reach Xr= -0.865447

Question 2
ex + 2 + 2cos x - 6=0
−x

1-st iteration =>


Xl=1 Xu =2
f(Xu)=0.806762 f(Xl)=-1.70111
Then Xr = 1.6783 f(Xr) =-0.5457
==> Xr=Xl

2-nd iteration => Xl=1.6783 Xu =2


f(Xu)=0.806762 f(Xl)=-0.5457
Then Xr = 1.8081 f(Xr)=-0.08575
Xl =Xr

3-rd iteration => Xl=1.8081 Xu =2


f(Xu)=0.806762 f(Xl)=-0.08575
Then Xr = 1.826537 f(Xr)=-0.0116475
Xl =Xr

4-th iteration => Xl=1.826537 Xu =2


f(Xu)=0.806762 f(Xl)=-0.0116475
Then Xr =1.829 f(Xr)=-0.001573
Xl =Xr

5-th iteration => Xl=1.829 Xu =2


f(Xu)=0.806762 f(Xl)=-0.001573
Then Xr =1.82933 at final ea=0.0018%<0.005%
Question 3
x -2sin(x)
1-st Iteration
Xl=1 ==> f(xl)=-0.6829
Xu=2 ==>f(xu)=0.1814
Xr =1.79012
==>f(Xr)=-0.162
Xl =Xr
2-nd Iteration
Xl=1.79012 ==> f(xl)=-0.162
Xu=2 ==>f(xu)=0.1814
Xr =1.88913
==>f(Xr)=-0.01
Xl =Xr

3-rd Iteration
Xl=1.88913 ==> f(xl)=-0.01
Xu=2 ==>f(xu)=0.1814
Xr =1.895 ==>f(Xr)=-0.01 Xl =Xr
4-th Iteration
Xl=1.895 ==> f(xl)=-0.00081
Xu=2 ==>f(xu)=0.1814
Xr =1.895467 we get ea = 0.025%<es
Then the root of the equation is 1.895467

Question 4
f(x)= sin(√ x)-x =0 ==>x=sin(√ x) es =0.01%
Xi+1 = sin(√ xi) X0= 1
X1=0.841471 X2=0.794
X 2− x 1
ea =¿ x 2 |=5.97%<es
X3=0.777742 X4=0.7719
X5=0.7699 X6=0.7691
X7=0.768808 X8=0.768707
X9=0.76867
At final we get
%ea=0.0048%<%es

Question 5
It is required to find an iterative formula
g(x),
Such that g’(X)<0
then We get g(x)=√ −cos (x) ==> x=√ −cos (x)
3 3

X1= 0.86785 X2= -0.86467


X3= -0.865747 X4=-0.86538
From the 4-th iteration
We get %ea=0.042%<es
Then the root is -0.86538

Question 6
3
We ‘ ll get the formula g(x)=2+ x
X0=4 es=0.05%
X1=2.75 X2=3.909 X3=2.9706
X4=3.01 X5=2.9967 X6=3.001
X7=2.999633
Then x=2.999633

Question 7
x must be between the interval
[0,0.11meter]
Xu =0.11 Xl =0
We ‘ll substitude the Xl and Xu till we
reach ea <es using Bisection method

You might also like