0% found this document useful (0 votes)
3 views21 pages

SCI Lab Manual

The document outlines the vision and mission of K. Ramakrishnan College of Engineering and its Department of Mathematics, emphasizing quality technical education and research. It details the objectives and course outcomes for Engineering Mathematics III, including the application of Fourier series, transforms, and Z transforms in solving engineering problems. Additionally, it provides examples of exercises and corresponding SCI program codes for practical applications in mathematical concepts.

Uploaded by

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

SCI Lab Manual

The document outlines the vision and mission of K. Ramakrishnan College of Engineering and its Department of Mathematics, emphasizing quality technical education and research. It details the objectives and course outcomes for Engineering Mathematics III, including the application of Fourier series, transforms, and Z transforms in solving engineering problems. Additionally, it provides examples of exercises and corresponding SCI program codes for practical applications in mathematical concepts.

Uploaded by

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

K.

RAMAKRISHNAN COLLEGE OF ENGINEERING


(Autonomous)
SAMAYAPURAM, TRICHY – 621112.

DEPARTMENT OF MATHEMATICS

GEA1201 /ENGINEERING MATHEMATICS III (SCI-LAB)

MANUAL
INSTITUTE VISION AND MISSION

VISION

➢ To achieve a prominent position among the top technical institutions

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.

➢ To provide education for developing high-quality professionals to transform the society.

DEPARTMENT VISION AND MISSION

VISION

➢ To produce a highly disciplined and technically efficient engineering community with good
mathematical knowledge and innovative thinking.

➢ To explore the two-way relationship between technology and society.

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

Applying the Fourier series to solve various


CO1 PO1, PO2, PO3, PO4,
K3 engineering problems on periodic
PO5,PO6,PO7,PO8,PO9,PO10,PO11& PO12
functions.

CO2 Applying Fourier transform techniques to PO1, PO2, PO3, PO4,


K3 PO5,PO6,PO7,PO8,PO9,PO10,PO11& PO12
solve Engineering problems.

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

Creating the knowledge to develop Z PO1, PO2, PO3, PO4,


CO4 K6 PO5,PO6,PO7,PO8,PO9,PO10,PO11& PO12
transform techniques for discrete time
systems.

Solving Engineering problems by using PO1, PO2, PO3, PO4,


CO5 K6 PO5,PO6,PO7,PO8,PO9,PO10,PO11& PO12
Discrete and continuous distributions
Ex. Page
No. Name of the Exercise No.

1. Plot a Fourier Series 6

2 Fourier Coefficient Functions 8

3 Fourier Transform of Exponential Function 9

4 Fourier Transform of Sine Function and Cosine Function 10

5 One Dimensional Wave Equation 12

6 One Dimensional Heat Equation 14

7 Z Transform of Functions 16

8 Difference Equations using Z – Transform 17


Probability mass function and cumulative distribution function for Binomial distribution
9 Limiting case of Binomial Distribution 18

10 Plot the Normal Distribution Curves 20

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:

• Start the program


• Write the SCI lab code for the problem
• Execute the program
• Note down the output
• Stop the program

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:

• Start the program


• Write the SCI lab code for the problem
• Execute the program
• Note down the output
• Stop the program

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:

"The value of a0 is"


1.3333333
"The value of a3 is "
-0.0450316
"The value of b5 is "
7.765D-17

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:

• Start the program


• Write the SCI lab code for the problem
• Execute the program
• Note down the output
• Stop the program

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:

"The Fourier Transform of exp(-(x^2)/2 at s=1 is"


0.5878885

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

Question: (i). Find the Fourier Transform of sinx by taking s = 1 in -1<x<1


(ii). Find the Fourier Transform of cosx by taking s = 1 in -1<x<1

Aim:
To write a SCI-program for finding the Fourier Transform of Sine function and Cosine function.

Algorithm:

• Start the program


• Write the SCI lab code for the problem
• Execute the program
• Note down the output
• Stop the program

Program Code:

******************* Sine function *******************

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:

"The Fourier Transform of sin(x) at s=1 is"


0.

Program Code:

******************* Cosine function *******************

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:

"The Fourier Transform of cos(x) at s=1 is"


0.5803209
10
Result:

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:

• Start the program


• Write the SCI lab code for the problem
• Execute the program
• Note down the output
• Stop the program

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:

"The value of y(x,t) is"


0. 0. 0.
3.637D-17 -3.637D-17 3.637D-17
-7.274D-17 7.274D-17 -7.274D-17

Result:

We learned a SCI program code to solve one dimensional wave equation.

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:

• Start the program


• Write the SCI lab code for the problem
• Execute the program
• Note down the output
• Stop the program

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:

"The value of u(x,t) is"


0. 0. 0.
3.898D-16 4.033D-21 2.086D-25
-1.559D-16 -8.065D-21 -4.171D-25

Result:

We learned a SCI program code to solve one dimensional heat equation.

15
Ex.No:7 Z Transform of Functions

Question: Find the z-transform of 2n by taking up to 5 terms for z=1

Aim:
To write a SCI-program for finding the Z Transform of function.

Algorithm:

• Start the program


• Write the SCI lab code for the problem
• Execute the program
• Note down the output
• Stop the program

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:

"The value of Z-Transform for the given function is"


63.

Result:

We learned a SCI program code to find the Z Transform of function.

16
Ex.No:8 Difference equations using Z – Transform

Question: Solve y(n+1)=2y(n) given that y0 = 3

Aim:
To write a SCI-program for solving difference equations using Z – Transform.

Algorithm:

• Start the program


• Write the SCI lab code for the problem
• Execute the program
• Note down the output
• Stop the program

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:

"The Solution of the given Problem is"


6. 12. 24.

Result:

We learned a SCI program code to solve difference equations using Z – Transform.

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:

• Start the program


• Write the SCI lab code for the problem
• Execute the program
• Note down the output
• Stop the program

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:

"The pmf is"


0.1901199
"The cdf is"
0.8670467
"The cdf is"
1.0000000
18
Result:

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:

• Start the program


• Write the SCI lab code for the problem
• Execute the program
• Note down the output
• Stop the program

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy