# Lab sheet 3

Exercise 1

wxplot2d(2*exp(-t)*sin(30*t),[t,0,5]);

wxplot2d(2*sin(20*t)+3*sin(21*t),[t,0,20]);

wxplot2d(sin(x)+sin(3*x)/3+sin(5*x)/5+sin(7*x)/7,[x,-2*%pi,2*%pi]);

wxplot2d(cos(%pi*x^2),[x,-5,5]);

Exercise 2

f(x) := (x^3-x)*(x^2-4/9)*(x^2-1/9);

wxplot2d([f(x),x^7],[x,-5,5]);

wxplot2d([f(x),-4/81*x],[x,-0.1,0.1]);

Exercise 3

g(x) := (2*x+3)/(3*x-4);

wxplot2d([g(x),2/3],[x,-10,10],[y,-10,10]);

[limit(g(x),x,inf),limit(g(x),x,minf)];

kill(g)$;

Exercise 4

f(x) := (1-exp(x)+exp(2*x)-exp(3*x))/sin(x);

f(0);

limit(f(x),x,0);

wxplot2d([f(x),-2],[x,-1,1]);

kill(f)$;

Exercise 5

wxplot2d(bessel_j(2,x),[x,-50,50]);

wxplot2d([bessel_j(2,x),x^2/8],[x,-0.1,0.1]);

wxplot2d([bessel_j(2,x),0.8*x^(-1/2)],[x,10,300]);

wxplot2d([bessel_j(2,x),0.8*x^(-1/2)*sin(x-2/3*%pi)],[x,5,100]);

Exercise 6

g(a,x) := (x-1-sin(a/4))*(x-1-cos(a/4))*(x+1-sin(a/4))*(x+1-cos(a/4))/(1+x^4);

wxplot2d([g(2,x),g(3,x),g(4,x)],[x,-500,500]);

wxplot2d([g(2,x),g(3,x),g(4,x)],[x,-2,2],[legend,"2","3","4"]);

wxplot2d([g(%pi,x),0],[x,-0.4,0.2]);

y: 1 - 8*g(a,0);

wxplot2d([y,cos(a)],[a,-2*%pi,2*%pi]);

wxplot2d(g(a,0.5),[a,-40,40]);

slope: diff(g(a,1/2),a)$;
slope: expand(slope),exponentialize$;
slope: expand(slope),demoivre;

find_root(slope,a,3,4);

wxplot3d(g(a,x),[a,-20,20],[x,-15,15],[grid,100,100],[mesh_lines_color,false]);

kill(g,y,slope)$