0
$\begingroup$

There is a trigonometric function: Cos[m x]^2 Cos[n y]^2 Sin[m x] Sin[n y]

I want to transform it to the next form:

1/16 Sin[m x] Sin[n y] + 1/16 Sin[3 m x] Sin[n y] + 1/16 Sin[m x] Sin[3 n y] + 1/16 Sin[3 m x] Sin[3 n y]

Here is what I do:

In:= Cos[m x]^2 Sin[m x] // TrigReduce      Out= 1/4 (Sin[m x] + Sin[3 m x])

In:= Cos[n y]^2 Sin[n y] // TrigReduce      Out= 1/4 (Sin[n y] + Sin[3 n y])

In:= 1/4 (Sin[m x] + Sin[3 m x]) 1/4 (Sin[n y] + Sin[3 n y]) // Expand
Out= 1/16 Sin[m x] Sin[n y] + 1/16 Sin[3 m x] Sin[n y] + 1/16 Sin[m x] Sin[3 n y] + 1/16 Sin[3 m x] Sin[3 n y]

I have amount of similar trigonometric functions to do the same transformation. So I want to ask If there any operations I can get the finial result in one step.

$\endgroup$

1 Answer 1

2
$\begingroup$
X = Cos[m x]^2 Cos[n y]^2 Sin[m x] Sin[n y];

TrigReduce[X] /. {Cos[a_ + b_] -> Cos[a] Cos[b] - Sin[a] Sin[b], 
                  Sin[a_ + b_] -> Cos[b] Sin[a] + Cos[a] Sin[b]} // Expand

1/16 Sin[m x] Sin[n y] + 1/16 Sin[3 m x] Sin[n y] + 1/16 Sin[m x] Sin[3 n y] + 1/16 Sin[3 m x] Sin[3 n y]

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.