Context
I'm learning to integrate absolute value functions and have used the usual online integral calculator to check my answers. In one question, the steps the calculator takes to solve the problem are fascinating, take this problem
$$\int\left|x-4\right|\left|x-3\right|dx$$
One of the first things the calculator does is "Assume positive factors and add correction factors" turning it into
$$\dfrac{\left(x-4\right)\left(x-3\right)}{\left|x-4\right|\left|x-3\right|}\int\left(x-4\right)\left(x-3\right)dx$$
Now, on the one hand, this sort of makes sense, a function over the absolute value of that function would evaluate to $1$ or $-1$ depending on whether or not that function is less or greater than $0$, but I've never read anything about this technique before. On the other hand, moving anything other than a constant outside of the integration operator feels and looks wrong, it violates everything I've been taught so far
Question(s)
- What justifies this technique?
- Why doesn't it work when there's only one factor? for example, why is
$$\int\left|x-3\right|dx \neq \dfrac{\left(x-3\right)}{\left|x-3\right|}\int\left(x-3\right)dx$$
- Does this technique work with non-algebraic functions?
- I want to know more about these kinds of techniques, where should I start?