# Solving absolute function

1. Sep 3, 2008

### takercena

1. The problem statement, all variables and given/known data

a. Find the value of x such as fx < gx where fx = |2x -1| and gx = x(2-x)
b. evaluate $$\displaystyle\int^1_0 [gx - fx]\,dx$$

2. Relevant equations
none

3. The attempt at a solution
For question a I make it into 2 equation to 2x-1 = 2x-x^2 and 1 - 2x = 2x - x^2. I solve it and find the value of x = 1, 0.2679 and 3.73. The problem is, which interval should i choose if there is no graph to be sketched? And how do i get 0.2679 = 2 - sqrt of 3?

I have no idea for question b.

Thanks :)

2. Sep 3, 2008

### Dick

You should always sketch a graph, whether they ask you to or not. It will make your life much easier. |2x-1|=2x-1 for x>=1/2 and |2x-1|=1-2x for x<=1/2. Work separately on those two intervals. There are only two points of intersection. And to get 0.2679...=2-sqrt(3) exactly, use the quadratic formula to solve the equation. Don't just put it into a calculator and get the numerical results.

3. Sep 3, 2008

I haven't checked your numbers yet, but you shouldn't find three solutions, only 2. Once you have found the values of $$x$$ where $$f(x) = g(x)$$, those are the only places the two functions can be equal. Call the two locations of equality $$a, b$$, and for purposes of my notes assume that $$a < b [tex]. Pick three numbers [tex] x_1 < a$$, $$a < x_2 < b$$, and $$b < x_3$$. Compare the function values at each $$x$$. If $$f < g$$ at your choice, it will be for all other values in that interval. (The same if $$g > f$$).
$$\int_0^1 |g(x) - f(x)| \, dx$$
To do this you'll need to split this integral into pieces, depending on where $$g(x) > f(x)$$ and $$g(x) < f(x)$$. But that's exactly why you solved problem 1.