MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: trig expansion

  • To: mathgroup at
  • Subject: [mg8933] Re: trig expansion
  • From: Paul Abbott <paul at>
  • Date: Sat, 4 Oct 1997 22:08:10 -0400
  • Organization: University of Western Australia
  • Sender: owner-wri-mathgroup at

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

	{Cos[(n_)*Pi] -> (-1)^n, Sin[(n_)*Pi] -> 0}; 

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 

            God IS a weakly left-handed dice player

  • Prev by Date: Re: Piecewise functions
  • Next by Date: Help! Sin[n Pi] (n Integer)
  • Previous by thread: Re: trig expansion
  • Next by thread: Re: trig expansion