Page 1
Edurev123
Numerical Analysis and Computer
Programming
1. Solution of Algebraic and
Transcendental Equation of One Variable
1.1 Develop an algorithm for Regula-Falsi method to find a root of ?? (?? )=?? starting
with two initial iterates ?? ?? and ?? ?? to the root such that ???????? ?(?? (?? ?? ))??????? ?(?? (?? ?? )) .
Take ?? as the maximum number of iterations allowed and eps be the prescribed
error.
(2009 : 30 Marks)
Solution:
1. Read ?? 0
,?? 1
, eps, ??
Remarks : ?? 0
and ?? 1
are two initial guesses to the root such that sin?(?? (?? 0
))?
sign?(?? (?? 1
)) . The prescribed precision is eps and ?? is the maximum number of iterations.
Steps 2 and 3 are initialization steps.
2.?? 0
????? (?? 0
)
3.?? 1
??? (?? 1
)
4.For ?? =1 to ?? in steps of 1 do.
5.?? 2
?(?? 0
?? 1
-?? 1
?? 0
)/(?? 1
-?? 0
)
6.?? 2
??? (?? 2
)
7.if |?? 2
!= eps then
8. begin write 'convergent solution', ?? 2
,?? 2
9 . stop end
10. if sign?(?? 2
)?sign?(?? 0
)
11. Then begin ?? 1
??? 2
12. ?? 1
??? 2
end
13. else begin ?? 0
??? 2
14. ?? 0
??? 2
end
Page 2
Edurev123
Numerical Analysis and Computer
Programming
1. Solution of Algebraic and
Transcendental Equation of One Variable
1.1 Develop an algorithm for Regula-Falsi method to find a root of ?? (?? )=?? starting
with two initial iterates ?? ?? and ?? ?? to the root such that ???????? ?(?? (?? ?? ))??????? ?(?? (?? ?? )) .
Take ?? as the maximum number of iterations allowed and eps be the prescribed
error.
(2009 : 30 Marks)
Solution:
1. Read ?? 0
,?? 1
, eps, ??
Remarks : ?? 0
and ?? 1
are two initial guesses to the root such that sin?(?? (?? 0
))?
sign?(?? (?? 1
)) . The prescribed precision is eps and ?? is the maximum number of iterations.
Steps 2 and 3 are initialization steps.
2.?? 0
????? (?? 0
)
3.?? 1
??? (?? 1
)
4.For ?? =1 to ?? in steps of 1 do.
5.?? 2
?(?? 0
?? 1
-?? 1
?? 0
)/(?? 1
-?? 0
)
6.?? 2
??? (?? 2
)
7.if |?? 2
!= eps then
8. begin write 'convergent solution', ?? 2
,?? 2
9 . stop end
10. if sign?(?? 2
)?sign?(?? 0
)
11. Then begin ?? 1
??? 2
12. ?? 1
??? 2
end
13. else begin ?? 0
??? 2
14. ?? 0
??? 2
end
end for
15. Write 'Does not converge in ?? iterations'.
16. Write ?? 2
,?? 2
17. Stop
1.2 Find the positive root of the equation
???? ?? ?? -?? ?? -?? =??
correct upto 6 decimal places by using Newton-Raphson method. Carry out
computations only for three iterations.
(2010 : 12 Marks)
Solution:
Given :
????????????????????????????? (?? )=10?? ?? -?? 2
-1
??????????????????????????? '
(?? )=10?? -?? 2
+10?? ?? -?? 2
×(-2?? )
?????????????????????????????????????=10?? -?? 2
(1-2?? 2
)
Let ?? 0
=0
Using Newton-Raphson's method
?? ?? +1
?=?? ?? -
?? (?? ?? )
?? '
(?? ?? )
?? 1
?=?? 0
-
?? (?? 0
)
?? '
(?? 0
)
=0-(-0.1)=0.1
?? 2
?=?? 1
-
?? (?? 1
)
?? '
(?? 1
)
=0.101026
?? 3
?=?? 2
-
?? (?? 2
)
?? '
(?? 2
)
=0.101026
? The positive root is 0.101026 (approx.)
1.3 Use Newton-Raphson method to find the real root of the equation ?? ?? =?????? ??? +
?? correct to four decimal places.
(2012 : 12 Marks)
Solution:
The given equation is
?? (?? )=3?? -cos??? -1=0
60)<0 and ?? (0.61)>0
Page 3
Edurev123
Numerical Analysis and Computer
Programming
1. Solution of Algebraic and
Transcendental Equation of One Variable
1.1 Develop an algorithm for Regula-Falsi method to find a root of ?? (?? )=?? starting
with two initial iterates ?? ?? and ?? ?? to the root such that ???????? ?(?? (?? ?? ))??????? ?(?? (?? ?? )) .
Take ?? as the maximum number of iterations allowed and eps be the prescribed
error.
(2009 : 30 Marks)
Solution:
1. Read ?? 0
,?? 1
, eps, ??
Remarks : ?? 0
and ?? 1
are two initial guesses to the root such that sin?(?? (?? 0
))?
sign?(?? (?? 1
)) . The prescribed precision is eps and ?? is the maximum number of iterations.
Steps 2 and 3 are initialization steps.
2.?? 0
????? (?? 0
)
3.?? 1
??? (?? 1
)
4.For ?? =1 to ?? in steps of 1 do.
5.?? 2
?(?? 0
?? 1
-?? 1
?? 0
)/(?? 1
-?? 0
)
6.?? 2
??? (?? 2
)
7.if |?? 2
!= eps then
8. begin write 'convergent solution', ?? 2
,?? 2
9 . stop end
10. if sign?(?? 2
)?sign?(?? 0
)
11. Then begin ?? 1
??? 2
12. ?? 1
??? 2
end
13. else begin ?? 0
??? 2
14. ?? 0
??? 2
end
end for
15. Write 'Does not converge in ?? iterations'.
16. Write ?? 2
,?? 2
17. Stop
1.2 Find the positive root of the equation
???? ?? ?? -?? ?? -?? =??
correct upto 6 decimal places by using Newton-Raphson method. Carry out
computations only for three iterations.
(2010 : 12 Marks)
Solution:
Given :
????????????????????????????? (?? )=10?? ?? -?? 2
-1
??????????????????????????? '
(?? )=10?? -?? 2
+10?? ?? -?? 2
×(-2?? )
?????????????????????????????????????=10?? -?? 2
(1-2?? 2
)
Let ?? 0
=0
Using Newton-Raphson's method
?? ?? +1
?=?? ?? -
?? (?? ?? )
?? '
(?? ?? )
?? 1
?=?? 0
-
?? (?? 0
)
?? '
(?? 0
)
=0-(-0.1)=0.1
?? 2
?=?? 1
-
?? (?? 1
)
?? '
(?? 1
)
=0.101026
?? 3
?=?? 2
-
?? (?? 2
)
?? '
(?? 2
)
=0.101026
? The positive root is 0.101026 (approx.)
1.3 Use Newton-Raphson method to find the real root of the equation ?? ?? =?????? ??? +
?? correct to four decimal places.
(2012 : 12 Marks)
Solution:
The given equation is
?? (?? )=3?? -cos??? -1=0
60)<0 and ?? (0.61)>0
Hence, a real root of ?? (?? ) lies in the interval (0.60,0.61)
?? (?? )=3+sin???
From Newton-Raphson's method, we have
?? ?? +1
?=?? ?? -
?? (?? ?? )
?? '
(?? ?? )
?=?? ?? -
3?? ?? -cos??? ?? -1
3+sin??? ??
Taking ?? 0
=0.60, we get
?? 1
?=?? 0
-
?? (?? 0
)
?? '
(?? 0
)
?=?? 0
-
3?? 0
-cos??? 0
-1
3+sin??? 0
?=0.60-
3(0.60)-cos?(0.60)-1
3+sin?(0.60)
?=0.60701
?? 2
?=?? 1
-
?? (?? 1
)
?? '
(?? 1
)
?=?? 1
-
3?? 1
-cos??? 1
-1
3+sin??? 1
?=0.60701-
3(0.60701)-cos?(0.60701)-1
3+sin?(0.60701)
?=0.60710
?? 3
?=?? 2
-
?? (?? 2
)
?? '
(?? 2
)
?=?? 2
-
3?? 2
-cos??? 2
-1
3+sin??? 2
?=0.60710-
3(0.60710)-cos?(0.60710)-1
3+sin?(0.60710)
?=0.60710
Since ?? 2
=?? 3
,??? =0.60710 is a root of ?? (?? ) .
1.4 Apply Newton-Raphson method to determine a root of the equation ?????? ??? -
?? ?? ?? =?? . Correct upto four decimal places.
(2014 : 10 Marks)
Solution:
?? (?? )=cos??? -?? ?? ??
So that,
Page 4
Edurev123
Numerical Analysis and Computer
Programming
1. Solution of Algebraic and
Transcendental Equation of One Variable
1.1 Develop an algorithm for Regula-Falsi method to find a root of ?? (?? )=?? starting
with two initial iterates ?? ?? and ?? ?? to the root such that ???????? ?(?? (?? ?? ))??????? ?(?? (?? ?? )) .
Take ?? as the maximum number of iterations allowed and eps be the prescribed
error.
(2009 : 30 Marks)
Solution:
1. Read ?? 0
,?? 1
, eps, ??
Remarks : ?? 0
and ?? 1
are two initial guesses to the root such that sin?(?? (?? 0
))?
sign?(?? (?? 1
)) . The prescribed precision is eps and ?? is the maximum number of iterations.
Steps 2 and 3 are initialization steps.
2.?? 0
????? (?? 0
)
3.?? 1
??? (?? 1
)
4.For ?? =1 to ?? in steps of 1 do.
5.?? 2
?(?? 0
?? 1
-?? 1
?? 0
)/(?? 1
-?? 0
)
6.?? 2
??? (?? 2
)
7.if |?? 2
!= eps then
8. begin write 'convergent solution', ?? 2
,?? 2
9 . stop end
10. if sign?(?? 2
)?sign?(?? 0
)
11. Then begin ?? 1
??? 2
12. ?? 1
??? 2
end
13. else begin ?? 0
??? 2
14. ?? 0
??? 2
end
end for
15. Write 'Does not converge in ?? iterations'.
16. Write ?? 2
,?? 2
17. Stop
1.2 Find the positive root of the equation
???? ?? ?? -?? ?? -?? =??
correct upto 6 decimal places by using Newton-Raphson method. Carry out
computations only for three iterations.
(2010 : 12 Marks)
Solution:
Given :
????????????????????????????? (?? )=10?? ?? -?? 2
-1
??????????????????????????? '
(?? )=10?? -?? 2
+10?? ?? -?? 2
×(-2?? )
?????????????????????????????????????=10?? -?? 2
(1-2?? 2
)
Let ?? 0
=0
Using Newton-Raphson's method
?? ?? +1
?=?? ?? -
?? (?? ?? )
?? '
(?? ?? )
?? 1
?=?? 0
-
?? (?? 0
)
?? '
(?? 0
)
=0-(-0.1)=0.1
?? 2
?=?? 1
-
?? (?? 1
)
?? '
(?? 1
)
=0.101026
?? 3
?=?? 2
-
?? (?? 2
)
?? '
(?? 2
)
=0.101026
? The positive root is 0.101026 (approx.)
1.3 Use Newton-Raphson method to find the real root of the equation ?? ?? =?????? ??? +
?? correct to four decimal places.
(2012 : 12 Marks)
Solution:
The given equation is
?? (?? )=3?? -cos??? -1=0
60)<0 and ?? (0.61)>0
Hence, a real root of ?? (?? ) lies in the interval (0.60,0.61)
?? (?? )=3+sin???
From Newton-Raphson's method, we have
?? ?? +1
?=?? ?? -
?? (?? ?? )
?? '
(?? ?? )
?=?? ?? -
3?? ?? -cos??? ?? -1
3+sin??? ??
Taking ?? 0
=0.60, we get
?? 1
?=?? 0
-
?? (?? 0
)
?? '
(?? 0
)
?=?? 0
-
3?? 0
-cos??? 0
-1
3+sin??? 0
?=0.60-
3(0.60)-cos?(0.60)-1
3+sin?(0.60)
?=0.60701
?? 2
?=?? 1
-
?? (?? 1
)
?? '
(?? 1
)
?=?? 1
-
3?? 1
-cos??? 1
-1
3+sin??? 1
?=0.60701-
3(0.60701)-cos?(0.60701)-1
3+sin?(0.60701)
?=0.60710
?? 3
?=?? 2
-
?? (?? 2
)
?? '
(?? 2
)
?=?? 2
-
3?? 2
-cos??? 2
-1
3+sin??? 2
?=0.60710-
3(0.60710)-cos?(0.60710)-1
3+sin?(0.60710)
?=0.60710
Since ?? 2
=?? 3
,??? =0.60710 is a root of ?? (?? ) .
1.4 Apply Newton-Raphson method to determine a root of the equation ?????? ??? -
?? ?? ?? =?? . Correct upto four decimal places.
(2014 : 10 Marks)
Solution:
?? (?? )=cos??? -?? ?? ??
So that,
?? (0)=1
and
?? (?? )=cos?1-?? =-2.17798
???????????????????????????????????????????????????? (0)?? (??)<0
Hence the root lies between 0 and 1 .
Take ?? 0
=0 and ?? 1
=1
?????????????????????????????????????? (?? ,0)=1 and ?? (?? 1
)=-2.17798
By the method of fase position, we get
?? 2
?=
?? 0
?? (?? 1
)-?? 1
(?? 0
)
?? (?? 1
)-?? (?? 0
)
?=
0(-2.17798)-1(1)
-2.1779.8-?? =0.31467
? The first approximation to the root is
?? 2
?=0.31467
?? (?? 2
)?=0.51987>0
?? (?? 2
)?? (?? 1
)?<0
? The root lies between 0.31467 and 1 .
Take ?? 0
=0.31467 and ?? 1
=1
?? (?? 0
)?=0.51987 and ?? (?? 1
)=-2.17798
?? 3
?=
(0.3146)(-2.17798)-1(0.51987)
-2.17798-0.5187
=0.44673
The 2
nd
approximation to the root is,
?? 3
=0.44673
Now repeating this process, the successive approximations are
?? 4
=0.49402,?? 5
=0.50995
?? 6
=0.51520,?? 7
=0.51692,?? 8
=0.51748
?? 9
=0.51767,?? 10
=0.51775 etc.
? The approximate root is 0.5177 correct to 4 decimal places.
1.5 Apply Newton-Raphson method, to find a real root of transcendental equation
?? ??????
????
??? =?? .?? , correct to three decimal places.
Page 5
Edurev123
Numerical Analysis and Computer
Programming
1. Solution of Algebraic and
Transcendental Equation of One Variable
1.1 Develop an algorithm for Regula-Falsi method to find a root of ?? (?? )=?? starting
with two initial iterates ?? ?? and ?? ?? to the root such that ???????? ?(?? (?? ?? ))??????? ?(?? (?? ?? )) .
Take ?? as the maximum number of iterations allowed and eps be the prescribed
error.
(2009 : 30 Marks)
Solution:
1. Read ?? 0
,?? 1
, eps, ??
Remarks : ?? 0
and ?? 1
are two initial guesses to the root such that sin?(?? (?? 0
))?
sign?(?? (?? 1
)) . The prescribed precision is eps and ?? is the maximum number of iterations.
Steps 2 and 3 are initialization steps.
2.?? 0
????? (?? 0
)
3.?? 1
??? (?? 1
)
4.For ?? =1 to ?? in steps of 1 do.
5.?? 2
?(?? 0
?? 1
-?? 1
?? 0
)/(?? 1
-?? 0
)
6.?? 2
??? (?? 2
)
7.if |?? 2
!= eps then
8. begin write 'convergent solution', ?? 2
,?? 2
9 . stop end
10. if sign?(?? 2
)?sign?(?? 0
)
11. Then begin ?? 1
??? 2
12. ?? 1
??? 2
end
13. else begin ?? 0
??? 2
14. ?? 0
??? 2
end
end for
15. Write 'Does not converge in ?? iterations'.
16. Write ?? 2
,?? 2
17. Stop
1.2 Find the positive root of the equation
???? ?? ?? -?? ?? -?? =??
correct upto 6 decimal places by using Newton-Raphson method. Carry out
computations only for three iterations.
(2010 : 12 Marks)
Solution:
Given :
????????????????????????????? (?? )=10?? ?? -?? 2
-1
??????????????????????????? '
(?? )=10?? -?? 2
+10?? ?? -?? 2
×(-2?? )
?????????????????????????????????????=10?? -?? 2
(1-2?? 2
)
Let ?? 0
=0
Using Newton-Raphson's method
?? ?? +1
?=?? ?? -
?? (?? ?? )
?? '
(?? ?? )
?? 1
?=?? 0
-
?? (?? 0
)
?? '
(?? 0
)
=0-(-0.1)=0.1
?? 2
?=?? 1
-
?? (?? 1
)
?? '
(?? 1
)
=0.101026
?? 3
?=?? 2
-
?? (?? 2
)
?? '
(?? 2
)
=0.101026
? The positive root is 0.101026 (approx.)
1.3 Use Newton-Raphson method to find the real root of the equation ?? ?? =?????? ??? +
?? correct to four decimal places.
(2012 : 12 Marks)
Solution:
The given equation is
?? (?? )=3?? -cos??? -1=0
60)<0 and ?? (0.61)>0
Hence, a real root of ?? (?? ) lies in the interval (0.60,0.61)
?? (?? )=3+sin???
From Newton-Raphson's method, we have
?? ?? +1
?=?? ?? -
?? (?? ?? )
?? '
(?? ?? )
?=?? ?? -
3?? ?? -cos??? ?? -1
3+sin??? ??
Taking ?? 0
=0.60, we get
?? 1
?=?? 0
-
?? (?? 0
)
?? '
(?? 0
)
?=?? 0
-
3?? 0
-cos??? 0
-1
3+sin??? 0
?=0.60-
3(0.60)-cos?(0.60)-1
3+sin?(0.60)
?=0.60701
?? 2
?=?? 1
-
?? (?? 1
)
?? '
(?? 1
)
?=?? 1
-
3?? 1
-cos??? 1
-1
3+sin??? 1
?=0.60701-
3(0.60701)-cos?(0.60701)-1
3+sin?(0.60701)
?=0.60710
?? 3
?=?? 2
-
?? (?? 2
)
?? '
(?? 2
)
?=?? 2
-
3?? 2
-cos??? 2
-1
3+sin??? 2
?=0.60710-
3(0.60710)-cos?(0.60710)-1
3+sin?(0.60710)
?=0.60710
Since ?? 2
=?? 3
,??? =0.60710 is a root of ?? (?? ) .
1.4 Apply Newton-Raphson method to determine a root of the equation ?????? ??? -
?? ?? ?? =?? . Correct upto four decimal places.
(2014 : 10 Marks)
Solution:
?? (?? )=cos??? -?? ?? ??
So that,
?? (0)=1
and
?? (?? )=cos?1-?? =-2.17798
???????????????????????????????????????????????????? (0)?? (??)<0
Hence the root lies between 0 and 1 .
Take ?? 0
=0 and ?? 1
=1
?????????????????????????????????????? (?? ,0)=1 and ?? (?? 1
)=-2.17798
By the method of fase position, we get
?? 2
?=
?? 0
?? (?? 1
)-?? 1
(?? 0
)
?? (?? 1
)-?? (?? 0
)
?=
0(-2.17798)-1(1)
-2.1779.8-?? =0.31467
? The first approximation to the root is
?? 2
?=0.31467
?? (?? 2
)?=0.51987>0
?? (?? 2
)?? (?? 1
)?<0
? The root lies between 0.31467 and 1 .
Take ?? 0
=0.31467 and ?? 1
=1
?? (?? 0
)?=0.51987 and ?? (?? 1
)=-2.17798
?? 3
?=
(0.3146)(-2.17798)-1(0.51987)
-2.17798-0.5187
=0.44673
The 2
nd
approximation to the root is,
?? 3
=0.44673
Now repeating this process, the successive approximations are
?? 4
=0.49402,?? 5
=0.50995
?? 6
=0.51520,?? 7
=0.51692,?? 8
=0.51748
?? 9
=0.51767,?? 10
=0.51775 etc.
? The approximate root is 0.5177 correct to 4 decimal places.
1.5 Apply Newton-Raphson method, to find a real root of transcendental equation
?? ??????
????
??? =?? .?? , correct to three decimal places.
(2019 : 10 Marks)
Solution:
Here,
?? log??? ?=1.2
?? log??? -1.2?=0
Let
?? (?? )=?? log??? -1.2
???????????????????????????????????????????????????????????????????? (?? )=log??? +1
Here,
Here,??????????????????????????????????????????????????????????? (2)=-0.6<0 and ?? (3)=0.23>0
? Root lies between (2) and (3)
?? 0
=
2+3
2
=2??? 0
=2.5
1st Iteration :
?? (?? 0
)?=?? (2.5)=(2.5)log?(2.5)-1.2=0.21
?? (?? 0
)?=?? (2.5)=log?(2.5)+1=1.4
?? 1
?=?? 0
-
?? (?? 0
)
?? '
(?? 0
)
=2.5-
(-0.21)
1.4
=2.650
2nd iteration:
?? (?? 1
)?=?? (2.65)=(2.65)log?(2.65)-1.2=-0.08
?? '
(?? 1
)?=?? (2.65)=log?(2.65)+1=1.42
?? 2
?=2.65-
(-0.08)
1.42
=2.65+0.056=2.706
3rd iteration :
?? (?? 2
)?=?? (2.706)=2.706log?2.706-1.2
?=1.16987-1.2=-0.0301
?? '
(?? 2
)?=?? (2.706)=log?(2.706)+1=1.432
?? 3
?=2.706-
(-0.0301)
1.432
=2.706+0.021
?? 3
?=2.727
4th Iteration :
Read More