可设=(x,y),由与共线可得x=2y,进而可得=5y2-20y+12,可知当y=2时取最小值,可得的坐标,而∠APB的余弦值等于,代入坐标可求.
【解析】
由题意,可设=(x,y),∵点P在直线OM上,
∴与共线,而,
∴x-2y=0,即x=2y,故=(2y,y),
又==(1-2y,7-y),==(5-2y,1-y),
所以=(1-2y)(5-2y)+(7-y)(1-y)=5y2-20y+12,
当y==2时,=5y2-20y+12取最小值-8,
此时=(4,2),=(-3,5),=(1,-1),
∴cos∠APB===