TITLE: Problem from a Calculus 2 course: Deducing $f(0)$ from $\int_{0}^{\pi}(f(x)+f''(x))\sin(x)~dx=-1$ and $f(\pi)=1$.
QUESTION [0 upvotes]: I have a little problem that somehow got me stumped. Given $\int_{0}^{\pi}(f(x)+f''(x))\sin(x)~dx=-1$, and $f(x)$ has a continuous 2nd derivative. Suppose that $f(\pi)=1$, compute $f(0)$. How do I do that? I took a derivative on both sides but plugging in $x=\pi$ then gave me $0=0$, so clearly I am not thinking in the right direction. Any suggestions are welcome.

REPLY [1 votes]: Given that:
$$\int_{0}^{\pi} f(x) \sin x dx +\int_{0}^{\pi} f''(x) \sin x dx=-1$$
Let us integrate the first integral by parts
$$=\left.-f(x)\cos x\right|_{0}^{\pi} +\int_{0}^{\pi} f'(x) \cos x dx+\int_{0}^{\pi} f''(x) \sin x dx=-1$$.
Let us integrate the second integral by parts to get
$$f(\pi)+f(0)+f'(x) \sin x|_{0}^{\pi}-\int_{0}^{\pi}f''(x) \sin x+\int_{0}^{\pi} f''(x) \sin x dx=-1$$
$$\implies f(\pi)+f(0)=-1 \implies f(0)=-2$$
{"set_name": "stack_exchange", "score": 0, "question_id": 3529514}