# Problem manually evaluating definite integral

I seem to be quite stuck when trying to normalize a probability density given as $$p(x|\omega_i)\propto e^{-\frac{|x-a_i|}{b_i}}$$ with $$a_i\in R$$ and $$b_i\in R^+$$. Although I was able to "manually" find an anti-derivative with $$\int e^{-\frac{|x-a_i|}{b_i}}dx=-b_i\frac{x-a_i}{|x-a_i|}e^{-\frac{|x-a_i|}{b_i}}+C$$ the definite integral with $$a_i$$ as its lower and $$\infty$$ as its upper limit evaluates to zero. When letting the solver at https://www.integral-calculator.com/ look for an anti-derivative, it came up with the above solution together with an alternative, that seems appropriate for the normalization task: $$\int e^{-\frac{|x-a_i|}{b_i}}dx=\frac{x-a_i}{|x-a_i|}(b-e^{-\frac{|x-a_i|}{b_i}}) +C$$ Using the latter anti-derivative and the symmetry of the original function at $$x=a$$, I was able to calculate what seems to be the correct area below the graph with $$2b$$. But I really don't understand, how I could have come up with this solution without playing with the solver and finding the alternate anti-derivative. Could someone please explain to me how this solution could have been found "manually"?

Thank you and best regards,

Martin

New contributor
mkrimpel is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

As you don't specify the domain, I will assume $$(-\infty,\infty)$$.

Then by translation, the parameter $$a$$ is immaterial, and by scaling the variable,

$$\int_{-\infty}^\infty e^{-|x-a|/b}dx=b\int_{-\infty}^\infty e^{-|t|}dt=2b\int_0^\infty e^{-t}dt.$$

If the domain is some other interval, the linear substitution still makes it quite manageable.

... assuming that your $$\epsilon$$ actually is $$e$$,

The easiest way is to recognize that your $$p(x|\omega_i)$$ is the kernel of a Laplace Density

Thus simply, with $$x \in \mathbb{R}$$

$$p(x|\omega_i)=\frac{1}{2b_i}e^{-|x-a_i|/b_i}$$

• Mh, I am not sure that the easiest methodology to solve a problem is to know the answer in advance. – Yves Daoust May 4 at 8:02
• @YvesDaoust : yes but the aim of my answer was to "recognize" the kernel of a known distribution which is an useful task in bayesian Statistics. Of course, calculating the antiderivative is easy too. As an example, if you have to normalize the following $$f(x)\propto e^{-x^2/6}$$ you have to recognize the kernel of a gaussian distribution with mean zero and variance 3 and thus the normalizing constant immediately follows – tommik May 4 at 8:04
• I understand what you mean, but in a way your post says "it suffices to know everything". Also note that the question is about "manually evaluating definite integral". – Yves Daoust May 4 at 8:11