Answer
The exact value of the average rate of change of $g$ in the given interval is $\frac{2\sqrt{2}-4}{\pi }$.
Work Step by Step
The slope of the line through the points $\left( {{x}_{1}},g\left( {{x}_{1}} \right) \right)$ and $\left( {{x}_{2}},g\left( {{x}_{2}} \right) \right)$ is defined as the average rate of change.
Let us consider the following equation of slope $m$.
$m=\frac{g\left( {{x}_{2}} \right)-g\left( {{x}_{1}} \right)}{{{x}_{2}}-{{x}_{1}}}$
Put $\pi $ for ${{x}_{2}}$ and $\frac{3\pi }{4}$ for ${{x}_{1}}$.
$m=\frac{g\left( \pi \right)-g\left( \frac{3\pi }{4} \right)}{\pi -\frac{3\pi }{4}}$
And the condition is
$g\left( x \right)=\cos x$
Now, apply the condition in the above equation of $m$.
$m=\frac{\cos \left( \pi \right)-\cos \left( \frac{3\pi }{4} \right)}{\pi -\frac{3\pi }{4}}$ …… (1)
The angle $\frac{3\pi }{4}$ lies between $\frac{\pi }{2}$ and $\pi $, in quadrant II.
Calculate the reference angle as follows
$\begin{align}
& {\theta }'=\frac{\pi }{2}-\frac{3\pi }{4} \\
& =\frac{4\pi -3\pi }{4} \\
& =\frac{\pi }{4}
\end{align}$
Therefore,
$\cos \frac{\pi }{4}=\frac{\sqrt{2}}{2}$
Here, the cosine is negative in quadrant II.
So,
$\cos \frac{3\pi }{4}=-\cos \frac{\pi }{4}$
Put $\frac{\sqrt{2}}{2}$ for $\cos \frac{\pi }{4}$.
$\cos \frac{5\pi }{4}=-\frac{\sqrt{2}}{2}$
Put $-1$ for $\cos \pi $ and $-\frac{\sqrt{2}}{2}$ for $\cos \frac{3\pi }{4}$ in equation (1).
$\begin{align}
& m=\frac{\cos \left( \pi \right)-\cos \left( \frac{3\pi }{4} \right)}{\pi -\frac{3\pi }{4}} \\
& =\frac{\left( -1 \right)-\left( -\frac{\sqrt{2}}{2} \right)}{\frac{4\pi -3\pi }{4}} \\
& =\frac{-1+\frac{\sqrt{2}}{2}}{\frac{\pi }{4}}
\end{align}$
Further solve,
$\begin{align}
& m=\left( -1+\frac{\sqrt{2}}{2} \right)\frac{4}{\pi } \\
& =\frac{-4+\frac{\sqrt{2}}{2}\left( 4 \right)}{\pi } \\
& =\frac{2\sqrt{2}-4}{\pi }
\end{align}$