Re: trig expansion
- To: mathgroup at smc.vnet.net
 - Subject: [mg8933] Re: trig expansion
 - From: Paul Abbott <paul at physics.uwa.edu.au>
 - Date: Sat, 4 Oct 1997 22:08:10 -0400
 - Organization: University of Western Australia
 - Sender: owner-wri-mathgroup at wolfram.com
 
Murray Eisenberg wrote:
> How can I cause Mathematica to expand Sin[2 Pi omega t + 2 Pi delta],
> where delta and omega are symbols, into the form
> 
>    Cos[2 Pi delta] Sin[2 Pi omega t] + Sin[2 Pi delta] Cos[2 Pi omega t]
> 
> without using a replacment rule
> 
>     Sin[a_ + b_] -> Sin[a]Cos[b] + Cos[a]Sin[b]
> 
> explicitly?  
What is wrong with using a replacment rule?  It is probably the best way
to achieve what you want here. 
I assume that this question is related to your earlier question (which I
assume is related to Fourier series expansions?):
>I want to make an assignment T = k/omega and somehow cause Mathematica
>to know that k is an integer.  How do I do this?
In my opinion, the best way to is using pattern-matching and replacement
rules (see The Mathematica Journal 2(4): 31).  E.g., for n integral, we
have
	{Cos[(n_)*Pi] -> (-1)^n, Sin[(n_)*Pi] -> 0}; 
Cheers,
	Paul 
____________________________________________________________________ 
Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia           
Nedlands WA  6907                     mailto:paul at physics.uwa.edu.au 
AUSTRALIA                             http://www.pd.uwa.edu.au/~paul
            God IS a weakly left-handed dice player
____________________________________________________________________