SCI Lab Manual
SCI Lab Manual
DEPARTMENT OF MATHEMATICS
MANUAL
INSTITUTE VISION AND MISSION
VISION
MISSION
➢ To bestow standard technical education par excellence through state of the art infrastructure,
competent faculty and high ethical standards.
➢ To nurture research and entrepreneurial skills among students in cutting edge technologies.
VISION
➢ To produce a highly disciplined and technically efficient engineering community with good
mathematical knowledge and innovative thinking.
MISSION
➢ To work as a vibrant and model department of excellence in imparting quality education in the field
of mathematics and Engineering.
PROGRAM OUTCOMES (Pos)
PO1 Engineering knowledge: Apply the knowledge of mathematics, science, engineering fundamentals, and an
engineering specialization to the solution of complex engineering problems.
PO2 Problem analysis: Identify, formulate, review research literature, and analyze complex engineering problems
reaching substantiated conclusions using first principles of mathematics, natural sciences, and engineering sciences.
PO3 Design/development of solutions: Design solutions for complex engineering problems and design system
components or processes that meet the specified needs with appropriate consideration for the public health and safety,
and the cultural, societal, and environmental considerations.
PO4 Conduct investigations of complex problems: Use research-based knowledge and research methods including
design of experiments, analysis and interpretation of data, and synthesis of the information to provide valid
conclusions.
PO5 Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern engineering and IT
tools including prediction and modeling to complex engineering activities with an understanding of the limitations.
PO6 The engineer and society: Apply reasoning informed by the contextual knowledge to assess societal, health,
safety, legal and cultural issues and the consequent responsibilities relevant to the professional engineering practice.
PO7 Environment and sustainability: Understand the impact of the professional engineering solutions in societal
and environmental contexts, and demonstrate the knowledge of, and need for sustainable development.
PO8 Ethics: Apply ethical principles and commit to professional ethics and responsibilities and norms of the
engineering practice.
PO9 Individual and team work: Function effectively as an individual, and as a member or leader in diverse teams,
and in multidisciplinary settings.
PO10 Communication: Communicate effectively on complex engineering activities with the engineering community
and with society at large, such as, being able to comprehend and write effective reports and design documentation,
make effective presentations, and give and receive clear instructions.
PO11 Project management and finance: Demonstrate knowledge and understanding of the engineering and
management principles and apply these to one‘s own work, as a member and leader in a team, to manage projects and
in multidisciplinary environments.
PO12 Life-long learning: Recognize the need for, and have the preparation and ability to engage in independent and
life-long learning in the broadest context of technological change.
GEA1201 - ENGINEERING MATHEMATICS III
OBJECTIVES:
➢ To apply the Fourier series to solve various engineering problems on periodic functions.
➢ To apply Fourier transform techniques to solve Engineering problems.
➢ To analyze the one dimensional heat flow and one dimensional wave equations
➢ To create the knowledge to develop Z transform techniques for discrete time systems.
➢ To solve Engineering problems by using Discrete and continuous distributions
KNOWLEDGE
CO DESCRIPTION POs
LEVEL
Analyzing the one dimensional heat flow PO1, PO2, PO3, PO4,
CO3 K4 PO5,PO6,PO7,PO8,PO9,PO10,PO11& PO12
and one dimensional wave equations
7 Z Transform of Functions 16
5
Ex.No:1 Plotting Fourier Series
Question: Plot the Fourier series for f(x)=2x-x2 in 0<x<2 by taking n=5
Aim:
To write a SCI-program for plotting the Fourier series for the given function.
Algorithm:
Program Code:
L = 0;
U = 2;
l = (U-L)/2;
n = 5;
function z=g(x)
z = 2*x-x^2;
endfunction
a0=integrate('g(x)','x',L,U,0.0001)/l
for i=1:n
a(i)=integrate('g(x)*cos(i*%pi*x/l)','x',L,U,0.00001)/l
b(i)=integrate('g(x)*sin(i*%pi*x/l)','x',L,U,0.00001)/l
end
function series=f(x)
series=a0/2
for i=1:n
series=series+an(i)*cos(i*%pi*x/l)+bn(i)*sin(i*%pi*x/l)
end
endfunction
x=-5*l:0.01:5*l
plot(x,f(x))
6
Output:
Result:
We learned a SCI program code to plot the Fourier series for the given function.
7
Ex.No:2 Fourier Coefficient Functions
Question: Find the Fourier coefficients a0, a3 and b5 for the function f(x)=2x-x2, 0<x<2.
Aim:
To write a SCI-program for finding the Fourier coefficient functions for the given function.
Algorithm:
Program Code:
L = 0;
U = 2;
l = (U-L)/2;
n = 5;
function z=g(x)
z = 2*x-x^2;
endfunction
a0=integrate('g(x)','x',L,U,0.00001)/l;
for i=1:n
a(i)=integrate('g(x)*cos(i*%pi*x/l)','x',L,U,0.00001)/l;
b(i)=integrate('g(x)*sin(i*%pi*x/l)','x',L,U,0.00001)/l;
end
disp("The value of a0 is" , a0)
disp("The value of a3 is ",a(3))
disp("The value of b5 is ",b(5))
Output:
Result:
We learned a SCI program code to find the Fourier Coefficient Functions for the given function.
8
Ex.No:3 Fourier Transform of Exponential Function
𝑥2
Question: Find the Fourier Transform of 𝑒 −( 2 ) by taking s = 1 in -1<x<1
Aim:
To write a SCI-program for finding the Fourier Transform of Exponential function.
Algorithm:
Program Code:
function Y=ft(s)
Y = (1/sqrt(2*%pi)) * integrate('exp(-(x^2)/2)*exp(sqrt(-1)*s*x)','x',-1,1);
endfunction
s = 1;
Y = ft(s);
disp("The Fourier Transform of exp(-(x^2)/2 at s=1 is",Y);
Output:
Result:
We learned a SCI program code to find the Fourier Transform of Exponential function.
9
Ex.No:4 Fourier Transform of Sine Function and Cosine Function
Aim:
To write a SCI-program for finding the Fourier Transform of Sine function and Cosine function.
Algorithm:
Program Code:
function Y=ft(s)
Y = (1/sqrt(2*%pi)) * integrate('sin(x)*exp(sqrt(-1)*s*x)','x',-1,1);
endfunction
s = 1;
Y = ft(s);
disp("The Fourier Transform of sin(x) at s=1 is",Y);
Output:
Program Code:
function Y=ft(s)
Y = (1/sqrt(2*%pi)) * integrate('cos(x)*exp(sqrt(-1)*s*x)','x',-1,1);
endfunction
s = 1;
Y = ft(s);
disp("The Fourier Transform of cos(x) at s=1 is",Y);
Output:
We learned a SCI program code to find Fourier Transform of Sine function and Cosine function.
11
Ex.No:5 One Dimensional Wave Equation
Question A string is stretched and fastened to two points x=0 and x=l apart. Motion is started by displacing the string
into the form y= lx-x2 from which it is released at time t=0.Find the displacement of any point on the string
at a distance of x from one end at time t.( take l=c=1 ).
Aim:
To write a SCI-program for solving one dimensional wave equation.
Algorithm:
Program Code:
function w=f(x)
w=l*x-x^2
endfunction
function bn=a(j)
bn=2/l*integrate('f(x)*sin(j*%pi*x/l)','x',0,l,0.00001)
endfunction
l=1;c=1;
bn=[];
for j=1:5
bn=[bn a(j)];
end
function u=y(x, t)
u=0;
for j=1:5
u=u+sin(j*%pi*x/l)*bn(j)*cos(j*%pi*c*t/l);
end
endfunction
x=[0:1:2]; t=[0:1:2];
series=feval(x,t,y);
disp("The value of y(x,t) is",series)
12
Output:
Result:
13
Ex.No:6 One Dimensional Heat Equation
𝜕𝑢 𝜕2 𝑢
Question: Solve the equation 𝜕𝑡 = 𝛼 2 𝜕𝑥 2 subject to the boundary conditions u(0,t)=0,u(l,t)=0 ; u(x,0)=x.
(take l=c=1 ).
Aim:
To write a SCI-program for solving one dimensional heat equation.
Algorithm:
Program Code:
function w=f(x)
w=x
endfunction
function bn=a(j)
bn=2/l*integrate('f(x)*sin(j*%pi*x/l)','x',0,l,0.00001)
endfunction
l=1;c=1;
bn=[];
for j=1:5
bn=[bn a(j)];
end
function u=u(x, t)
u=0;
for j=1:5
u=u+sin(j*%pi*x/l)*bn(j)*exp(-j^2*%pi^2*c^2*t/l^2);;
end
endfunction
x=[0:1:2]; t=[0:1:2];
series=feval(x,t,u);
disp("The value of u(x,t) is",series)
14
Output:
Result:
15
Ex.No:7 Z Transform of Functions
Aim:
To write a SCI-program for finding the Z Transform of function.
Algorithm:
Program Code:
N = 5;
z = 1;
function Y=f(n)
Y = 2^n;
endfunction
ztransform = 0;
for n = 0:N
ztransform = ztransform + f(n)*z^(-n);
end
disp("The value of Z-Transform for the given function is", ztransform);
Output:
Result:
16
Ex.No:8 Difference equations using Z – Transform
Aim:
To write a SCI-program for solving difference equations using Z – Transform.
Algorithm:
Program Code:
N = 3;
y = zeros(1, N);
a1 = 2;
y0 = 3;
for n = 1:N
if n == 1 then
y(n) = y(n) + a1 * y0;
else
y(n) = y(n) + a1 * y(n-1);
end
end
disp("The Solution of the given Problem is",y);
Output:
Result:
17
Ex.No:9 PMF & CDF for Binomial distribution & Limiting case of Binomial Distribution
Question: In a large consignment of electric bulb 10% are defective.A random sample of 20 is taken for
inspection.Find the prob.that (i) Exactly there are 3 defective bulbs. (ii) At most there are 3 defective bulbs.
Also find cdf.
Aim:
To write a SCI-program for finding PMF & CDF for Binomial distribution.
Algorithm:
Program Code:
function coeff=binomial_coeff(n, k)
coeff = factorial(n) / (factorial(k) * factorial(n - k));
endfunction
function pmf=binomial_pmf(n, p, k)
pmf = binomial_coeff(n, k) * p^k * (1 - p)^(n - k);
endfunction
Y=binomial_pmf(20, 0.1, 3)
disp("The pmf is",Y)
function cdf=binomial_cdf(n, p, k)
cdf = 0;
for i = 0:k
cdf = cdf + binomial_pmf(n, p, i);
end
endfunction
Y=binomial_cdf(20, 0.1, 3)
disp("The cdf is",Y)
Y=binomial_cdf(20, 0.1, 20)
disp("The cdf is",Y)
Output:
We learned a SCI program code to find PMF & CDF for Binomial distribution.
19
Ex.No:10 Plot the Normal Distribution curves
Question: A company find that the time taken by one of the engineers to complete or repair job has a normal
distribution with mean 40 minutes and s.d 5 minutes. State what proportion of jobs taken from 35 to 48
minutes.
Aim:
To write a SCI-program for plotting the Normal Distribution curve for the given problem.
Algorithm:
Program Code:
mu = 40;
sigma = 5;
a=35
b=48
x = a:0.01:b
pdf_values = (1 / (sigma * sqrt(2 * %pi))) * exp(-((x - mu).^2) / (2 * sigma^2));
plot(x, pdf_values);
Output:
20
Result:
We learned a SCI program code to plot the Normal Distribution curve for the given problem.
21