The following question is taken from the practice set of JEE.
Question:
If $g(n)=\int_0^{n^2+n+1}e^{\frac x2-[\frac x2]}(\frac x2-[\frac x2])d(x-[x]),$ where $[x]$ is the greatest integer function and $n\in\mathbb N$, then $g(n)$
(1) has minimum value as $\frac14+\sqrt e$
(2) has maximum value as $3-\sqrt e$
(3) has minimum value as $\frac34-\sqrt{\frac e4}$
(4) none of these
My Attempt:
If $n\in\mathbb N$, then $n^2+n+1$ always increases with minimum value $3$.
Also, $x-[x]=\{x\}$, where $\{x\}$ is fractional part function.
If, in the integral, I had $dx$ then I would have written
$g'(n)=e^{\{n^2+n+1\}}(\{n^2+n+1\})(2n+1)$
But now, we have $d\{x\}$ in integral. I wonder how to use the leibnitz differentiation now.
Also, when $x\in(0,1)$ then in the integral, we can write $d(x)$
Also when $x\in(1,2)$ then in the integral, we can write $d(x-1)$
Edit:
Since $\{x\}$ has period $1$,
So, $g(n)=(n^2+n+1)\int_0^1e^{\frac x2}\frac x2 dx$
Or, do I need to consider the periodicity of $\{\frac x2\}$?
Then $g(n)=2(n^2+n+1)\int_0^1e^{\frac x2}\frac x2 dx$
And $\int_0^1e^{\frac x2}\frac x2 dx=2-\sqrt e$
In either case, the answer comes out to be option (4).
But I just wonder which case to consider.
Edit$2$:
$\int_0^{3π}|\sin x|dx=3\int_0^π\sin xdx$ because period of $|\sin x|$ is π.
I have used this concept above.
For, $g'(n)$, I used Leibnitz integral rule.
Edit$3$:
I am taking a simple case,
$I=\int_0^4\{\frac x2\}d\{x\}$
I wonder if I should consider the periodicity of $\{x\}$ or $\{\frac x2\}$
In one case, $I=4\int_0^1\frac x2dx$
In other case, it's $I=2\int_0^2\frac x2d\{x\}$
I wonder which one to take.