CPI 200
Midterm

1.  Let 
	f(x) =   sin(x) 

Sketch f,  f ’, and f ‘’ over [0,π].

f[x_]:=Sin[x] ;
Plot[{f[x],f'[x],f''[x]},{x,0,Pi},PlotStyle->Thick]

2.  What is the area under f when f(x) = (x^3)  and x∈[-2,2]

NIntegrate[x^3,{x,-2,2}]

3. What is the action of the matrix

M = (({{0, 1}, {1, 0}}))

m={{0,1},{1,0}};
Print["M's action on {x,y}: ",MatrixForm[m.{x,y}]]

4.  If f ‘(x)=0 for some x, what is the slope of f at x?

5. What is a circle mapped to by an affine map?

6. What is the limit of ((3i)/(3i+2)) as i →∞?

Limit[3i/(3i+2),{i-> Infinity}]

7. Find the binary form of the decimal number 6.5

BaseForm[6.5,2]

8. Let L be the line through (0,2) and (2,2). What is the distance of the origin
    to L?
    
9. Are the two vectors (1,3) and (1,-3) linearly independent? Explain.

(* Input vectors *)

a1={1,3};  b1 ={1,-3};
a = a1;   (*in blue *)
b= b1;  (* in green *)

(* create a range for plotting *)
lgth = Norm[a];
If[Norm[b] > lgth,lgth = Norm[b]];

(* graphics entities for input vectors *)
arrowa={Arrowheads[Large],Arrow[{{0,0},a}]};
arrowb ={Arrowheads[Large],Arrow[{{0,0},b}]};

Manipulate[
Graphics[{Blue,arrowa, Green,arrowb,Red,{Arrowheads[Large],Arrow[{{0,0},s*a+t*b}]} },PlotRange->{{-lgth,lgth},{-lgth,lgth}}],{{s,0.5},-1,1},{{t,0.5},-1,1}, Alignment->Left,FrameLabel->{" "," ","red = s*blue + t*green"," "}]