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

Himanshu Maths Lab Manual

The document outlines the curriculum for Engineering Mathematics II, detailing various experiments involving MATLAB applications. Key topics include solving differential equations, image encryption and decryption using matrices, and computing series expansions such as Taylor and Fourier series. Each experiment includes aims, solutions, and MATLAB code examples for practical implementation.

Uploaded by

kabirkhurana005
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)
32 views21 pages

Himanshu Maths Lab Manual

The document outlines the curriculum for Engineering Mathematics II, detailing various experiments involving MATLAB applications. Key topics include solving differential equations, image encryption and decryption using matrices, and computing series expansions such as Taylor and Fourier series. Each experiment includes aims, solutions, and MATLAB code examples for practical implementation.

Uploaded by

kabirkhurana005
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

Engineering Mathematics II

School of Engineering &Technology

Applied Sciences Department

Name - Himanshu No. - 24CSU300Branch - SOET Section - FFaculty Coordinator - Dr. Vipin Yadav
THE NORTHCAPUNIVERSITY

Gurugram, Haryana

LIST OF CONTENTS
S.No. Content Page No.

1. MATLAB: An introduction

2. Details of the Experiments

(a): To find the solution of first order differential equation and


plotting of graph of solution.

For example
1
1.

1.

(b): To find the solution of differential equation of order two


or three and plot it. For example

2 1.

1.

3 Encryption and decryption of images using matrices.

How to input sequences and series and to find the sum of


4
series such as Arithmetic, Geometric and Harmonic.

To compute Taylor and Maclaurin series expansions for


5 fundamental functions such as sine, cosine, exponential
functions, logarithmic functions etc.

Fourier Series To find Fourier series and Fourier coefficients of


basic functions and plot the graph.
6
1. Sin x
2. Cos x

Fourier Series To find Fourier series and Fourier coefficients of


basic functions and plot the graph.
7 1. x-x2

2. ϖ – x

8 Plot the Fourier series of practical 8

To implement image encryption and decryption using Fourier


9
transform and Inverse Fourier transform

For the function of two variables (a) Find the first and second
10.
order partial derivatives of two variables and plot the graphs.

3. Notes/Comments

Experiment No.- 1

Date of Performance GradeFaculty’s SignatureDate

Aim:- To find the solution of first order differential equation and plotting of graph of solution.

For example

1.
2.

Soln:- 1)

syms y(t)

ode=diff(y,t)==(exp(-t))-(4*y(t))

ysol(t)=dsolve(ode)
2)

syms y(x)

ode=diff(y,x)==(x^(2)-y^(2))/(x*y)

ysol(x)=dsolve(ode)
Experiment No.- 2

Date of Performance Grade Faculty’s Signature Date

Aim:- To find the solution of differential equation of order two or three and plot it.For example
1.
2.

Soln. 1)

syms y(x)

ode=diff(y,x,2)==cos(2*(x))-y

ysol(x)=dsolve(ode)
2)

syms y(x)

ode=diff(y,x,3)==((exp(x)+1)^2)+4*y

ysol(x)=dsolve(ode)
Experiment No.- 3

Date of Performance Grade Faculty’s Signature Date

Aim:- Encryption and decryption of images using matrices.

r=[1 1;0 1]

for i=1:7

r=[r r;zeros(2^(i)) r];

end

img=imread('256pixels.jpg');

img=(rgb2gray(img));

img=double(img);
encry= img*r

decry=encry*inv(r)

figure(1);imshow(img,[])

figure(2);imshow(encry,[]);

figure(3);imshow(decry,[]);
Experiment No.- 4

Date of Performance Grade Faculty’s Signature Date

Aim:- How to input sequences and series and to find the sum of series such as Arithmetic, Geometric and
Harmonic.

Soln.
syms n

a = 1;

d = 2;

a_n = a + (n - 1)*d;

S_n = symsum(a_n, n, 1, 10)

a = 3;

r = 2;

g_n = a * r^(n - 1);

S_n = symsum(g_n, n, 1, 5)

h_n = 1/n;

S_h = symsum(h_n, n, 1, 10)


Experiment No.- 5

Date of Performance Grade Faculty’s Signature Date

Aim:- To compute Taylor and Maclaurin series expansions for fundamental functions such as sine, cosine,
exponential functions, logarithmic functions etc.

Soln. 1) Logarithmic function


F(x)= log(1+x)
2) f(x) = sin x

3) f(x) = cos x
4) f(x) = exp(2*x)

Experiment No.- 6

Date of Performance Grade Faculty’s Signature Date

Aim:- Fourier Series To find Fourier series and Fourier coefficients of basic functions and plot the graph.
1. Sin x
2. Cos x

1.F(x) = Sin(x)

syms x

T=3.14;

n=1:4;

f=sin(x);

ao=(1/T)*int(f,x,-T,T)

an=(1/T)*int(f*cos(n*x),x,-T,T)

bn=(1/T)*int(f*sin(n*x),x,-T,T)
2. F(x) = Cos(x)

syms x

T=3.14;

n=1:4;

f=cos(x);

ao=(1/T)*int(f,x,-T,T)

an=(1/T)*int(f*cos(n*x),x,-T,T)

bn=(1/T)*int(f*sin(n*x),x,-T,T)
Experiment No.- 7

Date of Performance Grade Faculty’s Signature Date

Aim:- Fourier Series To find Fourier series and Fourier coefficients of basic functions and plot the graph.
1. x-x2

2. ϖ – x

1.F(x) = x-x2

syms x

T=3.14;

n=1:4;

f=x-((x)^(2));

ao=(1/T)*int(f,x,-T,T)

an=(1/T)*int(f*cos(n*x),x,-T,T)

bn=(1/T)*int(f*sin(n*x),x,-T,T)
2.F(x) = ϖ – x

syms x

T=3.14;

n=1:4;

f=pi-x;

ao=(1/T)*int(f,x,-T,T)

an=(1/T)*int(f*cos(n*x),x,-T,T)

bn=(1/T)*int(f*sin(n*x),x,-T,T)
Experiment No.- 8

Date of Performance Grade Faculty’s Signature Date

Aim:- Plot the Fourier series of practical 8


Experiment No.- 9

Date of Performance Grade Faculty’s Signature Date

Aim:- To implement image encryption and decryption using Fourier transform and Inverse Fourier
transform
Experiment No.- 10

Date of Performance Grade Faculty’s Signature Date

Aim:- For the function of two variables (a) Find the first and second order partial derivatives of two
variables and plot the graphs.

Soln.
syms x y

diff(sin(x*y)*x^(3),x,y)

You might also like