# Problems while reading a mathematics books

Homework Helper
Hi,
I've come across some problems while reading a mathematics books.
1. The first problem is:
$$\int \max (1, x ^ 2) dx$$
$$x + C, |x| \leq 1$$
$$\frac{x ^ 3}{3} + C, |x| > 1$$
But the book does not seem to agree with me. It reads:
$$x + C, |x| \leq 1$$
$$\frac{x ^ 3}{3} +\frac{2}{3} \mbox{sgn} x + C, |x| > 1$$ Why does the $$\frac{2}{3} \mbox{sgn} x$$ appears there?? What am I missing here? 2. The second problem is:
$$\int (|1 + x| - |1 - x|) dx$$
I've never seen an absolute value in an integral before... What should I do?
Any help will be appreciated.
Viet Dao,

I haven't a clue about where that signum comes from in the first integral, but as for the second, abs(f(x)) = f(x)*sgn(x), and d(sgn(x))/dx = 0 except at x=0. Or you can do it by finding the integral of abs(x)dx and using substitution for abs(u)du for more complicated u(x). If you don't like writing sgn(x) in your answer, note that sgn(x) = x/|x| for x<>0 and 0 for x=0.

Last edited:
HallsofIvy
Homework Helper
You appear to be assuming that x> 0 in your calculations. Certainly for x< 0, there will come a sharp change at x= -1 as well as your change at x= 1. I haven't worked out the calculation but certainly sgn(x) would be there to distinguish between x< 0 and x> 0. Your integrand is an even function so the integral will be an odd function.

Hurkyl
Staff Emeritus
Gold Member
1. Basically, the problem is this: you divided the problem into three subproblems, but you forgot that you need to put the three answers together to get your final answer! (and putting them together, while easy, is not trivial)

Your analysis on each of the three individual subproblems is correct, though. (Yes, I mean three, not two... think about it)

2. Do the same thing you did in 1: break the problem up into pieces.

If that isn't enough, recall that |x| = max(x, -x)

For problem 2, I think you can interpret it as the integral of 2*min(1,x)dx.

Homework Helper
Uhmm, I didn't really get what you mean...
So I have:
$$f(x) = \left\{ \begin{array}{ll} x ^ 2 & \mbox{if } x < -1 \\ 1 & \mbox{if }-1 \leq x \leq 1 \\ x ^ 2 & \mbox{if } x > 1 \end{array} \right$$
And I integrate each of them, then... how can I put them together?? Can you give me a small example, please?
Thanks,
Viet Dao,

Last edited:
HallsofIvy
Homework Helper
You will have a constant of integration in each part- but your answer, the integral of the entire function, should have only one such constant. Requiring that the integral be continuous at -1 and 1 gives you two equations relating the three constants.

Homework Helper
Uhmm, do you mean:
Let C1, C2, C3 be the constant of the first, second, and third integral.
So the two equation will be:
$$\left\{ \begin{array}{l} \mathop{\lim} \limits_{x \rightarrow -1} \frac{x ^ 3}{3} + C_1 = \mathop{\lim} \limits_{x \rightarrow -1} x + C_2 \\ \mathop{\lim} \limits_{x \rightarrow 1} x + C_2 = \mathop{\lim}\limits_{x \rightarrow 1} \frac{x ^ 3}{3} + C_3 \end{array} \right$$
Is that correct?
Viet Dao,

Last edited:
TD
Homework Helper
Use:
Code:
\mathop {\lim }\limits_{x \to 1}

=> $$\mathop {\lim }\limits_{x \to 1}$$

$$\int (|1 + x| - |1 - x|) dx$$
$$x>1: \int (|1 + x| - |1 - x|) dx = \int (1+x)-(x-1) dx = \int 2 dx = 2x + A$$
$$-1<x<1: \int (|1+x| - |1-x|) dx = \int (1+x)-(1-x) dx = \int 2x dx = x^{2} + B$$
$$x<-1: \int(|1+x| - |1-x|) dx = \int (-1-x)-(1-x) dx = \int -2 dx = -2x+C$$

HallsofIvy
Homework Helper
VietDao29 said:
Uhmm, do you mean:
Let C1, C2, C3 be the constant of the first, second, and third integral.
So the two equation will be:
$$\left\{ \begin{array}{l} \lim_{x \rightarrow -1} \frac{x ^ 3}{3} + C_1 = \lim_{x \rightarrow -1} x + C_2 \\ \lim_{x \rightarrow 1} x + C_2 = \lim_{x \rightarrow 1} \frac{x ^ 3}{3} + C_3 \end{array} \right$$
Is that correct?
-----------

Yes, that's correct. And since those are continuous functions you have:
$-\frac{1}{3}+ C_1= -1+ C_2$ or $C_2= C_1+ \frac{2}{3}$ as well as $1+ C_2= \frac{1}{3}+ C_3$ so $C_3= C_2+ \frac{2}{3}= C_1+ \frac{4}{3}$.

HallsofIvy
Homework Helper
Gaz031 said:
$$\int (|1 + x| - |1 - x|) dx$$
$$x>1: \int (|1 + x| - |1 - x|) dx = \int (1+x)-(x-1) dx = \int 2 dx = 2x + A$$
$$-1<x<1: \int (|1+x| - |1-x|) dx = \int (1+x)-(1-x) dx = \int 2x dx = x^{2} + B$$
$$x<-1: \int(|1+x| - |1-x|) dx = \int (-1-x)-(1-x) dx = \int -2 dx = -2x+C$$

I don't understand. Are these related to the topic of this thread?

If these are intended as an additional example, again, you have to use the continuity of the integral to determine the constants.

At x= 1, 2x+ A= 2+ A= 1+ B= x2+ B so B= A+ 1.
At x= -1, x^2+ B= 1+ B= 2+ C= -2x+ C so C= B- 1= A

The integral is 2x+ A if x>1, $x^2+ 1+ A$ if $-1\le x\le 1$, and -2x+ A if x< -1.

Homework Helper
Thanks a lot, I get it now. Viet Dao,