f(x)=(k-x)e^x
f'(x)=-e^x+(k-x)e^x=(k-1-x)e^x=0
得
x=k-1
1.k-1属于[0,2]
则
由f''(x)=(k-2-x)e^x
得
f''(k-1)=-e^(k-1)2,k>3
f'(x)=(k-1-x)e^x>0
f(x)递增,最大值=f(2)=(k-2)e^2
3.k-1
f(x)=(k-x)e^x
f'(x)=-e^x+(k-x)e^x=(k-1-x)e^x=0
得
x=k-1
1.k-1属于[0,2]
则
由f''(x)=(k-2-x)e^x
得
f''(k-1)=-e^(k-1)2,k>3
f'(x)=(k-1-x)e^x>0
f(x)递增,最大值=f(2)=(k-2)e^2
3.k-1