Adding trig functions with different amplitudes

In summary, the conversation discusses the use of trig identities in adding trig functions and their application in a Fourier transform. It is mentioned that there is no general simplification for situations where there are two arbitrary, real amplitudes for each term, and a workaround may be needed. The conversation also touches on the Fast Fourier Transformation algorithm and the derivation of trig identities for turning products into sums. It is suggested to use these identities in a Fourier transform, but it is unclear why one would want to do so instead of using the inverse Fourier transform.
  • #1
Mayhem
353
252
TL;DR Summary
A general rule for adding two trigonometric functions that have unidentical amplitudes
The trig identities for adding trig functions can be seen:
1662661943524.png

But here the amplitudes are identical (i.e. A = 1). However, what do I do if I have two arbitrary, real amplitudes for each term? How would the identity change?

Analysis: If the amplitudes do show up on the RHS, we would expect them to either be a product or sum of these, possibly signed, or simply explicitly states. For A = 1, it may be difficult to see where they appear if explicitly stated, as they disappear as a factor. However, what we do see is that 2 appears in front of all of the RHS identities, which is a hint that for A_1 = A_2 = 1, we simply add them together and place them as a factor in front of the expression. However, this isn't necessarily the case, and simply and intuition, and considering 2 also appears in the denominators of the inner terms, it isn't a given that the number 2 shows up for this reason.

I don't know the derivations of the above identities, so I'm wondering if there is a way to generalize something like Asin(a) + Bsin(b) such that these terms are accounted for on the RHS of an equivalent expression.
 
Mathematics news on Phys.org
  • #2
There is no general simplification for that situation. You just have to leave them as the multiplied sum of two different trig functions.
 
  • #3
FactChecker said:
There is no general simplification for that situation. You just have to leave them as the multiplied sum of two different trig functions.
Well that's annoying. The problem is I am trying to program a Fourier transform, which requires me to make a linear combination of trig functions. However, I can probably figure out a workaround.
 
  • #4
Mayhem said:
Well that's annoying. The problem is I am trying to program a Fourier transform, which requires me to make a linear combination of trig functions. However, I can probably figure out a workaround.
If your program only has to calculate a linear combination of a couple of trig functions, then a computer can easily do the calculation directly.
If you are trying to calculate the Fourier transform of a general function and have enough data points, then you should look into the Fast Fourier Transformation (FFT). There are several implementations of the FFT algorithm. (see https://en.wikipedia.org/wiki/Fast_Fourier_transform)
 
Last edited:
  • Like
Likes topsquark
  • #5
These identities are derived from [tex]
\begin{split} \cos(a \pm b) &= \cos a \cos b \mp \sin a \sin b, \\
\sin(a \pm b) &= \sin a \cos b \pm \cos a \sin b. \end{split}
[/tex] Their purpose in the context of transforms is to turn products into sums. For example [tex]
\begin{split}
\left(\sum_{n=0}^N a_n \cos(nx)\right)\left(\sum_{n=0}^N b_n \cos(nx)\right)
&= \sum_{n=0}^N \sum_{m=0}^N a_n b_m \cos (nx) \cos(m x) \\
&= \frac12 \sum_{n=0}^N \sum_{m=0}^N
a_nb_m \left( \cos((n+m)x) + \cos((n-m)x)\right)\end{split}[/tex] and from there you can work out which values of [itex]n[/itex] and [itex]m[/itex] will contribute to the coefficients [itex]c_r[/itex] in [itex]\sum_{r=0}^N c_r \cos(rx)[/itex].

You can use these identities to do what you were originally attempting, but it is unclear to me why you would want to write [itex](A + B)\sin((a+b)/2)\cos((a-b)/2) + (A - B)\cos((a+b)/2)\sin((a-b)/2)[/itex] instead of [itex]A \sin a + B \sin b[/itex].
 
Last edited:
  • Like
Likes PeroK, Mayhem and topsquark

FAQ: Adding trig functions with different amplitudes

How do you add trig functions with different amplitudes?

To add trig functions with different amplitudes, you first need to find the common period of the functions. Then, you can add the functions as you would normally, but you may need to adjust the amplitude of each function to match the common period. Finally, simplify the resulting function to get the final answer.

What is the common period of trig functions?

The common period of trig functions is the smallest positive value for which the function repeats itself. For example, the common period of sine and cosine functions is 2π, while the common period of tangent and cotangent functions is π.

Can you add trig functions with different frequencies?

Yes, you can add trig functions with different frequencies. However, you will need to find the least common multiple of the frequencies in order to determine the common period and adjust the amplitudes accordingly.

What happens when you add trig functions with different amplitudes?

When you add trig functions with different amplitudes, the resulting function will have a varying amplitude depending on the values of the individual functions. The amplitude of the resulting function will be the sum of the individual amplitudes, unless they are equal and opposite, in which case the amplitude will be zero.

Is there a specific method for adding trig functions with different amplitudes?

Yes, there is a specific method for adding trig functions with different amplitudes. This method involves finding the common period, adjusting the amplitudes, and then simplifying the resulting function. It is important to note that the order in which the functions are added does not affect the final result.

Similar threads

Replies
17
Views
5K
Replies
7
Views
1K
Replies
3
Views
1K
Replies
4
Views
3K
Replies
12
Views
34K
Replies
1
Views
4K
Back
Top