# Homework Help: Extreme values of function.

1. Mar 14, 2009

### Ofey

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

What are the extreme values for the function

$$f:f(x)=\int_0^x(|t|-|t-1|) \ d t$$

in the interval $$[-1,3]$$

2. Relevant equations

-

3. The attempt at a solution

I tried to simplify the function by getting rid of the absolute values.

This gave me three different possibilities depending on the value for t.

$$f:f(x)=\begin{cases} \int_0^x-1 \ d t, & \mbox{if } t \leq 0 \\ \int_0^x(2t-1) \ d t, & \mbox{if } 0<t<1 \\ \int_0^x1 \ d t ,& \mbox{if } t\geq1 \end{cases}$$

Which I got to be

$$f:f(x)=\begin{cases} -x, & \mbox{if } t \leq 0 \\ x^2-x, & \mbox{if } 0<t<1 \\ x ,& \mbox{if } t\geq1 \end{cases}$$

This is where it gets tricky for me. How do I treat the fact that the boundaries for the "different" functions are determined by t, when the variable is x. How to pursue the solution from this point?

2. Mar 14, 2009

### slider142

Using the Fundamental Theorem of Calculus, you could have noted that the integral is equivalent to F(x) - F(0) where F'(t) = |t| - |t - 1|. Thus, to find the extremal values, we just need to look at the behavior of the integrand: where it is undefined and where it is 0 and the values of the function at the endpoints.

3. Mar 15, 2009

### Ofey

I managed to solve the problem using my method. However, it would be interesting if you could elaborate a bit more how you would have solved it. I understand that it is possible to use the integrand to find out the x-values which correspond to maximum/minimum values, but you still need the (proper) integral in which you "put" the x-values (which correspond to max/min values) to get the corresponding y-values for the minimum/maximum. So you eventually have to integrate no matter what?