Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I've got the integral $$\int_B|\sin(x)-y|dx dy$$ with $$B=\{0\leq x\leq \pi, 0\leq y\leq 1\}$$ My problem is how handle the abs in the integral. I'd probably go with two integrals (one when the abs is negative, one if it's positive), but I suppose there's a nicer solution. Note: I know how to deal with parametric integrals, the question is how to integrate the absolute value.

share|improve this question
3  
First compute the integral over $0\le y\le1$ for $x$ fixed. –  Did Jun 23 '11 at 15:45
add comment

1 Answer

up vote 0 down vote accepted

$$ \int_0^\pi \int_0^1 |\sin x-y| dy dx= $$ $$ \int_0^\pi\left( \int_0^{\sin x} (\sin x-y)dy +\int_{\sin x}^1 (y-\sin x)dy\right)dx=$$ $$ \int_0^\pi \left( \sin^2 x- \frac{\sin^2 x}{2} + \frac{1}{2}-\sin x-\frac{\sin^2 x}{2}+\sin^2 x \right)dx=$$ $$ \int_0^\pi \left(\frac{1}{2}+\sin^2 x-\sin x\right)dx $$

From here on it's a simple one dimensional integration.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.