Well, to find the average rate of change you generally need to recognize one main thing that characterizes rates: slope.
Remember how the derivative of a function is the instantaneous slope? It is also the instantaneous rate of change! This makes sense, too, because if you think about it, rate of change is equivalent to saying how much does this thing change when this other thing changes? For example, your speed is the rate of change of your distance from something.
Now, for average rate of change. When we look at an average rate, we're looking at an average slope. This is actually the exact same thing as just finding the two points at the ends of the intervals and calculating the slope between them! Let's see what's going on at those points on the graph:
The red points are the function values at `-pi/4` and `pi/4`. To be honest, the graph just helps us visualize what's going on, but it doesn't give us much in terms of the actual slope! Sure, the first point looks like it's at zero...but do we really know? Let's find out.
Let's evaluate the function at the above values of x.
`f(-pi/4) = cos(-pi/4) + sin(-pi/4) = cos(pi/4) - sin(pi/4)`
Alright, we did a little simplifying, but we can't proceed without knowing our basic trigonometric values. At `x=pi/4` there is a nice value for both sine and cosine: `sqrt(2)/2`
Let's put that value in:
`f(-pi/4) = sqrt(2)/2 - sqrt(2)/2 = 0`
Alright, I guess the first point is, in fact, `(-pi/4, 0)`. Now, we can calculate the next point:
`f(pi/4) = cos(pi/4) + sin(pi/4)`
Again, we'll have to use our knowledge that `cos(pi/4)=sin(pi/4)=sqrt2/2`
`f(pi/4) = sqrt(2)/2 + sqrt(2)/2 = sqrt(2)`
Alright! We have our second point: `(pi/r, sqrt2)`
Now, to find the average rate of change, we simply find the slope:
`m = (Deltay)/(Deltax) = (y_2-y_1)/(x_2-x_1)`
Remember, our first point is `(-pi/4, 0)` and our second point is `(pi/4, sqrt2)`
So we can substitute those values into the slope formula:
`m = (sqrt2 - 0)/(pi/4 - (-pi/4))`
`m = sqrt(2)/(pi/2) = (2sqrt(2))/pi`
And there you have it! Our average rate of change is `(2sqrt(2))/pi`.
Hope that helps!