I need the expression of a function which goes to infinity as x goes to 0 and has a finite integral
Is there a function similar to the one in the image that has a discontinuity in the origin, for which:
$$\lim_{x \to \pm\infty} f(x)=0$$
and $$\lim_{x \to 0^{\pm}} f(x)=+\infty$$ and
$$\int_{-\infty}^{+\infty} f(x) \,dx=C$$ where C is a finite number?
I would need the expression of such a function.
Let
$$g(x) = \begin{cases} \frac{1}{\sqrt{x}} & x\leq 1 \\ \frac{1}{x^2} & x\geq 1 \end{cases}$$
Then define
$$f(x)= \begin{cases} 0 & x=0 \\ g(x) & x>0 \\ g(-x) & x<0 \end{cases}$$
Then all your conditions are satisfied and
$$\int_{-\infty}^\infty f(x)dx=6$$