Mathematics-Ii: Prepared By: Ms. K. Rama Jyothi,: Mr. G Nagendra Kumar
Mathematics-Ii: Prepared By: Ms. K. Rama Jyothi,: Mr. G Nagendra Kumar
E3f(x)= f(x+3h)
.
.
Ekf(x)= f(x+kh)
Backward shift operator(E-1) :
It is defined as E-1f(x)=f(x-h) (or) Eyx = yx-h
E-3f(x)= f(x-3h)
.
.
E-kf(x)= f(x-kh)
Forward difference operator (∆) :
The first order forward difference operator of a function
f(x) with increment h in x is given by
∆f(x)=f(x+h)-f(x) (or) ∆fk =fk+1-fk ; k=0,1,2………
∆2f(x)= ∆[∆f(x)]= ∆[f(x+h)-f(x)]= ∆fk+1- ∆fk ; k=0,1,2…………
…………………………….
…………………………….
Relation between E and ∆ :
∆f(x)=f(x+h)-f(x)
=Ef(x)-f(x) [Ef(x)=f(x+h)]
=(E-1)f(x)
∆=E-1 E=1+ ∆
Backward difference operator (nabla) :
The first order backward difference operator of a function
f(x) with increment h in x is given by
f(x)=f(x)-f(x-h) (or) fk =fk+1-fk ; k=0,1,2………
f(x)= [f(x)]= [f(x+h)-f(x)]=fk+1- fk ; k=0,1,2…………
…………………………….
…………………………….
Relation between E and nabla :
nabla f(x)=f(x+h)-f(x)
=Ef(x)-f(x) [Ef(x)=f(x+h)]
=(E-1)f(x)
1. ∆=E-1 or E=1+ ∆
2. = 1- E -1
3. δ = E 1/2 – E -1/2
4. µ= ½ (E1/2-E-1/2)
5. ∆=E = E= δE1/2
6. (1+ ∆)(1- )=1
Newtons Forward interpolation formula :
y=f(x)=f(x0+ph)= y0 + p∆y0 + p(p-1)/2! ∆2y0 + p(p-1)(p-
2)/3! ∆3y0+…….. ………………+p(p-1)(p2) …… [p-
(n-1)]/n! ∆ny0 .
Y = (X-X1)(X-X2)……..(X-Xn) Y0 +
(X0-X1)(X0-X2)……..(X0-Xn)
(X-X0)(X-X2)……..(X-Xn) Y1 +…………………..
(X1-X0)(X1-X2)……..(X1-Xn)
(X-X0)(X-X1)……..(X-Xn-1) Yn +
(Xn-X0)(Xn-X1)……..(Xn-Xn-1)
CURVE FITTING
INTRODUCTION : In interpolation, We have seen that
when exact values of the function Y=f(x) is given we fit
the function using various interpolation formulae. But
sometimes the values of the function may not be given. In
such cases, the values of the required function may be
taken experimentally. Generally these expt. Values
contain some errors. Hence by using these experimental
values . We can fit a curve just approximately which is
known as approximating curve.
Now our aim is to find this approximating curve as much
best as through minimizing errors of experimental values
this is called best fit otherwise it is a bad fit.
In brief by using experimental values the process of
establishing a mathematical relationship between two
variables is called CURVE FITTING.
METHOD OF LEAST SQUARES
Let y1, y2, y3 ….yn be the experimental values of
f(x1),f(x2),…..f(x n) be the exact values of the function
y=f(x). Corresponding to the values of x=xo,x1,x2….x n
.Now error=experimental values –exact value. If we
denote the corresponding errors of y1, y2,….yn as
e1,e2,e3,…..en , then e1=y1-f(x1), e2=y2-f(x2 )
e3=y3-f(x3)…….en=yn-f(xn).These errors
e1,e2,e3,……en,may be either positive or negative.For our
convenient to make all errors into +ve to the square of
errors i.e e12,e22,……en2.In order to obtain the best fit of
curve we have to make the sum of the squares of the
errors as much minimum i.e e12+e22+……+en2 is
minimum.
METHOD OF LEAST SQUARES
Let S=e12+e22+……+en2, S is minimum.When S becomes
as much as minimum.Then we obtain a best fitting of a
curve to the given data, now to make S minimum we have
to determine the coefficients involving in the curve, so
that S minimum.It will be possible when differentiating S
with respect to the coefficients involving in the curve and
equating to zero.
FITTING OF STRAIGHT LINE
Let y = a + bx be a straight line
By using the principle of least squares for solving the
straight line equations.
The normal equations are
∑ y = na + b ∑ x
∑ xy = a ∑ x + b ∑ x2
solving these two normal equations we get the values
of a & b ,substituting these values in the given straight
line equation which gives the best fit.
FITTING OF PARABOLA
Let y = a + bx + cx2 be the parabola or second degree
polynomial.
By using the principle of least squares for solving the
parabola
The normal equations are
∑ y = na + b ∑ x + c ∑ x2
∑ xy = a ∑ x + b∑ x2 + c ∑ x3
∑ x2y = a ∑ x2 + b ∑ x3 + c ∑ x4
solving these normal equations we get the values of a,b
& c, substituting these values in the given parabola
which gives the best fit.
FITTING OF AN
EXPONENTIAL CURVE
The exponential curve of the form
y = a ebx
taking log on both sides we get
logey = logea + logee bx
logey = logea + bx logee
logey = logea + bx
Y = A+ bx
Where Y = logey, A= logea
This is in the form of straight line equation and this can
be solved by using the straight line normal equations we
get the values of A & b, for a =eA, substituting the values
of a & b in the given curve which gives the best fit.
EXPONENTIAL CURVE
The equation of the exponential form is of the form y =
abx
taking log on both sides we get
log ey = log ea +log ebx
Y = A + Bx
where Y= logey, A= logea , B= logeb
this is in the form of the straight line equation which
can be solved by using the normal equations we get
the values of A & B for a = eA
b = eB substituting these values in the equation
which gives the best fit.
FITTING OF POWER CURVE
Let the equation of the power curve be
y = a xb
taking log on both sides we get
log ey = logea + log exb
Y = A + Bx
this is in the form of the straight line equation which
can be solved by using the normal equations we get
the values of A & B, for a = eA b= eB, substituting
these values in the given equation which gives the
best fit.
Solutions of Algebraic and
Transcendental equations and
Linear system of equations
Method 1: Bisection method
If a function f(x) is continuous b/w x0 and x1 and
f(x0) & f(x1) are of opposite signs, then there exsist at least one
root b/w x0 and x1
Let f(x0) be –ve and f(x1) be +ve ,then the root lies b/w xo
and x1 and its approximate value is given by x2=(x0+x1)/2
If f(x2)=0,we conclude that x2 is a root of the equ f(x)=0
Otherwise the root lies either b/w x2 and x1 (or) b/w x2 and x0
depending on wheather f(x2) is +ve or –ve
a1 x b1 y c1 z d1
a2 x b2 y c2 z d 2
a3 x b3 y c3 z d 3
1
x [d1 b1 y c1 z ] k1 l1 y m1z
a1
1
y [d 2 a2 x c2 z ] k2 l2 x m2 z
b2
1
z [d 3 a3 x b3 y ] k3 l3 x m3 y
c3
Substituting these on the right hand side we get second approximations this process is
repeated till the difference between two consecutive approximations is negligible or same
Gauss-Seidel iteration Method
a1 x b1 y c1 z d1
a2 x b2 y c2 z d 2
a3 x b3 y c3 z d 3
1
x [d1 b1 y c1 z ] k1 l1 y m1z
a1
1
y [d 2 a2 x c2 z ] k2 l2 x m2 z
b2
1
z [d 3 a3 x b3 y ] k3 l3 x m3 y
c3
y1= y0 + ½ ( k1 + k2 )
where k1 = h f ( x0,, y0 )
k2 = h f (x0 + h ,y0 + k1 )
Third order R-K method is given by
y1 = y0 + 1/6 ( k1 + k2+ k3 )
where k1 = h f ( x0 , y0 )
k2 = hf(x0 +1/2h , y0 + ½ k1 )
k3 =hf(x0 + ½h , y0 + ½ k2)
The Fourth order R – K method :
This method is most commonly used and is often
referred to as Runge – Kutta method only. Proceeding
as mentioned above with local discretisation error in
this method being O (h5), the increment K of y
correspoding to an increment h of x by Runge – Kutta
method from
dy/dx = f(x,y),y(x0)=Y0 is given by
K1 = h f ( x0 , y0 )
k2 = h f ( x0 + ½ h, y0 + ½ k1 )
k3 = h f ( x0 + ½ h, y0 + ½ k2 )
k4 = h f ( x0 + ½ h, y0 + ½ k3 )
and finally computing
k = 1/6 ( k1 +2 k2 +2 k3 +k4 )
Which gives the required approximate value as
y1 = y0 + k
R-K METHOD
Note 1 : k is known as weighted mean of
k1, k2, k3 and k4.
3 4
A- λI= 1 2 is the characteristic matrix of A
3 4
Characteristic polynomial: Let A be square matrix of order n then | A- λI| is
called characteristic polynomial of A
1 2
Ex: Let A=
4 1
then | A- λI| = λ2-2λ+9 is the characteristic polynomial of A
Characteristic equation: Let A be square matrix of order n then
| A- λI|=0 is called characteristic equation of A
1 2
Ex: Let A=
4 1
If λ1, λ2,…..λn are the eigen values of A then λ1k, λ2k,…..λnk are
the eigen values of Ak.
If A & B are square matrices and if A is invertable then the matrices A-1B
& BA-1 have the same eigen values
Power Method
Power method for finding eigenvalues
1. Start with an initial guess for x
2. Calculate w = Ax
3. Largest value (magnitude) in w is the
estimate of eigenvalue
4. Get next x by rescaling w (to avoid
the computation of very large matrix
An )
5. Continue until converged
Power Method
Start with initial guess z = x0
w ( 1 ) Az ( 1 ) (k1 ) w k( 1 )
w(1) Az ( 1 )
z( 2 )
(1)
k (k1 ) rescaling
w ( 2 ) Az ( 2 ) (k2 ) w k( 2 )
w( 2 ) Az ( 2 )
z( 3 ) k is the
(2)
(2)
k k dominant
eigenvalue
If 1 2 3 n , then
1 2 3 n
k k k k
Power Method
1. Initial guess z (1) x0 1,1,...,1 T