五、解答题 (本题满分 7 分)
设 $f(x)=\sin x-\int_{0}^{x}(x-t) f(t) \mathrm{d} t$, 其中 $f(x)$ 为连续函数, 求 $f(x)$.
当没办法通过积分求解原函数的时候,就要通过转化为微分方程求解原函数。
$$
f(x)=\sin x-\int_{0}^{x}(x-t) f(t) \mathrm{~d} t \Rightarrow
$$
$$
f(x)=\sin x – \textcolor{orangered}{ x \int_{0}^{x} f(t) \mathrm{~d} t } + \int_{0}^{x} t f(t) \mathrm{~d} t \Rightarrow \tag{1}
$$
对上面的式子的求导一定要彻底,否则就会产生下面这样的错误:
$$
\textcolor{yellow}{
f^{\prime}(x)=\cos x-x f(x)+x f(x)=\cos x
}
$$
正确的解法如下:
$$
f^{\prime}(x)=\cos x-\int_{0}^{x} f(t) \mathrm{~d} t-x f(x)+x f(x) \Rightarrow
$$
$$
f^{\prime}(x)=\cos x-\int_{0}^{x} f(t) \mathrm{~d} t \Rightarrow \tag{2}
$$
$$
f^{\prime \prime}(x)=-\sin x-f(x) \Rightarrow
$$
$$
f^{\prime \prime}(x)+f(x)=-\sin x \Rightarrow \lambda^{2}+1=-\sin x
$$
结合 (1) 式可得:
$$
x=0 \Rightarrow f(0)=0
$$
由 (2) 式可得:
$$
x=0 \Rightarrow f^{\prime}(0)=1
$$
又:
$$
\lambda^{2}+1=0 \Rightarrow \lambda= \pm i \cdot 1 \Rightarrow
$$
$$
y^{*}=e^{\alpha x}\left(C_{1} \cos \beta x+C_{2} \sin \beta x\right) \Rightarrow
$$
$$
y *=C_{1} \cos x+C_{2} \sin x
$$
非奇特:
$$
Y^{*}=x^{k} e^{2 x}\left(Q_{n}(x) \cos \beta x+\omega_{n}(x) \sin \beta x\right) \Rightarrow
$$
$$
\alpha=0, \quad \beta=1 \quad \alpha \pm i \beta=\lambda \Rightarrow k=1
$$
$$
Y^{*}=x(a \cos \beta x+b \sin (x) \Rightarrow
$$
$$
\left(Y^{*}\right)^{\prime}=a \cos \beta x+b \sin x+x(-a \sin x+b \cos x)
$$
$$
\left(Y^{*}\right)^{\prime \prime}=-a \sin x+b \cos x+x(-a \cos x-b \sin x)
$$
$$
\textcolor{orangered}{
-a \sin x+b \cos x } \Leftrightarrow
$$
$$
\left(Y^{*}\right)^{\prime \prime}+\left(Y^{*}\right)=-\sin x \Rightarrow
$$
$$
-a \sin x+b \cos x-a x \cos x-b x \sin x-a \sin x+b \cos x
$$
$$
+a x \cos x+b x \sin x=-\sin x \Rightarrow
$$
进而:
$$
-2 a \sin x+2 b \cos x=-\sin x \Rightarrow
$$
$$
a=\frac{1}{2}, \ b=0 \Rightarrow
$$
$$
Y^{*}=\frac{1}{2} x \cos x \Rightarrow
$$
于是,通解为:
$$
Y=y ^{*} + Y^{*}=C_{1} \cos x+C_{2} \sin x+\frac{1}{2} x \cos x \Rightarrow
$$
又:
$$
x=0, Y^{\prime}(0)=0 \Rightarrow C_{1}=0
$$
$$
x=0, Y^{\prime}(0)=-C_{1} \Rightarrow \sin x+C_{2} \cos x+
$$
$$
\frac{1}{2} \cos x-\frac{1}{2} x \sin x=1 \Rightarrow
$$
$$
C_{2}+\frac{1}{2}=1 \Rightarrow C_{2}=\frac{1}{2} \Rightarrow
$$
$$
Y=\frac{1}{2} \sin x+\frac{1}{2} x \cos x
$$