How can this be integrated?

$\displaystyle \int_0^{\pi/4} \left(\;\tan ^n x + \tan^{n-2} x \;\right) \;\; d\left(x-\cfrac{[x]}{1!}+\cfrac{[x]^2}{2!}-\cfrac{[x]^3}{3!} + \,...\right)$

where [.] denotes greatest integer function.

Welcome to MSE. Your question is phrased as an isolated problem.

Sorry for not providing any context along with the question, as I was working on my integrals, I came across this question and wondered about integrating with respect to $f(x)$ rather than $x$. Aforementioned series without $[x]$ looks quite similar to $ e^{-x}$.

I do realize that $ \displaystyle \int f(x) \; d\,g(x) = \displaystyle \int f(x) \;g'(x)\;dx $

Since the range is from $0$ to $\pi/4$, [x] would be $0$ but I am not sure if that's helpful, and that's all I was able to decipher.

  • 1
    $\begingroup$ I'm having a problem understanding your expression. What is the integrating variable? If the thing in the parentheses is the integrating variable (because d is in front of it), then $\tan^{n-2}$ has no argument. Otherwise, you are missing an integrating variable... you should clarify what this means. Also, any use of floor function will only split this integral into two parts - 0 to 1 and 1 to π/2. $\endgroup$
    – orion
    Jan 14, 2019 at 10:21
  • $\begingroup$ @orion Apologies for the missing variable, I have made the necessary corrections and added context to it. $\endgroup$ Jan 14, 2019 at 10:29

1 Answer 1


The main thing to realize here is what the parenthesized expression means for different ranges in $x$:

$$u=x-\frac{\lfloor x\rfloor}{1!}+\frac{\lfloor x\rfloor^2}{2!}+\cdots$$

For $0\leq x<1$, the expression is simply equal to $x$.

For $1\leq x<2$, $\lfloor x \rfloor=1$. So you can write this as: $$u=x-\frac{1}{1!}+\frac{1}{2!}-\frac{1}{3!}+\cdots=x-1+e^{-1}$$ where I recognized the value of $e^{-1}$ without the first term. For $x>2$, you need to reevaluate it again, you get $x-1+e^{-2}$. In general, you get

$$u(x)=x-1+e^{-\lfloor x \rfloor}$$

So on each part of the integration domain, $du=dx$ (constant doesn't make a difference).

However, it is quite unclear what exactly this integral means. It is not a proper Riemann integral in two ways.

First, it is ambiguous what the integral boundaries mean. Are they meant to refer to values of $u$ or $x$? If $x$, then it is quite unconventional notation, as $u$ to $x$ is not one to one (more $x$ have the same $u$).

The integral can be computed, as $du=dx$ almost everywhere, but you need to be careful, because technically, if $u(x)$ is treated as distribution, there is a discrete negative jump at $x=1$ and $x=2$ etc., so you have discrete (delta function) contributons in addition to the continuous integral (derivative of a Heaviside jump function is a delta function):

$${\rm d}u={\rm d}x(1+(e^{-1}-1)\delta(x-1)+\cdots)$$ Fortunately your integral does not encompass any of the jumps so the whole transformation is pointless, and you can simply ignore it:

$$\int_0^{\pi/4} f(x){\rm d}u=\int_0^{\pi/4} f(x){\rm d}x$$

  • $\begingroup$ The limits refer to values of $x$. $\endgroup$ Jan 14, 2019 at 10:50
  • $\begingroup$ @Ashok Thank you, I modified my response. $\endgroup$
    – orion
    Jan 14, 2019 at 11:04
  • $\begingroup$ but since the integral has been restricted to $0 \to \frac{\pi}{4}$, wouldn't $x \not\ge 1$, hence dropping the discrete contributions? $\endgroup$ Jan 14, 2019 at 18:49
  • $\begingroup$ @Ashok you are right! That's embarassing. I completely missed it, in my head I was constantly thinking of $\pi/2$. $\endgroup$
    – orion
    Jan 14, 2019 at 19:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.