已知函数\(f(x)=e^x+\sin x-kx\)
(1) 当\(k=0\)时,求\(f(x)\)在\(x=0\)处的切线方程;
(2) 当\(k=2\)时,求\(f(x)\)的单调性;
(3) 若\(x[f(x)-f(-x)]\geq 0\)恒成立,求\(k\)的范围.
解.(1) \(k=0,f(x)=e^x+\sin x,f^\prime(x)=e^x+\cos x,f^\prime(0)=2\)
而\(f(0)=1\),则切线方程为\(y-1=2x\)
(2) \(k=2,f(x)=e^x+\sin x-2x,f^\prime(x)=e^x+\cos x-2\)
当\(x<0\)时,\(f^\prime(x)=e^x+\cos x-2<1+1-2=0\)
\(x\geq 0\)时,\(f^{\prime\prime}(x)=e^x-\sin x>1-1=0\)
则\(f^\prime(x)\)单调递增,从而\(f^\prime(x)>f^\prime(0)=1+1-2=0\)
则综上,\(f(x)\)在\(x<0\)单调递减,在\(x\geq 0\)单调递增
(3) 因\([f(x)-f(-x)]\)是奇函数,则需考虑\(x>0\)上即可
\(\varphi(x)=f(x)-f(-x)=e^x-e^{-x}+2\sin x-2kx,\varphi(0)=0\)
\(\varphi^\prime(x)=e^x+e^{-x}+2\cos x-2k,\varphi^\prime(0)=4-2k\)
\(\varphi^{\prime\prime}(x)=e^x-e^{-x}-2\sin x\)
\(\varphi^{\prime\prime\prime}(x)=e^x+e^{-x}-2\cos x\geq 2-2\cos x\geq 0\)
则\(\varphi^{\prime\prime}(x)\)单调递增,即\(\varphi^{\prime\prime}(x)\geq \varphi^{\prime\prime}(0)=0\)
即\(\varphi^{\prime}(x)\)单调递增
Case1 当 \(k\leq 2\)时,此时\(\varphi^{\prime}(x)\geq \varphi^{\prime}(0)=4-2k\geq 0\)
则\(\varphi(x)\geq \varphi(0)=0\),合题
Case2 当\(k>2\)时,\(\varphi^{\prime}(0)<0\),而\(\varphi^{\prime}(x)\)单调递增
从而必存在一个区间\((0,m)\),使得在此区间上\(\varphi^{\prime}(x)\)小于\(0\)
即\(\varphi^{\prime}(x)\)单调递减,从而\(\varphi(x)\leq \varphi(0)=0\)不合题
综上,\(k\leq 2.\)