已知向量m=(sin A,cosA),n=(1,-2),且m*n=0,tanA的值为2,求函数f(x)=cos 2x+t