Which value of $x$ minimizes the following integral? $$\int_0^1\left\lvert -x + e^\varphi\right\rvert d\varphi$$
Using computational mathematics software I've seen the value of $x$ should be in interval $(0,2)$. Unfortunately, I have no other progress towards a solution because I don't recognize this type of problem and cannot figure out how to start.
Please help me identify the method with which I am to solve this problem. Should I be trying spline interpolation?
For $x\in[0, 2]$, the value of $|-x+e^\varphi|$ is $-x+e^\varphi$ for $\varphi\in[\text{log}(x), 1]$ and is $x-e^\varphi$ for $\varphi\in[0, \text{log}(x)]$.
Integrate from $0$ to $\text{log}(x)$ and from $\text{log}(x)$ to $1$. You will find a function of $x$. You can find its minimum.