Three nice functions

Andy Long
Spring, 2018

(* #50, p. 243 *)
f[x_]:=(1+5x-2x^2)/(x-2)
f[x]
N[Solve[f[x]==0,x]]
Together[f'[x]]
Solve[f'[x]==0,x]
Together[f''[x]]
Solve[f''[x]==0,x]
(* 
	The slant asymptote in this case can be obtained by long-division. 
*)
Plot[{f[x],-2x+1},{x,-1,5}]
(* Notice that this function is symmetric about the point of intersection of the vertical asymptote -- x=2 -- and the slant asymptote, which has y=-3 at x=2. Hence, this graph is symmetric about (2,-3). We can see that by rewriting the equation, using the new coordinate system X=x-2 and Y=y+3
In these new coordinates, the function Y=f[X] is odd. *)
Simplify[f[2+X]+3]

(* #58, p. 243 *)
f[x_]:=(x^3+1)/x
f[x]
(* 
	We might first re-write this one using just algebra, to see that limit: 
*)
f[x_]:=x^2+1/x
f[x]
Together[f'[x]]
Solve[f'[x]==0,x]
Together[f''[x]]
Solve[f''[x]==0,x]
Plot[{f[x],x^2},{x,-2,2}]

(* #23, p. 243 *)
f[x_]:=Sqrt[x^2+x-2]
Together[f'[x]]
Solve[f'[x]==0,x]
Together[f''[x]]
Solve[f''[x]==0,x]
Plot[{f[x],Abs[x+1/2]},{x,-4, 4}]