# Find constant $c$ for piecewise continuous random variable pdf

apologizes for my poor english

I wish to find the pdf for a piece-wise function which is defined as such

$$f(x) = \begin{cases} c(1-x^2), & -1<x<0, \\ c/x^2, & 1<x<2, \\ 0, & \text{otherwise}. \end{cases}$$

the goal is the finding of constant $c$ such that $f(x)$ satisfied the conditions of being a pdf

i attempt through integral

$$\int^0_{-1} c(1-x^2) \, dx + \int^2_1 \frac{c}{x^2} \, dx = 1$$

and get $-6$, which cannot possible be the answer

my conclusion is i am making a grave mistake in my attempt

• Just a minus sign slip, the procedure is correct. The integral over the negative part is $\frac{2}{3}c$. You probably got $-\frac{2}{3}c$. – André Nicolas Dec 6 '14 at 3:19