Overview-Numerical Methods
Overview-Numerical Methods
RGUKT-NUZVID
Applications Of
Numerical Methods
With MATLAB
By
Rajesh .B
Assistant Professor
Department Of Mathematics
RGUKT-NUZVIDU
This PowerPoint presentation
Contains Animations
Please View in slide Show
Can you Give exact 1 meter length of thread?
Yes !
……….
O 1m A
Unfortunately
Tape or any
X X
other tools
does not work
Analytic
Methods
How to
Use?
X
Solution
Numerical Methods
• Trapezoidal Rule
• Simpson’s 1/3-rule
• Simpson’s 3/8-rule
l=2w
h=0.25+w
V=1.92
V=lwh=1.92
(2w)w(0.25+w)=1.
=
clear all;
clf;
W=0.9098
Suppose let x=
By Newton-Raphson Method
clear all;
clf;
format long
x0=input('Please enter first approximation'); % First
approximation value
n=input('Please enter Maximum number of iterations');
% Number of iterations
i=1;x=x0;
% This loop implements the recurrence relation
while(i<=n)
x=x-((x^2-2)/(2*x));
i=i+1;
end
x
% final value
Area=
1
2
𝜋 =4∫ √ 1− 𝑥 𝑑𝑥
0
trapezoidal rule
𝑓 ( 𝑥 ) = √ 1 − 𝑥 2 ; 𝑎= 0 ,𝑏=1
end
Area = 4*(h/2*(f(a)+f(b)+2*sum));
fprintf('%f',Area);
𝑓 ( 𝑥 ) = 1 𝑏−𝑎
𝑎=0 , 𝑏=0.5 , h=
√1 − 𝑥 2 𝑛
end
result = (h/2*(f(a)+f(b)+2*sum));
fprintf('%f',result);
𝒙 𝟑 𝒙𝟓 𝒙 𝟕 𝒙 𝟗 𝒙 𝟏𝟏 𝒙𝟏𝟑
𝐬𝐢𝐧 ( 𝒙 )=𝒙− + − + − + +−− −−− −
𝟑! 𝟓! 𝟕! 𝟗! 𝟏𝟏! 𝟏𝟑!
Sin(x)
P(x)
𝑠𝑢𝑝𝑝𝑜𝑠𝑒
𝑖𝑓 𝑥=1𝑡h𝑒𝑛 𝑦 ( 1 )=𝑒
From this we can evaluate the value of e by using
Euler’s Method
1+h)
A =
2 3
0 4
>> eig(A)
ans =
2
4
These are Eigen values of A
A=input('Enter matrix');
n=input('Enter number of iterations');
y=input(‘Enter initial matrix');
i=1;
while (i<=n)
y=A*(y');
a=max(abs(y));
b=find(y==a);
if (isempty(b))
c=find(y== -a);
if (length(c)==1)
a=y(c);
else
a=y(c(1));
end
y=(1/a)*(y');
i=i+1;
end
disp(a)
disp(y)
+ x / -
√ √❑ 𝜋
❑ 𝑒