Why is there no indefinite integral for $\int x\mod{n}$ (where n can be any number)?

241 Views Asked by At

Typing integrate x mod 1 in Wolfram|Alpha tells me that "there is no result found in terms of mathematical functions". Why is there no indefinite integral? Couldn't the area under $x \mod y$ be calculated with: $$\dfrac{y^2}{2}\left\lfloor\dfrac{x}{y}\right\rfloor+\dfrac{(x \mod y)^2}{2},$$ where $\left\lfloor\dfrac{x}{y}\right\rfloor$ is the number of full triangles, $\dfrac{y^2}{2}$ is the area of each triangle and $\dfrac{(x \mod y)^2}{2}$ is the area of the last and smallest triangle?

1

There are 1 best solutions below

0
On BEST ANSWER

Yes, that looks correct to me, at least depending on how you defined $\bmod$ for negative $x$.

Just because Wolfram Alpha doesn't know how to solve a problem, doesn't mean it can't be solved ;)