More examples from 1.5

Univariate Calculus
Andy Long

(* Exercise #26, p. 60 *)
f[x_]:=(9^x-5^x)/x
f[0]
Plot[f[x],{x,-.5,.5}]
Limit[f[x],x -> 0]
N[%] (* what's the numerical value of that last expression? *)
(* From the left: *)
list={-.5,-.1,-.01,-.001};
 TableForm[Table[{x,f[x]},{x,list}]]
(* From the right: since we're approaching zero, we just change the signs: *)
 TableForm[Table[{x,f[x]},{x,-list}]]

(* Exercise #35, p. 61 *)
f[x_]:=x*(1/Sin[x])
Plot[f[x],{x,2Pi-.5,2Pi+.5}]
Limit[f[x],x -> 2Pi,Direction->1]
Limit[f[x],x -> 2Pi,Direction->-1]

(* Exercise #42, p. 61 *)
f[x_]:=(Tan[x]-x)/x^3 (* note that f is even! The difference of odd functions is odd, and the quotient of an odd with an odd is even.*)
list={1.0,0.5,0.1,0.05,0.01,0.005};
(* From the right: *)
 TableForm[Table[{x,f[x]},{x,list}]]
(* From the left: since we're approaching zero, we just change the signs: *)
 TableForm[Table[{x,f[x]},{x,-list}]]
Plot[f[x],{x,-.5,.5}]
Limit[f[x],x -> 0]

Here is another dirty, rotten lie that Mathematica is telling me. Of course Mathematica isn’t trying to be mean -- it just encounters some numerical instabilities as the numbers get closer and closer to zero.

list={0.1,.01,.001,.0001,.000001,.00000000001,.00000000000001};
TableForm[Table[{x,f[x]},{x,list}]]

Plot[f[x],{x,-.0000001,.0000001}]