Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Numerical Solutions

Assignment #1

Given the function f(x) = 6x2 + x – 70, determine its positive root using
a. Newton-Raphson Method
b. Secant Method

Solution and answer:


a. Newton-Raphson Method

݂‫ ݔ‬ൌ͸‫ ݔ‬ଶ ൅ ‫ ݔ‬െ͹Ͳ ݂ ‫ݔ‬௡ିଵ


‫ݑ‬
݈ܽ‫ ݋ ݈ ܽ ݑ‬ǣ
݉‫ܨݎ‬
‫ݔ‬௡ ൌ
‫ݔ‬௡ିଵ െሾᇱ ሿ
݂ ‫ݔ‬Ԣൌ
‫ݔ‬ͳʹ ‫ ݔ‬൅ ͳ ݂ ‫ݔ‬௡ିଵ

Assume the initial root value is 4.


݂ ‫ݔ‬௡ିଵ
‫ݑ‬
݈ܽ‫ ݋ ݈ ܽ ݑ‬ǣ
݉‫ܨݎ‬
‫ݔ‬௡ ൌ ‫ݔ‬௡ିଵ െ ሾᇱ ሿ
݂Ͷ ൌ
͸ሺͶሻ ൅Ͷെ͹Ͳൌ
͵Ͳଶ ݂ ‫ݔ‬௡ିଵ
͵Ͳ
݂ᇱሺͶሻൌ
ͳʹ Ͷ ൅ ͳ ൌ
Ͷͻ ‫ݔ‬௡ሺଵሻ ൌ Ͷെ ൌ ͵ Ǥ͵ ͺ ͹͹ͷͷͳͲʹ
Ͷͻ

݊ ‫ݔ‬௡ ݂ሺ
‫ݔ‬ሻ ݂Ԣ
ሺ‫ݔ‬ሻ
0 4 30 49
1 3.387755102 2.24906289 41.65306122
2 3.333759962 0.017492851 41.00511954
3 3.33333336 0.000001092 41.00000032
4 3.333333333 0.000000000 41
b. Secant Method Therefore, the positive root is approximately 3.3333.
૟࢞૛ ൅ ࢞ െ
ࢌ࢞ ൌ ૠ૙ ݂‫ݔ‬௡ିଵ ሾ‫ݔ‬௡ିଶ െ‫ݔ‬௡ିଵሿ
‫ݑ‬
݈ܽ‫ ݋ ݈ ܽ ݑ‬ǣ
݉‫ܨݎ‬
‫ݔ‬௡ ൌ
‫ݔ‬௡ିଵ െ
݂‫ݔ‬௡ିଶ െ݂ሺ ‫ݔ‬௡ିଵሻ
࢔1
Initial guess:
‫ݔ‬௡ିଵ 4 ࢔ ࢞࢔ ࢞ ࢔ି૚ ࢞ ࢔ି૛ ࢌሺ
࢞࢔ି૚ሻ ࢌሺ
࢞࢔ି૛ሻ
‫ݔ‬௡ିଶ 5 1 3.454545455 4 5 30 85
2 3.343936382 3.454545455 4 5.05785124 30
͸ሺͶሻଶ൅Ͷെ͹Ͳ
݂‫ݔ‬௡ିଵ ൌ 3 3.333517855 3.343936382 3.454545455 0.435399531 5.05785124

͵Ͳ 4 3.333333619 3.333517855 3.343936382 0.007565576 0.435399531
5 3.333333333 3.333333619 3.333517855 0.000011720 0.007565576
͸ሺͷሻଶ൅ͷ െ͹Ͳ
݂‫ݔ‬௡ିଶ ൌ 6 3.333333333 3.333333333 3.333333619 0.000000000 0.000011720

ͺͷ
Therefore, the root of ݂‫ ݔ‬ൌ
͸‫ ݔ‬ଶ ൅ ‫ ݔ‬െ͹Ͳ is approximately 3.33.
݂‫ݔ‬௡ିଵ ሾ‫ݔ‬௡ିଶ െ‫ݔ‬௡ିଵሿ
‫ݔ‬௡ ൌ
‫ݔ‬௡ିଵ െ
݂‫ݔ‬௡ିଶ െ ݂ሺ‫ݔ‬௡ିଵሻ
͵ Ͳሾͷ െͶሿ
‫ݔ‬௡ ൌ
Ͷെ
ͺ ͷ െ͵ Ͳ
‫ݔ‬௡ ൌ
ϯ ͘ ϰϱϰϱϰϱϰϱϱ

You might also like