Numerical Methods - Introduction and Quantifying Errors
Introduction
Numerical Methods are techniques to approximate mathematical processes like Integrals, Differential Equations, Nonlinear Equations.
Approximations are needed because we cannot solve the procedure analytically, such as the standard normal cumulative distribution function.
Steps of Solving an Engineering Problem
Quantifying Errors
Lesson 1: True Error
In numerical analysis, errors will arise during the calculations. To be able to deal with the issue of errors we
(A) identify where the error is coming from, followed by
(B) quantify the error, and lastly
(C) minimize the error as per our needs. we'll focus on quantify the error.
True Error
What is True Error?
True error denoted by Et, is the difference between the true value(actual value) and approximate value.
Et=True value−Approximate value
Let's take an example with differential equation -
Here we are given a function value of f(x) and h then we need to find the value of derivative function f'(x). with following conditions -
Sol a) Using value of x=2 and h=0.3 try to determine the approximate value of derivative function -
Sol b) In a problem we got the approximate value, now we are said to calculate true value of the function f(x). Now we'll calculate by using our knowledge of differential calculus -
Sol c) For True error,
We know that, True error = True value - Approximate value
Et=True value−Approximate value=9.5140−10.263=−0.749
Relative True Error
Relative error is nothing but the ratio between the True Error and the True Value
ϵt = True Error / True Value
So, using previous example we've got,
True Value = 9.5410
Approximate value = 10.263
So, Et=True value−Approximate
value=9.5140−10.263=−0.749
Relative true errors are also presented as percentages. For this example,
ϵt=−0.078726×100%=−7.8726%
Approximate Errors
In the above discussion, we talked about True Errors. These errors are calculated only when true values are known. For example, calculating true errors is useful when checking if a program is working correctly and we have some known true values. However, most of the time, we won't know the true values. After all, why would you need approximate values if you already know the true values? So, when solving a problem numerically, we will only have access to approximate values. That's why we need to know how to quantify or calculate these types of errors.
Approximate error is denoted by Ea and is defined as the difference between the current approximation and the previous approximation.
Ea = Present Approximation − Previous Approximation
Let's use an example to better understand what Present Approximation and Previous Approximation are.
We'll use the previous function with some modifications for this example -
Problem:
Conditions :
Sol a) Similarly Calculate approximate value for the function f'(2) using values x=2 and h=0.3
Sol b)
Sol c) We know that, Approximate error = Present Approximation - Previous Approximation
Ea=Present Approximation−Previous Approximation=9.8800−10.263=−0.38300
Relative Approximate Error
Similar to Relative True Error, use this formula:
ϵa = Approximate Error / Present Approximation
That's all for today. In summary, we've learned about quantifying errors: 1) True Error, and 2) Approximate Error. Happy learning!
Subscribe to my newsletter
Read articles from Md Khaled Bin Joha directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Md Khaled Bin Joha
Md Khaled Bin Joha
A passionate sophomore student from BAIUST, Cumilla. Eager to learn about new things.