# Absolute Value Integrals

1. Jul 19, 2007

### danago

Hi. For an integral like this, for example:

$$\int {\sqrt {1 - \cos ^2 x} dx}$$

The most obvious way of solving would be to make use of the pythagorean identity, to get:

$$\int {\sqrt {\sin ^2 x} dx}$$

Now, ive been taught to simply evaluate it like this:

$$\int {\sqrt {\sin ^2 x} dx} = \int {\sin xdx = - \cos x + C}$$

I was wondering though, is that technically correct? Squaring something, then taking the square root of it is equivalent of taking the absolute value of it, so would this be more correct:

$$\int {\sqrt {\sin ^2 x} dx} = \int {\left| {\sin x} \right|dx}$$

If so, would i just give two different solutions, each defined over a different domain, like a piecewise function?

$$\int {\left| {\sin x} \right|dx = \left\{ {\begin{array}{*{20}c} { - \cos x + C} & {\sin x \ge 0} \\ {\cos x + C} & {\sin x < 0} \\ \end{array}} \right.}$$

Is that a more correct way of doing it?

2. Jul 20, 2007

### Gib Z

Yes, that is absolutely correct. Who taught you to evaluate it in the other way?

By the incorrect logic, $$\frac{d}{dx} \cos x = -\sqrt{1-\cos^2 x}$$. As we know, the derivative of cos x is not always negative.

3. Jul 20, 2007

### danago

Alright thanks alot for confirming that

4. Jul 20, 2007

### VietDao29

Yes, what you do is correct. However, in some trig-sunstitution, because of the restriction we make on theta, we can automatically break the absolute value, without worrying about the sign.

Say, you are asked to evaluate:
$$\int \frac{dx}{\sqrt{1 - x ^ 2}}$$
Now, we'll make the substitution: x = sin(theta), and we restrict theta to be on the interval $$\left[ - \frac{\pi}{2} ; \ \frac{\pi}{2} \right]$$, i.e, the image of the arcsine function.

So, we'll have: $$x = \sin \theta \Rightarrow \theta = \arcsin x$$
dx = cos(theta) d(theta)

The integral becomes:

$$\int \frac{dx}{\sqrt{1 - x ^ 2}} = \int \frac{\cos \theta d( \theta )}{\sqrt{1 - \sin ^ 2 \theta}} = \int \frac{\cos \theta d( \theta )}{\sqrt{\cos ^ 2 \theta}} = \int \frac{\cos \theta d( \theta )}{| \cos \theta |}$$

Since, we have restricted theta to be only on the interval [-pi/2; pi/2], i.e, on the I, and IV quadrant, so cos theta is non-negative, and we can break the absolute value like normal:

$$... = \int \frac{\cos \theta d( \theta )}{\cos \theta} = \int d ( \theta ) = \theta + C = \arcsin x + C$$.

We can also make the trig substitution: x = cos theta, but this time, we must restrict theta to be on [0; 2pi], so that it'll be more convenient for you to find x in terms of theta, and to break the absolute value.

Last edited: Jul 20, 2007