probability density function, solve for c For the probability density function 

$$ f(x)=c \frac{x}{x^2 + 1}  \quad \rm{for} \quad 0\leq x \leq 2 $$

a) Find $c$.
b) find $E(X)$ and $VAR(X)$
To find $c$, you set the integral equal to $1$. So 1 = $c$ $\ln(x^2+1)\over 2$ from $0$ to $2$ and I solved for $c = 1.24$. Is this correct?
Can someone help on part b?

For $\mathbb{E}(X)$ we have that
\begin{align}
\mathbb{E}(X) &= c\int_{0}^2\frac{x^2}{x^2+1}dx \\
&= c\int_{0}^2\frac{x^2+1-1}{x^2+1}dx \\
&= 2c- c\int_{0}^2\frac{1}{x^2+1}dx\\
&= 2c- c(\arctan(2)-\arctan(0)).
\end{align}
The variance is given by
$$
\text{var}(X) = \mathbb{E}(X^2)-\left(\mathbb{E}(X)\right)^2.
$$
Let us calculate $\mathbb{E}(X^2)$. We have that
\begin{align}
\mathbb{E}(X^2) &= c\int_{0}^2\frac{x^3}{x^2+1}dx.
\end{align}
Now,
\begin{align}
\int_{0}^2\frac{x^3}{x^2+1}dx&= \int_{0}^2x\frac{x^2-1+1}{x^2+1}dx\\
&=\int_{0}^2xdx-\int_0^2\frac{x}{x^2+1}dx,
\end{align}
and
\begin{align}
\int_0^2\frac{x}{x^2+1}dx = \frac{1}{2}\int_0^2\frac{1}{x^2+1}d(x^2) = \frac{1}{2}\left.\ln(x^2+1)\right|_0^2 = \frac{1}{2}\ln5.
\end{align}
From here, I believe that you will succeed to continue...
