14.若 $f(x)=(x-1)^{2}+a x+\sin \left(x+\frac{\pi}{2}\right)$ 为偶函数,则 $a=$ $\_\_\_\_$ .
参考答案2
2023_全国甲卷 (2023·文)
14.若 $f(x)=(x-1)^{2}+a x+\sin \left(x+\frac{\pi}{2}\right)$ 为偶函数,则 $a=$ $\_\_\_\_$ .
【答案】2
## 【解析】
【分析】根据常见函数的奇偶性直接求解即可.
【详解】 $\because f(x)=(x-1)^{2}+a x+\sin \left(x+\frac{\pi}{2}\right)=(x-1)^{2}+a x+\cos x=x^{2}+(a-2) x+1+\cos x$ ,且函数为偶函数,
$\therefore a-2=0$ ,解得 $a=2$ ,
故答案为: 2