The function FullSimplify
can easily reformat this expression
FullSimplify[Cos[omegan t]^2 + Sin[omegan t]^2]
(* output: 1 *)
However, it cannot simplify the same expression if contained in a larger expression:
sol = DSolve[m*(x''[t] + omegan^2 * x[t]) == B*Exp[I*omegad*t], x, t]
{{x->Function[{t},C[1] Cos[omegan t]+C[2] Sin[omegan t]-(B E^(I omegad t) (Cos[omegan t]^2+Sin[omegan t]^2))/(m (omegad-omegan) (omegad+omegan))]}}
Result:
$-\frac{B e^{i \omega_d t} \left(\sin ^2(\omega_n t)+\cos ^2(\omega_n t)\right)}{m (\omega_d-\omega_n) (\omega_d+\omega_n)}+c_2 \sin (\omega_n t)+c_1 \cos (\omega_n t)$
Instead of:
$-\frac{B e^{i \omega_d t}}{m (\omega_d^2-\omega_n^2)}+c_2 \sin (\omega_n t)+c_1 \cos (\omega_n t)$
What is the command I'm missing?