You are on page 1of 14

CHAITANYA_HANDA_CSE1A_G1

CALCULUS AND LINEAR ALGEBRA


LAB-02
1. Plot the following function: -
i. Sin(x), Cos(x) in the interval [0,2π]

ii. tan(x) in the interval [-π,π]

1
CHAITANYA_HANDA_CSE1A_G1

x
iii. e

iv. |x|

2
CHAITANYA_HANDA_CSE1A_G1

v. floor(x)

vi. log(x)

3
CHAITANYA_HANDA_CSE1A_G1

IV. Parabola y2 = 4ax for a = 2

2. Simple 2 D plot:
t
1. f(t)=e 10 sin ( t )

4
CHAITANYA_HANDA_CSE1A_G1

2. circle of radius 2 units and center (0,2)

3. ellipse with major axis = 5 and minor axis = 3 units.

5
CHAITANYA_HANDA_CSE1A_G1

4. Cycloid x = a(t + sin(t)), y = a(1-cos(t)) for – π <t< π .

3.Plot by ez plot:

1. Plot f(x)=e-x/10cos(x) for x between 0 and 20.

6
CHAITANYA_HANDA_CSE1A_G1

4. Plot by ezpolar:

1. Plot r ( θ )=1+2 sin 2 ( 2θ ) for 0<θ <2 π .

2. r = asin( 3 θ )

7
CHAITANYA_HANDA_CSE1A_G1

3. r = a(1+cos(θ))

5. Plot 3-D: Plot x(t)=tcos(3πt),y(t)=tsin(3πt), and 2(t)=t over the default


domain.

8
CHAITANYA_HANDA_CSE1A_G1

6. Plot 3-D: Plot the circular helix x(t)=sint,y(t)=cost,z(t)=t, 0≤ x ≤ 20

9
CHAITANYA_HANDA_CSE1A_G1

7. Plot y1 = 2 cos(x), y2 = cos(x), and y3 = 0.5 ∗ cos(x), in the interval 0 ≤ x ≤ 2π.


(Note: Plot y1 --, y2 -, y3 :). Label the axis, include title and use legend.

10
CHAITANYA_HANDA_CSE1A_G1

11
CHAITANYA_HANDA_CSE1A_G1

12
CHAITANYA_HANDA_CSE1A_G1

8. Plot a function using the hold on, hold off command: Plot the function y=
3 x 3−26 x+ 10, and its first and second derivatives, for -2≤ x ≤ 4 all in the same plot.Plot(x
and y using black -, x and first derivative red --, x & second derivative yellow.

13
CHAITANYA_HANDA_CSE1A_G1

14

You might also like