解:令f(x)=x²+2ax-1
f'(x)=2x+2a
令f'(x)=0,则x=-a
①若-a<-3 =>a>3,则f(x)max=f(1)=2a,f(x)min=f(-3)=8-6a
②若-3≤-a≤-1 =>1≤a≤3,则f(x)max=f(1)=2a,f(x)min=f(a)=3a²-1
③若-1<-a≤1=>-1≤a<1,则f(x)max=f(-3)8-6a,f(x)min=f(a)=3a²-1
④若-a>1 =>a<-1,则f(x)max=f(-3)8-6a,f(x)min=f(1)=2a