Answer
$\tan x+\cos\dfrac{1}{\sqrt 2}$
Work Step by Step
The solution of the given form is: $y(x)=y_0+\int_{x_0}^x f(t) \ dt $
We have: $y(x)=1+\int_{\pi/4}^{x} \sec^2 t-\sin t \ dt \\=1+[\tan t +\cos t]_{\pi/4}^{x}\\=1+\tan x +\cos x -1-\dfrac{1}{\sqrt 2}\\=\tan x+\cos\dfrac{1}{\sqrt 2}$