解:f(x)=(1+3tanx) cosx=cosx+3sinx=2(32sinx+12cosx)=2sin(x+π6)∵0≤x<π2∴π6≤x+π6<2π3∴12≤sin(x+π6)≤1∴当sin(x+π6)=1时,f(x)有最大值2故答案为2