含参绝对值函数 $f(x)=|x-a|+\cos x$ 的值域
题干图字迹重叠严重,依解答反推:若 $f(x)=|x-a|+\cos x\geqslant -1$ 恒成立(对任意 $x\in\mathbb{R}$),且 $f(0)\in\left[-1,\dfrac{3\pi}{2}\right]$(⟨注:题干条件残缺,以下按解答过程还原⟩),求 $\dfrac{b}{a}$(其中 $b$ 为 $f(x)$ 取值为 $\dfrac{3\pi}{2}$ 时对应的自变量)。
解答
解析:$\because\ |x-a|\geqslant 0$,$\cos x\geqslant -1$
又 $\because\ f(x)\geqslant -1$
$\therefore\ a=x=\pi+2k\pi,\ k\in\mathbb{Z}$
$\because\ f(0)=|a|+1\in\left[-1,\ \dfrac{3\pi}{2}\right]$
$\therefore\ -2\leqslant a\leqslant\dfrac{3\pi}{2}-1$
$\therefore\ a=\pi$
$\therefore\ f(x)=|x-\pi|+\cos x$
$$\therefore\ f(x)=\begin{cases}x-\pi+\cos x & (x\geqslant\pi)\\ -x+\pi+\cos x & (x<\pi)\end{cases}$$
$b<\pi$ 时,$f'(x)=-1-\sin x\leqslant 0$,$f(x)$ 单减,则 $f(0)=\pi+1\neq\dfrac{3\pi}{2}$,舍去
$b\geqslant\pi$ 时,若 $x\geqslant\pi$,$f'(x)=1-\sin x\geqslant 0$,$f(x)$ 单增,则 $f(b)=b-\pi+\cos b=\dfrac{3\pi}{2}$
$$\therefore\ b=\frac{5\pi}{2}$$
$$\therefore\ \frac{b}{a}=\frac{5}{2}$$
答案: $\dfrac{b}{a}=\dfrac{5}{2}$