You are on page 1of 10

NAME: ANANYAA GUPTA

20BCT0177
SLOT: L3+L4
MAT1011
DATE: 18-01-21

EXPERIMENT-1A
Laplace Transform
Aim:
1. Find the Laplace Transform of f(t) = (t - 1)δ(t - 1) in terms of s.

Mathematical Background:
Laplace transformation is an integral function to convert a function
from a real variable to a complex variable

MATLAB CODE
Question1
clc
clear all
close all
syms t s
f=input('enter the function in t:');
F=laplace(f,t,s);
disp('laplace transform of f is:');
disp(F)
output:

Conclusion:
The Laplace Transformation of f(t) = (t - 1)δ(t - 1) is 0.

Experiment -1B
TITLE
VOLUME OF SOLID
Aim:
Mathematical background
The triple integration of a function given by f inside a region R is
represented as
Here dV = dx dy dz
To solve a triple integration we integrate one by one with respect to
a particular variable one at a time (like we do for partial
differentiation) keeping the other variables constant

To find the volume of a sphere as our question suggests using triple


integration we take f as 1 because we will die the region R in such a
way that it will only contain the region inside that sphere.
Matlab code:
clc
clearvars
close all
syms x y z;
f=1;
x1=input('Enter the limits of x');
y1=input('Enter the limits of y');
z1=input('Enter the limits of z');
i=int(int(int(f,z,z1(1),z1(2)),y,y1(1),y1(2)),x,x1(
1),x1(2));
disp('The volume is : ');
disp(i)
viewSolid(z,z1(1),z1(2),y,y1(1)+0*x+0*z,y1(2)+0*x+0
*z,x,x1(1)+0*y+0*z,x1(2)+0*y+0*z)
output

Conclusion:
The volume of given function is 4/3 cubic unit.
EXPERIMENT-2A
Curl and visualization of vector vector field.
Aim: Find the curl of the function f(x, y, z) = and visualize the same
using pictorial representaion.

Mathematical background
Matlab code
clc
clear all
close all
syms x y z;
fx=input("Enter i component of function");
fy=input("Enter j component of function");
fz=input("Enter k component of function");
curl1=curl([fx fy fz],[x y z]);
disp(curl1);
dive=divergence([fx fy fz],[x y z]);
disp(dive);
[X, Y, Z]=meshgrid(-1:0.2:1,-1:0.2:1,-1:0.2:1);
G1=subs(curl1(1),[x y z],{X Y Z});
G2=subs(curl1(2),[x y z],{X Y Z});
G3=subs(curl1(3),[x y z],{X Y Z});
subplot(2,1,1);
quiver3(X,Y,Z,G1,G2,G3);
title("curl");
G11=subs(fx,[x y z],{X Y Z});
G21=subs(fy,[x y z],{X Y Z});
G31=subs(fz,[x y z],{X Y Z});
subplot(2,1,2);
quiver3(X,Y,Z,G11,G21,G31);
title("vector field");
Conclusion: the curl of the vector are: xz, -yz
and y^3-x^2
Experiment 2B
Volume of solid using rotating method.
Aim: To find the volume of the solid.
Mathematical background:
Disk method (to find the volume):The solid generated by rotating a
plane region about an axis in its plane is called a solid of revolution
.To find the volume of a solid we need to observe that the cross
sectional area A(x) is the area of disk of radius R(x),the distance of
the planar region’s boundary from the axis of revolution .
The area is then: A(x)=π[R(x)]^2
Hence the volume is: V = a∫ bπ[R(x)]^2

Matlab code:
clc
clear all
close all
syms x
a=input('enter function1 in variable x:');
b=input("enter function2 in variable x:");
Ar=input('enter axis of rotation');
d=solve(a==0,x);
e=solve(a==b,x);
f=solve(b==0,x);
ans1=int(pi*((a-Ar)^2),x,d,e);
ans2=int(pi*((b-Ar)^2),x,e,f);
disp('volume of solid');
disp(ans1+ans2);
b3=double([d(1) e(1)]);
k=b3(1):0.1:b3(2);
fk=subs(a,x,k);
[X,Y,Z]=cylinder(double(fk)-Ar);
Z=b3(1)+Z.*(b3(2)-b3(1));
surf(Z,Y+Ar,X)
xlabel('X-axis');
ylabel('Y-axis');
hold on;
b2=double([e(1) f(1)]);
k=b2(1):0.1:b2(2);
fk=subs(b,x,k);
[X,Y,Z]=cylinder(double(fk)-Ar);
Z=b2(1)+Z.*(b2(2)-b2(1));
surf(Z,Y+Ar,X)

output
Conclusion:
Volume of given functions is 18*pi cubic units

You might also like