<s>[INST] Simplify $2\sin\frac{\pi}{4}2\cos\frac{\pi}{4}$ I have a question about $2\sin\frac{\pi}{4}2\cos\frac{\pi}{4}$. I ask because when I try to plug the equation in or substitute the double angle equation in for this problem I can never get the answer to come out.  The commutative property says $(a\cdot b)\cdot c = a\cdot(b\cdot c)$.  Here is where I think I am going wrong
$$2\cdot2\cdot\sin\frac{\pi}{4}\cos\frac{\pi}{4} = 2\cdot2\cdot\frac{\sqrt2}{2}\cdot\frac{\sqrt2}{2}
=2^2\cdot\cos^2\frac{\pi}{4}$$
Can I square the angle of the cos function because the sin and cos both have the same output at $\frac{\pi}{4}$?  If I can square the cos function then I can plug it
into the Pythagorean identity, $\sin^2 + \cos^2 = 1$
$$4\sin^2\frac{\pi}{4}+ 4\cos^2\frac{\pi}{4} =1\cdot4$$
I would like to do this because then I could rearrange the terms in the identity to match the double angle cos identity.  $$4\cos^2\frac{\pi}{4}=4-4\sin^2\frac{\pi}{4}$$ I think this is where I realize I do not know what is going on again.  Here is my attempt to substitute into the cos double angle identity.
$$4\cos\left(2\cdot\frac{\pi}{4}\right) = 4-4\cdot2\sin^2\left(\frac{\pi}{4}\right)$$
When I solve this equation I get $0=0$ and it should be $2=2$.  I seemed to have flip flopped the sin and cos functions wrong?
 [/INST] We wish to simplify the expression
$$2\sin\left(\frac{\pi}{4}\right) \cdot 2\cos\left(\frac{\pi}{4}\right)$$
Let's continue your initial calculation.
\begin{align*}
2\sin\left(\frac{\pi}{4}\right) \cdot 2\cos\left(\frac{\pi}{4}\right) & = 2 \cdot 2\sin\left(\frac{\pi}{4}\right)\cos\left(\frac{\pi}{4}\right)\\
& = 2 \cdot 2 \cdot \frac{\sqrt{2}}{2} \cdot \frac{\sqrt{2}}{2}\\
& = \sqrt{2} \cdot \sqrt{2}\\
& = \sqrt{4}\\
& = 2
\end{align*}
since the factors of $2$ in the numerator and denominator cancel out.
Another way to do the problem is to use the identity $\sin(2x) = 2\sin x\cos x$ with $x = \dfrac{\pi}{4}$.
\begin{align*}
2\sin\left(\frac{\pi}{4}\right) \cdot 2\cos\left(\frac{\pi}{4}\right) & = 2 \cdot 2\sin\left(\frac{\pi}{4}\right)\cos\left(\frac{\pi}{4}\right)\\
& = 2\sin\left(2 \cdot \frac{\pi}{4}\right)\\
& = 2\sin\left(\frac{\pi}{2}\right)\\
& = 2 \cdot 1\\
& = 2
\end{align*}
You asked whether you could substitute $\cos\left(\dfrac{\pi}{4}\right)$ for $\sin\left(\dfrac{\pi}{4}\right)$ since $\cos\left(\dfrac{\pi}{4}\right) = \sin\left(\dfrac{\pi}{4}\right)$.  Yes, you may make that substitution since you can substitute one quantity for another if the two quantities are equal.  Doing so yields
\begin{align*}
2\sin\left(\frac{\pi}{4}\right) \cdot 2\cos\left(\frac{\pi}{4}\right) & = 2 \cdot 2\sin\left(\frac{\pi}{4}\right)\cos\left(\frac{\pi}{4}\right)\\
& = 4\cos^2\left(\frac{\pi}{4}\right)\\
& = 4\left(\frac{\sqrt{2}}{2}\right)^2\\
& = 4\left(\frac{2}{4}\right)\\
& = 2
\end{align*}
as before.
You used the Pythagorean identity $\sin^2x + \cos^2x = 1$ to obtain
$$4\cos^2\left(\frac{\pi}{4}\right) = 4\left[1 - \sin^2\left(\frac{\pi}{4}\right)\right] = 4 - 4\sin^2\left(\frac{\pi}{4}\right)$$
Since
$$\sin\left(\frac{\pi}{4}\right) = \frac{\sqrt{2}}{2}$$
we obtain
\begin{align*}
2\sin\left(\frac{\pi}{4}\right) \cdot 2\cos\left(\frac{\pi}{4}\right) & = 2 \cdot 2\sin\left(\frac{\pi}{4}\right)\cos\left(\frac{\pi}{4}\right)\\
& = 4\cos^2\left(\frac{\pi}{4}\right)\\
& = 4 - 4\sin^2\left(\frac{\pi}{4}\right)\\
& = 4 - 4\left(\frac{\sqrt{2}}{2}\right)^2\\
& = 4 - 4\left(\frac{2}{4}\right)\\
& = 4 - 2\\
& = 2
\end{align*}
That said, introducing extra steps adds more opportunities to make an error.
Trying to use the double-angle identity $\cos(2x) = 1 - 2\sin^2x$ here is tricky.
\begin{align*}
2\sin\left(\frac{\pi}{4}\right) \cdot 2\cos\left(\frac{\pi}{4}\right) & = 2 \cdot 2\sin\left(\frac{\pi}{4}\right)\cos\left(\frac{\pi}{4}\right)\\
& = 4\cos^2\left(\frac{\pi}{4}\right)\\
& = 4 - 4\sin^2\left(\frac{\pi}{4}\right)\\
& = 2 + 2 - 4\sin^2\left(\frac{\pi}{4}\right)\\
& = 2 + 2\left[1 - 2\sin^2\left(\frac{\pi}{4}\right)\right]\\
& = 2 + 2\cos\left(2 \cdot \frac{\pi}{4}\right)\\
& = 2 + 2\cos\left(\frac{\pi}{2}\right)\\
& = 2 + 2 \cdot 0\\
& = 2 + 0\\
& = 2
\end{align*}
Again, try to avoid introducing extra steps.
The first two methods are simplest.
</s>