CSC212 · 2081 · 10 marks
What are inherent errors? Derive the Newton Raphson method for solving non-linear equation and using this method solve the following equation up to 3 decimal places: x2 - 5x + 6 = 0
What are inherent errors? Derive the Newton Raphson method for solving non-linear equation and using this method solve the following equation up to 3 decimal places: $x^2 - 5x + 6 = 0$ [10]
Inherent Errors and Newton-Raphson Method
Part 1: Inherent Errors (2 marks)
Inherent errors are errors that already exist in a problem before any numerical computation is carried out. They are caused by the data or by the mathematical model, not by the numerical technique used.
Main sources:
- Data errors: Values obtained from physical measurements or observation carry uncertainty.
- Modelling / simplifying assumptions: Approximating a real system by a simplified mathematical model introduces error.
- Errors in empirical constants: Constants determined experimentally are not exact.
Such errors cannot be removed by using a better numerical method; they can only be controlled so that they are not amplified.
Part 2: Derivation of Newton-Raphson Method (4 marks)
Let $f(x)=0$ be the equation whose root is required, and let $x_n$ be an approximate root.
Expand $f(x_n+h)$ by Taylor's series:
$$f(x_n+h)=f(x_n)+h,f'(x_n)+\frac{h^2}{2!}f''(x_n)+\cdots$$
Since $h$ is small, neglect second and higher order terms:
$$f(x_n+h)\approx f(x_n)+h,f'(x_n)$$
If $x_n+h$ is the exact root, then $f(x_n+h)=0$:
$$0=f(x_n)+h,f'(x_n)\quad\Rightarrow\quad h=-\frac{f(x_n)}{f'(x_n)}$$
Hence the improved approximation $x_{n+1}=x_n+h$ gives:
$$\boxed{x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)},\qquad f'(x_n)\neq 0}$$
Part 3: Solve $x^2-5x+6=0$ to 3 Decimal Places (4 marks)
$$f(x)=x^2-5x+6,\qquad f'(x)=2x-5$$
Iteration formula:
$$x_{n+1}=x_n-\frac{x_n^2-5x_n+6}{2x_n-5}$$
(Exact roots: $(x-2)(x-3)=0 \Rightarrow x=2,,3$.)
Root near $x=3$, take $x_0=4$
Iteration 1: $$f(4)=16-20+6=2,\quad f'(4)=3$$ $$x_1=4-\tfrac{2}{3}=3.3333$$
Iteration 2: $$f(3.3333)=11.1109-16.6665+6=0.4444,\quad f'(3.3333)=1.6666$$ $$x_2=3.3333-\tfrac{0.4444}{1.6666}=3.0667$$
Iteration 3: $$f(3.0667)=9.4046-15.3335+6=0.0711,\quad f'(3.0667)=1.1334$$ $$x_3=3.0667-\tfrac{0.0711}{1.1334}=3.0040$$
Iteration 4: $$f(3.0040)=9.0240-15.0200+6=0.0040,\quad f'(3.0040)=1.0080$$ $$x_4=3.0040-\tfrac{0.0040}{1.0080}=3.0000$$
$$\boxed{x=3.000}$$
Root near $x=2$, take $x_0=1$
Iteration 1: $$f(1)=1-5+6=2,\quad f'(1)=-3$$ $$x_1=1-\tfrac{2}{-3}=1.6667$$
Iteration 2: $$f(1.6667)=2.7779-8.3335+6=0.4444,\quad f'(1.6667)=-1.6666$$ $$x_2=1.6667-\tfrac{0.4444}{-1.6666}=1.9334$$
Iteration 3: $$f(1.9334)=3.7380-9.6670+6=0.0710,\quad f'(1.9334)=-1.1332$$ $$x_3=1.9334-\tfrac{0.0710}{-1.1332}=1.9961$$
Iteration 4: $$f(1.9961)=3.9844-9.9805+6=0.0039,\quad f'(1.9961)=-1.0078$$ $$x_4=1.9961-\tfrac{0.0039}{-1.0078}=2.0000$$
$$\boxed{x=2.000}$$
Final Result
The roots of $x^2-5x+6=0$ correct to 3 decimal places are:
$$x=2.000 \quad\text{and}\quad x=3.000$$
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.