# How to expand trigonometric equation into non quadratic terms in MAPLE

I'm working with partial differential equations at the moment and at a point I get a trigonometric equation like this:

$$\sin^{2}(\pi x)\cos(2 \pi x)$$

Now I would like to know how I can expand this in maple into non quadratic terms (this will be useful because I can see the fourierterms by sight then instead of doing a big inverse fourier transformation)

The answer here would be:

$$-1/4-(1/4)\cdot \cos(4\pi x)+(1/2)\cdot\cos(2 \pi x)$$

I can do this by hand but I'd like to be able to do it with maple to save time. I should be possible since in my notes I see that the result was done by maple (M! above the equal sign ^^)

I tried simplify(...,trig) and expand.. But those didn't help.

-
how about combine(...,trig)? – Maesumi Jan 16 '13 at 15:14
@Maesumi thanks!! That worked! ^^ can't you post it in an answer so I can give you a correct answer reward? – Spyral Jan 16 '13 at 15:18
Maesumi's works great. Another more pedestrian one is: convert(%,exp);expand(%);simplify(%,symbolic); – GEdgar Jan 16 '13 at 15:19

How about starting with combine(...,trig)? There are just too many ways of writing a trig expression and it is a bit hard to tell a computer algebra system like Maple to "do it this way"! Here are some more examples.