1

f(x):=(1/sqrt(2*%pi))*%e^(-x^2/2);

wxplot2d(f(x),[x,-3,3],[ylabel,"density"]);

2

g(x):=1/(%pi*(1+x^2));

plot2d([f(x),g(x)],[x,-3,3],[legend,"Gaussian distribution","Cauchy distribution"],[ylabel,"density"],[color,black,red]);

3

plot2d([1/x^2,1/x,1,x,x^2],[x,0,2],[y,0,2]);

4

plot2d([log(x)/log(2),log(x)/log(5),log(x),log(x)/log(10),log(x)/log(0.5)],[x,0,10],[y,-2,2]);

5

xvalue:[0.25,0.5,0.75,1,1.25,1.5,1.75];

yvalue:[-1.03,-0.63,-0.28,0.0,0.22,0.38,0.47];

plot2d([log(x)/log(10),[discrete,xvalue,yvalue]],[x,0,2],[style,[line,2],[points]],[legend, "log(x)", "data points"],[color, blue, red]);

6

plot2d([parametric,t^5+sin(2*%pi*t),t+%e^t,[t,-1.3,1.3]]);

7

f(x):=(1/(2*%pi))*%e^((-1/2)*(x^2+y^2));

plot3d(f(x),[x,-2,2],[y,-2,2]);

8

f(x):=(x^2+1)/x;

plot2d(f(x),[x,-4,4],[y,-5,5]);

fx:diff(f(x),x,1)/*first derivative*/;

crit:solve(fx=0,x)/*finding stationary points*/;

fxx:diff(f(x),x,2)/*second derivative*/;

fxx, crit[1]/*value of second derivative at x=-1 stationary point is negative. so it is a local maximum*/;

fxx, crit[2]/*value of second derivative at x=-1 stationary point is positive. so it is a local minimum*/;

b

y(x):=x^3-3*x^2-9*x+3;

plot2d(y(x),[x,-5,5]);

dy:diff(y(x),x);

critical:solve(dy=0,x);

dyy:diff(y(x),x,2);

dyy,critical[1];

dyy,critical[2];