Professional Documents
Culture Documents
E-Example– 1
Date:17-11-2020
Question(Aim): Plot the helix defined by the parametric equations x cost , y sin t , z t .
MATLAB command:
clear
clc
syms t
x=cos(t);
y=sin(t);
z=t;
ezplot3(x,y,z,[0,6*pi])
Question(Aim):Taylor series of the function 𝑓(𝑥, 𝑦) = 𝑒𝑥𝑐𝑜𝑠𝑦 is evaluated about the origin. Also the
function along with its Taylor series is plotted in the corresponding figure.
MATLAB command:
clear
clc
close all
syms x y
f=exp(x)*cos(y);
I=[0,0];
a=I(1);b=I(2);
n=5;
tayser=taylor(f,[x,y],[a,b],'order',n)
subplot(1,2,1);
ezsurf(f); %Function plot
subplot(1,2,2);
ezsurf(tayser);
Question(Aim): Draw the surface of the function f(x,y)=e x+ey using ezsurf
MATLAB command:
clear
clc
syms x y
f=exp(x)*exp(y)
ezsurf(f)
colormap cool
Question(Aim): Draw the 3-D plot for the function f(t)=(t, t 2, t 3), where 0 t 100
MATLAB command:
clear
clc
syms t
x=t;
x1=t^2;
x2=t^3;
ezplot3(x,x1,x2,[0,100])
Question(Aim): To expand f (x, y)=ex ln(1+y) in terms of x and y upto the terms of 3 rd degree using
Taylor series.
MATLAB command:
clear
clc
close all
syms x y
f=exp(x)*log(1+y)
I=[0,0];
a=I(1);b=I(2);
n=3;
tayser=taylor(f,[x,y],[a,b],'order',n)
subplot(1,2,1);
ezsurf(f); %Function plot
subplot(1,2,2);
ezsurf(tayser);