how to calculate $\int (|1+x|-|1-x|) dx $ and $\int$ max {${1-x^2,0} $}?

285 Views Asked by At

I'm used to integrate normal functions, but here I got quiet confused because these integrals :

  • $\int (|1+x|-|1-x|) dx $

  • $\int$ max {${1-x^2,0} $}

    Include absolute value, and and option to choose between two values, in what direction I must think here? do I have to separate the first integral into cases? and see whats the integral inside the absolute value is negative or positive? and in second one I just do integral on both sides normally? any kind of help would be appreciated.

2

There are 2 best solutions below

0
On BEST ANSWER

For the first function:

if $x\leq -1$ then $|1+x|-|1-x|=-2$

if $x\geq 1$ then $|1+x|-|1-x|=2$

if $-1 \leq x \leq 1$ then $|1+x|-|1-x|=2x$

For the second function:

if $-1\leq x \leq 1$ then $\max \{1-x^2,0\}=1-x^2$

if $x\leq -1$ or $ x \geq 1$ then $\max \{1-x^2,0\}=0$.

Using these relationships you may simply proceed with integration.

0
On

$\int(|1+x|-|1-x|)~dx$

$=\int((1+x)\text{sgn}(1+x)-(1-x)\text{sgn}(1-x))~dx$

$=\dfrac{(1+x)^2\text{sgn}(1+x)+(1-x)^2\text{sgn}(1-x)}{2}+C$

$=\dfrac{(1+x)|1+x|+(1-x)|1-x|}{2}+C$

$\int\max\{1-x^2,0\}~dx$

$=\begin{cases}-\dfrac{2}{3}&\text{when}~x\leq-1\\x-\dfrac{x^3}{3}&\text{when}~-1\leq x\leq1\\\dfrac{2}{3}&\text{when}~x\geq1\end{cases}+C$