Home

PDF (letter size)

sums of sin or cosine to one sin using Mathematica

Nasser M. Abbasi

June 28, 2015   Compiled on January 30, 2024 at 3:40am

1 Introduction

sums of cosine terms, all with same frequency but can have different amplitude or phases is converted to a single sin term. The first step is to use TrigExpand to break sin or cos with phase to pure sin or cos.

Next step is to collect terms based on the pure sin and the pure cos terms.

This can be done either use Collect (see appendix) or using CoefficientList.

The input to the function given below is the expression to reduce with the independent variable. Validation of expression is done using Mr.Wizard pattern test (see Appendix).

  1. Mathematica notebook
  2. source in plain text
  3. PDF

2 references

  1. Mr Wizard’s pattern matcher used in the above function
  2. Wikepedia article
  3. Ray Koopman implementation using Collect