A couple of questions about $\int_{ }^{ }\frac{\left|f\left(x\right)\right|}{f\left(x\right)}g\left(x\right)dx$ type integrals.

40 Views Asked by At

With obviously $f\left(x\right),g\left(x\right)\in R$.
This integral can be solved using two methods:

  1. Using the relation $\frac{d}{dx}\left(\frac{\left|f\left(x\right)\right|}{f\left(x\right)}G\left(x\right)\right)=\frac{\left|f\left(x\right)\right|}{f\left(x\right)}G'\left(x\right)$ for any $f\left(x\right),G\left(x\right)$ which implemented in the integral above give the result $\int_{ }^{ }\frac{\left|f\left(x\right)\right|}{f\left(x\right)}g\left(x\right)dx=\frac{\left|f\left(x\right)\right|}{f\left(x\right)}\int_{ }^{ }g\left(x\right)dx$.
  2. Otherwise you can think of $\frac{\left|f\left(x\right)\right|}{f\left(x\right)}g\left(x\right)$ as the result of the product rule, aka $\frac{d}{dx}\left(\left|f\left(x\right)\right|h\left(x\right)\right)$. After simple calculations we find that $h\left(x\right)=\frac{g\left(x\right)}{f'\left(x\right)}$ and the integral becomes $\int_{ }^{ }\frac{\left|f\left(x\right)\right|}{f\left(x\right)}g\left(x\right)dx=\left|f\left(x\right)\right|\frac{g\left(x\right)}{f'\left(x\right)}-\int_{ }^{ }\left|f\left(x\right)\right|\frac{g'\left(x\right)f'\left(x\right)-g\left(x\right)f''\left(x\right)}{f'\left(x\right)^{2}}dx$.

Now, all this make sense while thinking of this as a indefinite integral, but if we try to calculate them as definite integral of type $\int_{n}^{x}$ (with $n$ some random constant and $x$ variable) and $f\left(x\right)$ is "strange" enough we find that most times the first method gives a non-continuous function (not exactly appropriate for a definite integral) which is ususally the correct function but with certain (constant) vertical shifts in some intervals of $x$ (where the various intervals as one can imagine are created by $\frac{\left|f\left(x\right)\right|}{f\left(x\right)}$).
The second method instead seem to produce always a continuous function.

Now, the questions:

  1. The second method is always the "right one", or there are cases where only the first gives a continuous function or both are non-continuous?
  2. If the second method output a continuous function everytime, there's a generic formula or something that can tell me if the first method also output a continuous without doing a case-by-case analysis?