# What are the rules to know when to use absolute value?

1. Sep 19, 2015

### Fancypen

Specifically when doing integration problems. I know the indef integral of cosx/sinx+1 is ln(sinx+1) + C, but absvalue is not required here. I think it's because the sine fn must be >= 0 or it's undefined? What about in other cases, is there a general rule to know when to use absvalue?

Thanks

2. Sep 19, 2015

### Staff: Mentor

The integrand should be written as cosx/(sinx + 1). Without parentheses what you wrote is $\frac{cosx}{sinx} + 1 = cotx + 1$.

Also, $\int \frac{\cos(x) dx}{\sin(x) + 1} = \ln|\sin(x) + 1| + C$
You really should have it, unless there is information given that it's not needed.
No, that's not true. $-1 \le \sin(x) \le 1$. Take a look at a graph of y = sin(x).

3. Sep 19, 2015

### Fancypen

I see. So the answer SHOULD have it. We actually don't use a book, so the answers I find to the worksheet problems aren't consistent. Some use absvalue and some do not.

There definitely should be a parenthesis around the denominator there. I am aware, but neglected it!

Thanks

4. Sep 20, 2015

### HallsofIvy

$\int \frac{1}{x}dx= ln|x|+ C$. If you know that x will not be negative then you do not need the absolute values.

For example, $\int_1^2 \frac{1}{x}dx= \left[ln(x)\right]_1^2= ln(2)$. Since x runs between 1 and 2, it is never negative and the absolute value is not needed.

Last edited by a moderator: Sep 20, 2015
5. Sep 20, 2015

### Staff: Mentor

In fact, there should be two of them -- parentheses -- not just a single parenthesis.

Last edited: Sep 20, 2015
6. Sep 20, 2015

### Fancypen

Yeah, one set around the the angle of sine too.

Last edited by a moderator: Sep 20, 2015