Solution of ODEs in Matlab
Matlab solvers for non-stiff problems are ode45, ode23 and ode113.
ode45 is a one-step explicit solver which simultaneously uses fourth and fifth order RK formulas.
ode23 is a one-step explicit solver which simultaneously uses s

Ordinary Differential Equations (ODEs)
(These notes are based mainly on the 6th Edition of the textbook
Numerical Methods for Engineers by S.C. Chapra and R.P. Canale.)
Equations which involve unknown functions and their derivatives, are called differenti

Roots of Equations
(These notes are based mainly on the 6th Edition of the textbook
Numerical Methods for Engineers by S.C. Chapra and R.P. Canale.)
In numerical solutions, the equation to be solved is typically arranged into the form ( ) = 0 . The rootfi

Solved Problems on Total Numerical Error
Example8: Using Taylor series expansion, we can obtain a formula for the first derivative of a function as
given below. Note that
= + and
= .
( )=
Here,
(
) (
2
( ) can be calculated approximately as
approximation

Approximations and Errors
(These notes are based mainly on the 6th Edition of the textbook
Numerical Methods for Engineers by S.C. Chapra and R.P. Canale.)
Error Definitions
Et = True Error = True value Approximate value
True relative error =
True percent

Numerical Differentiation
Numerical differentiation formulas (see Chapters 4 and 23 in the textbook) can be derived using Taylor
Series expansion as given in Equation (6.1).
(
)= ( )+
where =
( )
( )
+
+
2!
3!
( ) +
( )
=
and
(
)!
(
( )=
(6.1)
( ) to yi

Least-Squares Regression
Linearisation of Nonlinear Behaviour
The relationship between the dependent and independent variables in a data-set may not be linear; therefore
in such cases it is more suitable to fit a nonlinear curve (or function) to the data.

MMU 242 MATLAB TUTORIAL / FUNDAMENTALS OF MATLAB FOR NUMERICAL
ANALYSIS
PART- I: USING THE COMMAND WINDOW
For an introduction into Matlab, students can download getstart.pdf from the
Matlab website.
Click
on
the
link
"Getting
Started"
http:/www.mathworks.

Gauss Quadrature (Gauss-Legendre formulas)
Fig. 5.1 (a) Trapezoidal rule using the end points, (b) Improved integral estimate using two intermediate points
Suppose that we would like to estimate ( )
using a single application of the Trapezoidal rule as
de