f(x) = (2ax-a^2+1)/(x^2+1)
f'(x) = { (x^2+1)*2a - (2ax-a^2+1)*2x } / (x^2+1)^2
= -2{ax^2+(1-a^2)x-a} / (x^2+1)^2
= -2a{x^2+(1/a-a)x-1} / (x^2+1)^2
= -2a(x+1/a)(x-a) / (x^2+1)^2
(一)当a=0时,f'(x) = -2{ax^2+(1-a^2)x-a} / (x^2+1)^2 = -x / (x^2+1)^2
单调增区间:(-∞,0)
单调减区间(0,+∞)
x=0时取极大值f(0)=(0-0+1)/(0+1) = 1
(二),当a<0时,f'(x) = -2a(x+1/a)(x-a) / (x^2+1)^2
x<a,或x>-1/a时,f'(x)>0;a<x<-1/a时,f'(x)<0
单调增区间(-∞,a),(-1/a,+∞)
单调减区间(a,-1/a)
极大值f(a) = (2a*a-a^2+1)/(a^2+1) = 1
极小值f(-1/a) = (2a*(-1/a)-a^2+1)/((-1/a)^2+1) = -a^2
(三),当a>0时,f'(x) = -2a(x+1/a)(x-a) / (x^2+1)^2
x<a,或x>-1/a时,f'(x)<0;-1/a<x<a时,f'(x)>0
单调减区间(-∞,-1/a),(a,+∞)
单调增区间(-1/a,a)
极小值f(-1/a) = (2a*(-1/a)-a^2+1)/((-1/a)^2+1) = -a^2
极大值f(a) = (2a*a-a^2+1)/(a^2+1) = 1