# Finding the function when given definite integral output

Find a function $$f$$ and a positive number $$a$$ such that:

$$\int_{\sqrt x}^a f(x)\ln(x)\, dx= {\exp(x)\over2}-\ln\left({\sqrt x\over a}\right)-\pi$$

for all $$x>0.$$

• Hint: Differentiate both sides with respect to $y$ and then solve for $f$. You can find $a$ by choosing $y=a^2$, so that the left hand side of the equation becomes $0$. – Martins Bruveris Feb 18 at 22:46

Note that $$\int_a^bf(t)\,dt=-\int_b^a f(t)\,dt,$$ so we can do this: \begin{align*} \int_{\sqrt{y}}^a f(t)\ln(t)\,dt&=\frac{\exp(y)}{2}-\ln\left(\frac{\sqrt{y}}{a}\right)-\pi \\ -\int_a^{\sqrt{y}} f(t)\ln(t)\,dt&=\frac{\exp((\sqrt{y})^2)}{2}-\ln\left(\frac{\sqrt{y}}{a}\right)-\pi. \end{align*} Now let $$u=\sqrt{y}$$ to obtain \begin{align*} \frac{d}{du}\Bigg[-\int_a^{u} f(t)\ln(t)\,dt&=\frac{\exp(u^2)}{2}-\ln(u)+\ln(a)-\pi\Bigg] \\ -f(u)\ln(u)&=2u\,\frac{\exp(u^2)}{2}-\frac1u \\ f(u)&=\frac{1}{u\ln(u)}-\frac{u\exp(u^2)}{\ln(u)}. \end{align*} From here, we take Martins Bruveris's hint and set $$y=a^2,$$ so that the LHS of the original equation is zero. We obtain: \begin{align*} 0&=\frac{\exp(a^2)}{2}-\ln\left(a\right)+\ln(a)-\pi \\ 0&=\frac{\exp(a^2)}{2}-\pi \\ \frac{\exp(a^2)}{2}&=\pi\\ \exp(a^2)&=2\pi \\ a^2&=\ln(2\pi) \\ a&=\sqrt{\ln(2\pi)}. \end{align*}