# 遇到负号一定要慎之又慎：千万不要心算，要写出来算！

## 二、解析

$$t=x-k$$

$$k \in(x, 0)$$

$$\mathrm{~ d} t=-\mathrm{~ d} k$$

$$\int_{0}^{x} t f(x-t) \mathrm{~ d} t=-\int_{x}^{0}(x-k) f(k) \mathrm{~ d} k=$$

$$\int_{0}^{x}(x-k) f(k) \mathrm{~ d} k=x \int_{0}^{x} f(k) \mathrm{~ d} k-\int_{0}^{x} k f(k) \mathrm{~ d} x$$

$$\int_{0}^{x} f(t) \mathrm{~ d} t=x+\sin x+\int_{0}^{x} t f(x-t) \mathrm{~ d} t \Rightarrow$$

$$f(x)=1+\cos x+\int_{0}^{x} f(k) \mathrm{~ d} k+x f(x)-x f(x) \tag{1}$$

$$f(x)=1+\cos x+\int_{0}^{x} f(k) \mathrm{~ d} k$$

$$f(0)=2$$

$$f^{\prime}(x)=-\sin x+f(x) \Rightarrow$$

$$y^{\prime} + (\textcolor{red}{-} y) = -\sin x \Rightarrow$$

$$y(x)=\left[-\int \sin x \cdot e^{\int \textcolor{red}{-} 1 \mathrm{~ d} x} \mathrm{~ d} x+c\right] e^{-\int \textcolor{red}{-} 1 \mathrm{~ d} x} \Rightarrow$$

$$y(x)=\left[-\int \sin x e^{-x} \mathrm{~ d} x+c\right] e^{x}$$

$$I = -\int \sin x e^{-x} \mathrm{~ d} x =$$

$$\int \sin x \mathrm{~ d} \left(e^{-x}\right)=$$

$$e^{-x} \sin x-\int e^{-x} \cos x \mathrm{~ d} x=$$

$$e^{-x} \sin x+\left[\cos x \mathrm{~ d} \left(e^{-x}\right)\right] =$$

$$e^{-x} \sin x+\left[e^{-x} \cos x+\int e^{-x} \sin x \mathrm{~ d} x\right]=I \Rightarrow$$

$$e^{-x} \sin x+e^{-x} \cos x+\int e^{-x} \sin x \mathrm{~ d} x=I \Rightarrow$$

$$\textcolor{orangered}{ e^{-x} \sin x + e^{-x} \cos x+ (-I) = I } \Rightarrow$$

Tips:

$$e^{-x} \sin x+e^{-x} \cos x=+2 I \Rightarrow$$

$$I=\frac{+1}{2} e^{-x}(\sin x+\cos x)$$

$$y(x)=\left[\frac{1}{2} e^{-x}(\sin x+\cos x)+C\right] e^{x} \Rightarrow$$

$$y(x)=\frac{1}{2}(\sin x+\cos x) + C e^{x}$$

$$\frac{1}{2} + C = 2 \Rightarrow C=\frac{3}{2}$$

$$y(x)=\frac{1}{2}(\sin x+\cos x)+\frac{3}{2} e^{x}$$