Assignment # 1
MTH603 (Fall 2011)
Total marks: 10
Lecture # 01-08
Due date: 26-10-2011
DON’T MISS THESE Important instructions:
- Upload assignments properly through LMS only, (No Assignment will be accepted through email).
- All students are directed to use the font and style of text as is used in this document.
- In order to attempt this assignment you should have full command on
Lecture # 01 to Lecture # 08.
- This is an individual assignment, not group assignment, so keep in mind that you are supposed to submit your own, self made & different assignment even if you discuss the questions with your class fellows. All similar assignments (even with some meaningless modifications) will be awarded zero marks and no excuse will be accepted. This is your responsibility to keep your assignment safe from others.
- Above all instructions are for all assignments so may not be mentioned in future.
- There are 4 questions in the assignment but only one question will be graded. However we are not mentioning that which question will be graded so you have to provide the solution of all 4 questions.
- Solve the assignment on MS word document and upload your word (.doc) files only. Do not solve the assignment on MS excel. If we get any assignment on MS excel or any format other than word file then it will not be graded.
- Assignments through e-mail are not acceptable after due date (If there is any problem in submitting your assignment through LMS, you can send your solution file through email with in due date). You are advised to upload your assignment at least two days before Due date.
Question#1 Marks 10
Find the real root of the equation by Bisection method.
Perform three iterations only.
Note: Take any interval in which roots of the equation lie.
Question#2 Marks 10
Use Regula-Fasli method to find the real root of the equation
Correct to four decimal places after three successive approximations in (-2,-1).
Note: All the calculation should be done in the radian mode only.
Question#3 Marks 10
Apply Newton-Raphson method to determine a root of the equation.
Correct to three decimal places using the initial approximation.
Only three iterations needed.
Note: All the calculation should be done in the radian mode only.
Question#4 Marks 10
Find the root of the equation by Second Method taking
as two starting values. Do three iterations only.
SOLUTION:
:::Q1:::
f (x) = x3 – 3x – 5 = 0
f (1) = (1)3 – 3(1) – 5= -7
f (3) = (3)3 – 3(3) – 5 = 13
As f(1) f(3)< 1 therefore roots lies between 1 and 3
We have x0 = 1 , x1 = 3
Now x2 = x0 + x1 /2 = 1+3/2 = x2 = 2
f(2) = (2)3 – 3 (2) – 5 = -3
As f(3) f(2) <0 therefore roots lies between 3 and 2
X1 = 3 , x2 = 2,
X3 = x1 + x2 /2 = 3+2/2 = 2.5
F(2.5) = (2.5)3 -3(2.5) -5 = 3.125
As f(2) f(2.5) < 0 therefore roots lies between 2 and 2.5
X2 = 2 , x3 = 2.5
X4 = x2 + x3 =2+2.5 / 2 = 2.25
f(2.25) = (2.25)3 – 3(2.25) – 5 = -0.36
Now the Real root of the equation after three iterations is 2.25
:::Q2:::
x1 = -2 , x2 = -1
f(x) = x3 – sinx + 1 = 0
f(x1) = (-2)3 – sin(-2) + 1
= -8-(-0.9092)+1
= -6.090
f(x2) = (-1)3 – sin(-1) + 1
= -1 – (0.8414)+1
=0.8414
As f(x1) and f(x2) <0 so the root lies between x1 and x2 the first approximation is
obtained form
X3 = x2 – x2 – x1 / f(x2) – f(x1) f(x2)
x3 = (-1) – (-1) – (-2)/ 0.8414 – (-6.0908) 0.8414
= -1.12137
f(x3) = (-1.12137)3 – sin(-1.12137) + 1
= 0.49060
Now , since f(x1) and f (x3) are of opposite signs , the second approximation is
obtained as
Now we will find x4
X4 = x3 - x3 – x1 / f(x3) – f (x1) f(x3)
= -1.12137 - -1.12137 - (-2) / 0.4906 – (-6.0908) (0.4906)
= -1.18686
f(x4) = (-1.18686)3 –sin(-1.18686) + 1 = 0.25534
Now since f(x1) and f(x4) are of opposite signs , the second approximation is
obtained as now we will find x5
X5 = x4 - x4 – x1 / f(x4) – f(x1) f(x4)
= -1.18686 - -1.18686 - (-2) 0.25534
0.25534 – (-6.0908)
= -1.21957
f(x5) = (-1.21957)3 – sin (-1.21957) + 1 = 0.12502
:::Q3:::
f(x) = cos x – xex
f ’ (x) = -sin x –ex –xe x
now we have initial approximation x0 =1
f (x0) =cos (1) – (1)e1 = -2.1779
f ‘ (x0) = -sin(1) – e1 – 1.e1 = -6.2780
x1 = x0 – f (x0) /f ‘ (x0)
= 1 – (-2.1779) / (-6.2780) = 0.6530
f(x1) = cos(0.6530) – (0.6530) .e 0.6530 = -0.4603
f ‘ (x1) = - sin (0.6530)-e 0.6530 - 0.6530 .e 0.6530 =-3.7834
x2 = x1 – f(x1) / f ‘ (x1)
= 0.6530 – (-0.4603) / (-3.7834) = 0.5313
f (x2) = cos(0.5313) – (0.5313).e 0.5313 = -0.0416
f ‘ (x2) = -sin(0.5313) – e 0.5313 – 0.5313 .e 0.5313 = -3.1116
x3 = x2 - f (x2)
f ‘ (x2)
= 0.5313 – (-0.0416) / (-3.1116) = 0.5179
f(x3) = cos(0.5179) – 0.5179.e 0.5179 = -0.0004
f ‘ (x3) = -sin(0.5179) – e 0.5179 – 0.5179.e 0.5179 = -3.0428
therefore approximate roots after three iterations is 0.5179
:::Q4:::
f(x) = x3 – 3x +1
x0 = 1 , x1 = 0.4
f(x0) = (1)3 -3(1) +1 = -1
f(x1) = (0.4)3 – 3(0.4) +1 = -0.136
x2 = x0.f(x1) – x1.f(x0) /f(x1) – (x0)
x2 = 1.(-0.136) – 0.4(-1) / -0.136 – (-1) =0.264 / 0.864 = 0.3055
f(x2) = (0.3055)3 – 3(0.3055) + 1 = 0.1120
x3 = x1.f(x2) – x2.f(x1) / f(x2) – f(x1)
= 0.4(0.1120) – 0.3055(-0.136) / 0.1120 – (-0.136) = 0.0863 / 0.248 =0.3479
f(x3) = (0.3479)3 – 3(0.3479) + 1 = -0.0015
x4 = x2.f(x3) – x3.f(x2) / f(x3) – f(x2)
= 0.3055(-0.0015) – 0.3479(0.1120) / (-0.0015) – 0.1120 = -0.0394 / -0.1135
=0.3471
f(x4) = (0.3471)3 – 3(0.3471) + 1 = 0.0418 – 1.0413 + 1 = 0.0005
0 comments
Post a Comment