c=a+kb = (2-k,1-k)d = a+b =(1,0)cos = c(点乘)d/(|c|*|d|) = (2-k)/√(2*k^2-6*k+5) = cosπ/4 =√2/2两边平方有(2-k)^2/(2*k^2-6*k+5)=1/22k^2-8k+8 = 2*k^2-6*k+52k=3k=3/2 PS:按你给的答案和一般情况来看,c和d的夹角应为π/4而不是4/π
c=(2-k,1-k),d=(1,0)cos=(c,d)/模c*模d=(2-k)/sqrt[(2-k)^2+(1-k)^2]=0.5sqrt(2),注意(c,d)为c和d的内积平方整理,解得k=3/2