Decide whether the function $f:[-1,1] \rightarrow \mathbb{R}$, $$ f(x)=x^{2} \chi_{[-1,1] \backslash \mathbb{Q}}(x) $$ $\mathcal{L}^{1}$-is integrable and, if necessary, calculate the value of the integral of $ f $ over [-1,1] with respect to $\mathcal{L}^{1}$. Justify each step exactly!
Edit regarding the answer from Mr Gandalf:
Firstly, the boundedness of the function $f(x)=x^{2} \chi_{[-1,1] \backslash \mathbb{Q}}(x)$:
The function $|f(x)|=\left|x^{2} \chi_{[-1,1] \backslash \mathbb{Q}}(x)\right|=\left|x^{2}\right| \chi_{[-1,1] \backslash \mathbb{Q}}(x)=x^{2} \chi_{[-1,1] \backslash \mathbb{Q}}(x)$ is limited for $x \in$ [-1,1] by $x^{2} \mathbf{1}_{[-1,1]}$, since $x^{2} \mathbf{1}_{[-1,1]}$ in the interval $x \in[-1,1]$ is always greater than or equal to $x^{2} \chi_{[-1,1] \backslash \mathbb{Q}}(x)$.
Now to calculate the measure of [-1,1]: The Lebesgue measure of $[-1,1]$ is equal to the length of this interval. The interval [-1,1] has a length of 2, which is known from elementary geometry.
Therefore, we have shown that $|f(x)| \leq x^{2} \mathbf{1}_{[-1,1]}$ and $ \lambda([-1,1])=2$, where $\lambda$ is the Lebesgue measure. Since $\mathrm{Da}|f(x)|$ is bounded and $\lambda([-1,1])$ is finite, we can apply the majorant rule for Lebesgue integrals, which indicates that $f(x)$ is Lebesgue-integrable.
Accordingly, the integral of f(x) over [-1,1] with respect to $ \mathcal{L}^{1} $ is equal to the integral of $x^{2}$ over $[-1,1] $, which is $2 / 3$.
Therefore, the function $f(x)=x^{2} \chi_{[-1,1] \backslash \mathbb{Q}}(x)$ is Lebesgue-integrable over $[-1,1]$, and the integral of $f(x)$ over [-1,1] with respect to $\mathcal{L}^{1}$ is $\frac{2}{3}$.
Is this correct?
Ask yourself the following questions:
What is the measure of rationals in $[-1,1]$? Is it a countable set?
What about the integral of the function $g(x)=x^{2}$ in $[-1,1]$ i.e. $g(x)=x^{2}\mathbf{1}_{[-1,1]}$ (You should know this from basic high school calculus)
How are $f$ and $g$ different? Is $g(x)=f(x)+x^{2}\mathbf{1}_{\Bbb{Q}\cap[-1,1]}$?
If yes, then by linearity, isn't $\displaystyle\int_{\Bbb{R}}g(x)\,dx=\int_{\Bbb{R}} f(x)\,dx+\int_{\Bbb{R}} x^{2}\mathbf{1}_{\Bbb{Q}\cap[-1,1]}$?
If yes, then what is $\int_{\Bbb{R}}x^{2}\mathbf{1}_{\Bbb{Q}\cap[-1,1]}\,dx=\int_{\Bbb{Q}\cap[-1,1]}x^{2}\,dx$?
Is this an integral over a measure $0$ set?
If yes, what is your conclusion?
By the way, you did not show integrability. Here is one of the ennumerous ways in which you can do this: $|f(x)|\leq x^{2}\mathbf{1}_{[-1,1]}\leq\mathbf{1}_{[-1,1]}$ and $\int_{\Bbb{R}} \mathbf{1}_{[-1,1]}=\lambda([-1,1])=2$