Cho hàm số \(f(x)\) thỏa mãn đồng thời các điều kiện \(f'(x)=x+\sin x\) và \(f(0)=1\). Tìm \(f(x)\).
\(f(x)=\dfrac{x^2}{2}-\cos x+2\) | |
\(f(x)=\dfrac{x^2}{2}-\cos x-2\) | |
\(f(x)=\dfrac{x^2}{2}+\cos x\) | |
\(f(x)=\dfrac{x^2}{2}+\cos x+\dfrac{1}{2}\) |
Chọn phương án A.
\(\begin{aligned}f(x)&=\displaystyle\int f'(x)\mathrm{\,d}x=\displaystyle\int\left(x+\sin x\right)\mathrm{\,d}x\\
&=\dfrac{x^2}{2}-\cos x+C.\end{aligned}\)
Ta lại có: $$\begin{aligned}f(0)=1\Leftrightarrow&\,\dfrac{0^2}{2}-\cos0+C=1\\
\Leftrightarrow&\,C=2.\end{aligned}$$
Vậy \(f(x)=\dfrac{x^2}{2}-\cos x+2\).