$\color{orange}{\mathrm{Question:}}$
If $f\left(\pi\right)=\pi$ and $\int_{0}^{\pi}\left(f (x)+f''(x)\right)\sin x\ dx\ =\ 7\pi$ then find $f(0)$ given that $f(x)$ is continuous in $\left[0,\pi\right]$
$\color{green}{\mathrm{Solution:}}$
Given: $$\int_{0}^{\pi}\left(f(x)+f''(x)\right)\sin x\ dx\ =\ \int_{0}^{\pi}f(x)\sin x\ dx\ +\int_{0}^{\pi}f''(x)\sin x\ dx$$ By ILATE ( Integration by parts), keeping $f''(x)$ as the first function and $\sin x$ as the second function: $$7\pi\ =\int_{0}^{\pi}f(x)\sin x\ dx\ +\ \left[\sin x\cdot f'(x)-\int_{0}^{\pi}\cos x\cdot f'(x)dx\right]$$ $$7\pi\ =\int_{0}^{\pi}f(x)\sin x\ dx\ +\ \left[\sin x\cdot f'(x)-\left[\cos x\cdot f(x)-\int_{0}^{\pi}\left(-\sin x\right)\left(f(x)dx\right)\right]\right]$$ $$7\pi=\sin x\cdot f'(x)-\cos x\cdot f(x)$$ The limits being of integration being from $0$ to $\pi$, (sorry i don't know Latex much :( ) $$7\pi=\left[\sin\pi\cdot f'(\pi)-\sin0\cdot f'(0)\right]-\left[\cos\pi\cdot f(\pi)-\cos0\cdot f(0)\right]$$ Solving this I got $f(0)=6\pi$, which is the correct answer, no issues with that but...
$\color{pink}{\mathrm{Doubt}}$
- When using the ILATE rule, we don't know what kind of function $f(x)$ is, so how can we decide whether to take it as the first function or the second function, I just did that for my convenience because I thought that will give me the solution.
- Secondly, what is the importance of the statement of the question: $f(x)$ is continuous?
$\color{red}{\mathrm{Edit}}$
Basically it looks like ILATE is not a very good rule and Integration by parts is OP!