- #1

Shannabel

- 74

- 0

## Homework Statement

if f(x)=abs(x-2) and g(x)=abs(x), then solve the integral from -1 to 3 of abs(f(x)-g(x))dx

## Homework Equations

## The Attempt at a Solution

resolved absolute values:

when x<0, abs(x-2)-abs(x) = -x-2+x = 2

when 0<x<1, abs(x-2)-abs(x) = (-x+2)-x = 2-2x

when 1<x<2, abs(x-2)-abs(x) = (-x+2)-x = 2-2x

when x>2, abs(x-2)-abs(x) = x-2-x = 2

so now i have

2dx(between 0 and -1)+(2-2x)dx(between 0 and 1)+(2-2x)dx(between 1 and 2)+2dx(between 2 and 3)

= 2x(from 0 to -1) + 2x-x^2(between 0 and 1)+ 2x-x^2(between 1 and 2) + 2x(from 2 to 3)

= -2 + (2-1) + (2-1) +2 = 2

I should have had 6 as my answer, so i'm guessing that the first integral should be 2 instead of -2, but i'm not sure why.. any ideas?

also, if f(x)-g(x) is the same between 0 and 1 and 1 and 2, why is it that when i solve just between 0 and 2 i get a different answer than when i solve the two separately?