0% found this document useful (0 votes)
137 views

Overview-Numerical Methods

This document discusses the application of numerical methods in mathematics. It begins by explaining that numerical methods are needed to find approximate numerical solutions when analytic methods cannot provide an exact solution. It provides examples of using numerical methods like the Newton-Raphson method, trapezoidal rule, and Euler's method to solve equations and calculate integrals and other mathematical functions that cannot be solved analytically. It also discusses how numerical methods are implemented in programming languages and mathematical software.

Uploaded by

B.srinivasarao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
137 views

Overview-Numerical Methods

This document discusses the application of numerical methods in mathematics. It begins by explaining that numerical methods are needed to find approximate numerical solutions when analytic methods cannot provide an exact solution. It provides examples of using numerical methods like the Newton-Raphson method, trapezoidal rule, and Euler's method to solve equations and calculate integrals and other mathematical functions that cannot be solved analytically. It also discusses how numerical methods are implemented in programming languages and mathematical software.

Uploaded by

B.srinivasarao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Department Of Mathematics

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 !

 Can you give exact

……….

Rajesh Bandari Yadav Application of Numerical Method


 
B
1m
 
m

O 1m A

This method is an example analytic method

Rajesh Bandari Yadav Application of Numerical


Method
 But we need exact numerical value of

Unfortunately
Tape or any

X X
other tools
does not work

For this we need a Numerical Method

Rajesh Bandari Yadav Application of Numerical Method


Problem
Solution

Analytic
Methods
How to
Use?

X
Solution

Numerical Methods

Rajesh Bandari Yadav Application of Numerical Method


For Example:

 Suppose we wish to find value of the integral ?

  does not have anti-derivative

We cant find the integral value by analytic


methods

But we can find the integral value by using


Numerical methods

• Trapezoidal Rule
• Simpson’s 1/3-rule
• Simpson’s 3/8-rule

Rajesh Bandari Yadav Application of Numerical Method


What is Numerical Analysis?
Numerical analysis is the study of algorithms that use
numerical approximation for the problems of mathematical
analysis

Rajesh Bandari Yadav Application of Numerical Method


Why Numerical Analysis?
Numerical analysis naturally finds application in all
fields of engineering and the physical sciences, but
in the 21st century also the life sciences, social
sciences, medicine, business and even the arts have
adopted elements of scientific computations.

For example, ordinary differential equations appear in


celestial mechanics (predicting the motions of
planets, stars and galaxies) numerical linear algebra
is important for data analysis; stochastic
differential equations and Markov chains are essential
in simulating living cells for medicine and biology. 

Rajesh Bandari Yadav Application of Numerical Method


Suppose a box dimensions described as the length
is twice as long as the width. The height is 0.25
inches greater than the width. The volume is 1.92
cubic inches. Then find Length of box

 l=2w
h=0.25+w
V=1.92
V=lwh=1.92

(2w)w(0.25+w)=1.

Now we have to solve the equation (1)


By Newton –Raphson method

 
=

Rajesh Bandari Yadav Application of Numerical Method


% Matlab script for implementing the Newton-Raphson Method
% to evaluate root of 2w^3+0.5w^2-1.92=0

%clean up from last run

clear all;
clf;

w0=input('Please enter first approximation'); % First


approximation value
n=input('Please enter Maximum number of iterations'); % Number
of iterations
i=1;w=w0;
% This loop implements the recurrence relation
while(i<=n)
w=w-((2*w^3+0.5*w^2-1.92)/(6*w^2+w));
i=i+1;
end
w % final value

W=0.9098

Length the box is = 2(0.9098)= 1.8196

Rajesh Bandari Yadav Application of Numerical Method


Some Mathematical Applications by Numerical Methods

 Finding using newton-Raphson Method

 Suppose let x=

By Newton-Raphson Method

Rajesh Bandari Yadav Application of Numerical Method


% Matlab script for implementing the Newton-Raphson
Method
% to evaluate square root of 2

%clean up from last run

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

Rajesh Bandari Yadav Application of Numerical Method


 Finding value by numerical Method

 𝑥2 + 𝑦 2=1  We know that Area of the


disc is
0 1  
Area=

 
Area=

  1
2
𝜋 =4∫ √ 1− 𝑥 𝑑𝑥
0
  trapezoidal rule

 𝑓 ( 𝑥 ) = √ 1 − 𝑥 2 ; 𝑎= 0 ,𝑏=1

Rajesh Bandari Yadav Application of Numerical Method


%Matlab programming finding pi value with aid of
Trapezoidal Rule

a=input('Give left point of interval');


b=input('Give right point of interval');
n=input('Give step size');
h=(b-a)/n;
sum=0;
f=@(x) sqrt(1-x.^2);
for i=1:1:n-1
sum= sum + f(a+i*h);

end
Area = 4*(h/2*(f(a)+f(b)+2*sum));
fprintf('%f',Area);

Rajesh Bandari Yadav Application of Numerical Method


 
Suppose we want to find the value of by using
numerical methods

 We know that

 The trapezoidal rule is

 𝑓 ( 𝑥 ) = 1 𝑏−𝑎
𝑎=0 , 𝑏=0.5 , h=
√1 − 𝑥 2 𝑛

Rajesh Bandari Yadav Application of Numerical Method


%Matlab programming to find asin(b) where 0<=b<1
%value with aid of Trapezoidal Rule

a=input('Give left point of interval');


b=input('Give right point of interval');
n=input('Give step size');
h=(b-a)/n;
sum=0;
f=@(x) 1/(sqrt(1-x.^2));
for i=1:1:n-1
sum= sum + f(a+i*h);

end
result = (h/2*(f(a)+f(b)+2*sum));
fprintf('%f',result);

Rajesh Bandari Yadav Application of Numerical Method


We wish to find the value of sin(1)

We have Taylor’s series of sin(x) at x=0 is

  𝒙 𝟑 𝒙𝟓 𝒙 𝟕 𝒙 𝟗 𝒙 𝟏𝟏 𝒙𝟏𝟑
𝐬𝐢𝐧 ( 𝒙 )=𝒙− + − + − + +−− −−− −
𝟑! 𝟓! 𝟕! 𝟗! 𝟏𝟏! 𝟏𝟑!

Sin(x)
P(x)

Rajesh Bandari Yadav Application of Numerical Method


Finding the value of e by using Numerical methods
 

𝑠𝑢𝑝𝑝𝑜𝑠𝑒
  𝑖𝑓 𝑥=1𝑡h𝑒𝑛 𝑦 ( 1 )=𝑒
 
From this we can evaluate the value of e by using
Euler’s Method

1+h)

Rajesh Bandari Yadav Application of Numerical Method


%Matlab programming for finding value of e
%By using Euler's Method
h = input('enter step size'); % step size
n=(1/h);
y=1;i=1;
while(i<=n)
y=(1+h)*y;
i=i+1;
end
y

Rajesh Bandari Yadav Application of Numerical Method


Many Mathematical functions in Programming languages
like MATLAB, MAPLE,MATHMETICA etc … are written with
aid of Numerical Methods

For example: In MATLAB To find eigen values of given


Matrix A ,the command is eig(A)

>> A=[2 3;0 4]

A =

2 3
0 4

>> eig(A)

ans =

2
4
These are Eigen values of A

Rajesh Bandari Yadav Application of Numerical Method


Using Power Method Which is Numerical method, We can
find largest Eigen value and corresponding Eigen
vector of given matrix

% The Power Method is used to find a dominant eigenvalue


% and finding corresponding eigen vector

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

Rajesh Bandari Yadav Application of Numerical Method


else
if(length(b)==1)
a=y(b);
else
a=y(b(1));
end
end

y=(1/a)*(y');
i=i+1;

end

disp(a)
disp(y)

Rajesh Bandari Yadav Application of Numerical Method


Finally we
can design a
calculator
With aid
Numerical
Methods

+ x / -

√  √❑  𝜋
❑   𝑒

sin cos tan ln

asin acos atan log

sinh cosh tanh eig

Rajesh Bandari Yadav Application of Numerical Method


Thank You

You might also like