This problem appears in the book:
Linear Algebra and its applications - David C. Lay - Fourth Edition
It appears in: Chapter 4 (Vector Spaces), Section 4.7 (Change of Basis), Exercise 18
$(4.7), \mathbf{[18]:}$
(Calculus Required) Recall from calculus that integrals such as
$$\tag{10}\int\left(5\cos^3 t-6\cos^4 t+5\cos^5 t-12\cos^6 t\right)\,\mathrm{d}t$$ are tedious to compute. (The usual method is to apply integration by parts repeatedly and use the half-angle formula.) Use the matrix $P$ or $P^{-1}$ from Exercise 17 to transform $(10)$; then compute the integral.
$(4.7), \mathbf{[17]:}$
Let $\mathcal{B}=\left\{\mathbf{x}_0,...,\mathbf{x}_6\right\}$ and $\mathcal{C}=\left\{\mathbf{y}_0,...,\mathbf{y}_6\right\}$, where $\mathbf{x}_k$ is the function $\cos^k t$ and $\mathbf{y}_k$ is the function $\cos kt$. Exercise 34 in Section 4.5 showed that both $\mathcal{B}$ and $\mathcal{C}$ are bases for the vector space $H=\text{Span}\left\{\mathbf{x}_0,...,\mathbf{x}_6\right\}$.
a. Set $P=\begin{bmatrix} {[\mathbf{y}_0]}_\mathcal{B} \quad \dots \quad {[\mathbf{y}_6]}_\mathcal{B}\end{bmatrix}$, and calculate $P^{-1}$.
b. Explain why the columns of $P^{-1}$ are the $\mathcal{C}$-coordinate vectors of $\mathbf{x}_0,...,\mathbf{x}_6$. Then use these coordinate vectors to write trigonometric identities that express powers of $\cos t$ in terms of the functions in $\mathcal{C}$.
$(4.5), \mathbf{[34]:}$
Let $\mathcal{B}=\left\{1, \cos t, \cos^2 t, \dots, \cos^6 t\right\}$ and $\mathcal{C}=\left\{1, \cos t, \cos 2t, \dots, \cos 6t\right\}$. Assume the following trigonometric identities (see Exercise 37 in Section 4.1).
$\cos 2t=-1+2\cos^2 t$
$\cos 3t=-3\cos t+4\cos^3 t$
$\cos 4t=1-8\cos^2 t+8\cos^4 t$
$\cos 5t=5\cos t-20\cos^3 t+16\cos^5 t$
$\cos 6t=-1+18\cos^2 t-48\cos^4 t+32\cos^6 t$
Let $H$ be the subspace of functions spanned by the functions in $\mathcal{B}$. Then $\mathcal{B}$ is a basis for $H$, by Exercise 38 in Section 4.3.
a. Write the $\mathcal{B}$-coordinate vectors of the vectors in $\mathcal{C}$, and use them to show that $\mathcal{C}$ is linearly independent set in $H$.
b. Explain why $\mathcal{C}$ is a basis for $H$.
$(4.1), \mathbf{[37]:}$
The vector space $H=\text{Span}\left\{1,\cos^2 t,\cos^4 t,\cos^6 t\right\}$ contains at least two interesting functions that will be used in a later exercise:
$\mathbf{f}(t)=1-8\cos^2 t+8\cos^4 t$
$\mathbf{g}(t)=-1+18\cos^2 t+48\cos^4 t+32\cos^6 t$
Study the graph of $\mathbf{f}$ for $0\le t\le 2\pi$, and guess a simple formula for $\mathbf{f}(t)$. Verify your conjecture by graphing the difference between $1+\mathbf{f}(t)$ and your formula for $(t)$. (Hopefully, you will see the constant function $1$.) Repeat for $\mathbf{g}$.
$(4.3), \mathbf{[38]:}$
Show that $\left\{1,\cos^2 t,\cos^4 t,\cos^6 t\right\}$ is linearly independent set of functions defined on $\mathbb{R}$. Use the method of Exercise 37. (This result will be needed in Exercise 34 in Section 4.5.)
$(4.3), \mathbf{[37]:}$
Show that $\left\{t,\sin t,\cos 2t,\sin t\cos t\right\}$ is a linearly independent set of functions defined on $\mathbb{R}$. Start by assuming that
$\tag{5} c_1\cdot t + c_2\cdot\sin t + c_3\cdot\cos 2t + c_4\cdot\sin t\cos t = 0$
Equation $(5)$ must hold for all real $t$, so choose several specific values of $t$ (say, $t=0,0.1,0.2$) until you get a system of enough equations to determine that all $c_j$ must be zero.
My Attempt:
My attempt to compute the integral is the classic way:
Using the results:
$$\cos^2 t = \frac{1}{2}(1+\cos 2t)$$
$$\cos a \cos b = \frac{1}{2}(\cos(a+b)+\cos(a-b))$$
$$\int\cos at \,\mathrm{d}t=\frac{1}{a}\sin at+C$$
$$\dots\text{some tedious steps (not hard)}\dots$$
$$5\cos^3(t)-6\cos^4(t)+5\cos^5(t)-12\cos^6(t)=-6 + \frac{55}{8}\cos t - \frac{69}{8}\cos 2t + \frac{45}{16}\cos 3t - 3\cos 4t + \frac{5}{16}\cos 5t - \frac{3}{8}\cos 6t$$
Therefore,
$$\int\left(5\cos^3(t)-6\cos^4(t)+5\cos^5(t)-12\cos^6(t)\right)\,\mathrm{d}t$$
$$=\int\left(-6 + \frac{55}{8}\cos t - \frac{69}{8}\cos 2t + \frac{45}{16}\cos 3t - 3\cos 4t + \frac{5}{16}\cos 5t - \frac{3}{8}\cos 6t\right)\,\mathrm{d}t$$
$$=-6t + \frac{55}{8}\sin t - \frac{69}{16}\sin 2t + \frac{15}{16}\sin 3t - \frac{3}{4}\sin 4t + \frac{1}{16}\sin 5t - \frac{1}{16}\sin 6t + C$$
I am not sure how can we make use of the previous exercises in order to make the integral simpler. Using those exercises, I believe, will increase the difficulty.
Your help on how to integrate this, using the above exercises, would be appreciated. Thanks.