If the real valued function f(x)=ax−1xnax+1 is even, then n = ______
6
3
8
12
f(−x)=f(x)⇒a−x−1(−x)na−x+1=ax−1xnax+1
⇒−1−1n=1⇒n=3