You are on page 1of 21

Prac 1 Akshat Mittal.

wxm 1 / 21

Calculus Practical-1
(Plotting of graphs)
1 f(x)= ax, 'a' as a variable

(%i5) with_slider(a,makelist(a,a,−5,5),a·x,[x,−10,10]);

(%t5)

(%t6)
(%o6)

Observation: Graph is a straight line passing through origin.

➔ −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

2 f(x)= [x], Greatest Integer Function


Prac 1 Akshat Mittal.wxm 2 / 21

(%i7) wxplot2d(floor(x),[x,−10,10],[ylabel,"f(x)=[x]"],
[style,[points,0.5,2,2]]);

(%t7)

(%o7)

Observations: Graph is like a stair case.

➔ −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

3 f(x)=√ax+b
Prac 1 Akshat Mittal.wxm 3 / 21

(%i8) with_slider(a,makelist(a,a,−10,10),[sqrt(a·x+3),sqrt(3·x+a)]
,[x,0,10],[title,"Family of under-root graphs"],
[legend,"√ax+3","√3x+a"]);
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.

(%t8)

(%t9)
(%o9)

Observation: for varying constant term- Initially curve is shifting to


left and then down from right side
for varying cofficent term- Initially curve is shifting to
right and then up from right side.

➔ −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Prac 1 Akshat Mittal.wxm 4 / 21

4 f(x)= |ax+b|

4.1 Case I- When 'a' is fixed and 'b' is varying

(%i10) with_slider(b,makelist(b,b,−2,2),abs(5·x+b), [x,0,5]);

(%t10)

(%t11)
(%o11)

Observation: Graph Shifts horizontally left as the value of 'a' is


increasing.

4.2 Case II- When 'b' is fixed and 'a' is varying


Prac 1 Akshat Mittal.wxm 5 / 21

(%i12) with_slider(a,makelist(a,a,−2,2),abs(a·x+5), [x,0,5]);

(%t12)

(%t13)
(%o13)

➔ −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

5 f(x)=c±|ax+b|

5.1 Case I- When 'a' and 'b' are fixed and 'c' is
varying
Prac 1 Akshat Mittal.wxm 6 / 21

(%i16) with_slider(c,makelist(c,c,−2,2),c+abs(5·x+2),[x,−5,5],[legend,"c+|5x+8|","c-|5x+8|"],
[title,"Family of Absolute Graphs"]);

(%t16)

(%t17)
(%o17)

5.2 Case II- When 'a' and 'c' are fixed and 'b' is
varying.
Prac 1 Akshat Mittal.wxm 7 / 21

(%i18) with_slider(b,makelist(b,b,−2,2),2+abs(5·x+b),[x,−5,5],[legend,"c+|5x+8|","c-|5x+8|"],
[title,"Family of Absolute Graphs"]);

(%t18)

(%t19)
(%o19)

Observation- Graph is shifting toward left as the value of 'b' is


increasing.

5.3 Case III- When 'b' and 'c' are fixed and 'a' is
varying
Prac 1 Akshat Mittal.wxm 8 / 21

(%i34) with_slider(a,makelist(a,a,−2,2),2+abs(a·x+5),[x,−5,5],[legend,"c+|5x+8|","c-|5x+8|"],
[title,"Family of Absolute Graphs"]);

(%t34)

(%t35)
(%o35)

➔ −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

6 f(x)= x^±n
Prac 1 Akshat Mittal.wxm 9 / 21

(%i32) with_slider(n,makelist(n,n,1,6),[x^n,x^(−n)],
[x,−10,10],[y,−50,50]);
plot2d: some values were clipped.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: some values were clipped.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: some values were clipped.

(%t32)

(%t33)
(%o33)

Observation- for n= even, graphs are in I and II quadrants.


for n= odd, graphs are in I and III quadrants.

➔ −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

7 f(x)=x^(1/n)
Prac 1 Akshat Mittal.wxm 10 / 21

(%i20) with_slider(n,makelist(n,n,1,5),x^(1/n),
[x,−10,10],[y,−10,10]);

plot2d: expression evaluates to non-numeric value somewhere in plotting range.


plot2d: expression evaluates to non-numeric value somewhere in plotting range.

(%t20)

(%t21)
(%o21)

Observation: Graph is a straight line for n=1 and different curve for
other values of n.

➔ −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

8 f(x)= |x|/x
Prac 1 Akshat Mittal.wxm 11 / 21

(%i31) wxplot2d(abs(x)/x,[x,−5,5],[y,−10,10]);
plot2d: expression evaluates to non-numeric value somewhere in plotting range.

(%t31)

(%o31)

Observation: Two non-intersecting Straight line parallel to each other.

➔ −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

9 f(x)= sin(1/x)
Prac 1 Akshat Mittal.wxm 12 / 21

(%i22) wxplot2d(sin(1/x),[x,−1,1],[nticks,1],[y,−10,10],
[title,"curve of sin(1/x)"]);
plot2d: expression evaluates to non-numeric value somewhere in plotting range.

(%t22)

(%o22)

➔ −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

10 f(x)= xsin(1/x)
Prac 1 Akshat Mittal.wxm 13 / 21

(%i23) wxplot2d(x·sin(1/x),[x,−1,1],[ylabel,"xsin(1/x)"],
[legend,"curve of xsin(1/x)"]);
plot2d: expression evaluates to non-numeric value somewhere in plotting range.

(%t23)

(%o23)

Observation: A progressive graph is obtained with amplitude


increasing with increase in value of 'x'.

➔ −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

11 f(x)= e^±1/x , x≠0


Prac 1 Akshat Mittal.wxm 14 / 21

(%i24) wxplot2d([%e^(1/x),%e^(−1/x)],[x,1,100],[legend,"e^1/x","e^-1/x"]
,[style,[lines,5,5],[points,2,3,4]],
[xlabel,"values of 'x'"]);

(%t24)

(%o24)

Observation- two exponential graphs are obtained with y=1 and x=1
as asymptotes.

➔ −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

12 f(x)= e^(5x+b)
Prac 1 Akshat Mittal.wxm 15 / 21

(%i27) with_slider(b,makelist(b,b,−5,5),exp(5·x+b),
[x,−5,5],[y,−100,100]);
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: some values were clipped.

(%t27)

(%t28)
(%o28)

Observation: In graph,upper part of Curve is shifting toward left and


right.

➔ −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

13 f(x)= log(3x+b)
Prac 1 Akshat Mittal.wxm 16 / 21

(%i29) with_slider(b,makelist(b,b,−5,5),log(5·x+b),
[x,−5,5],[y,−10,10]);
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.

(%t29)

(%t30)
(%o30)

Observation: In graph, Curve is shifting toward left and right.

➔ −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

14 f(x)= 1/(9x+a)
Prac 1 Akshat Mittal.wxm 17 / 21

(%i25) with_slider(a,makelist(a,a,−5,5),1/(9·x+a),[x,−5,5]
,[y,−10,10],[title,"Reciprocal Function"]);
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: expression evaluates to non-numeric value somewhere in plotting range.
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: some values were clipped.
plot2d: some values were clipped.

(%t25)

(%t26)
(%o26)

Observation: two curves with y=0 as a asymptote are obtained and


graph is shifting towards left as the value
of 'a' is increasing.

➔ −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

15 f(x)= sin(ax+b)
Prac 1 Akshat Mittal.wxm 18 / 21

(%i36) with_slider(a,makelist(a,a,−5,5),[sin(a·x+8),sin(8·x+a)],
[x,−5,5],[y,−2,2],[box,false]);

(%t36)

(%t37)
(%o37)

Observation: Graph obtained is streching as the value of 'a' is


increasing.

➔ −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

16 f(x)= cos(ax+b)
Prac 1 Akshat Mittal.wxm 19 / 21

(%i38) with_slider(a,makelist(a,a,−5,5),[cos(a·x+1),cos(8·x+a)],
[x,−5,5],[y,−2,2]);

(%t38)

(%t39)
(%o39)

Observation: Graph obtained is streching as the value of 'a' is


increasing.

➔ −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

17 f(x)= |sin(ax+b)|
Prac 1 Akshat Mittal.wxm 20 / 21

(%i44) with_slider(a,makelist(a,a,−5,5),[abs(sin(a·x+8)),abs(sin(8·x+a))],
[x,−2,5],[y,−1,2],[box,false]);

(%t44)

(%t45)
(%o45)

Observation: Graph obtained is streching as the value of 'a' is


increasing.

➔ −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

18 f(x)= |cos(ax+b)|
Prac 1 Akshat Mittal.wxm 21 / 21

(%i42) with_slider(a,makelist(a,a,−5,5),[abs(cos(a·x+1)),abs(cos(2·x+a))],
[x,−5,5],[y,−1,2]);

(%t42)

(%t43)
(%o43)

Observation: Graph obtained is streching as the value of 'a' is


increasing.

➔ −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

You might also like