Can You Create a Single Equation for Multiple Time-Dependent Cosine Functions?

In summary, there is a way to combine the three conditions into one equation using the "Heaviside step function" but it may not necessarily be more convenient than the current function.
  • #1
ACLerok
194
0
Given:
x(t) =
cos(2*pi*f1*t) 0 <= t < 4
cos(2*pi*f2*t) 4 <= t < 8
cos(2*pi*f3*t) 8 <= t < 12

f1, f2, and f3 are given as well

Would it be possible to combine all three of these conditions into one convenient equation or am I just dreaming? I tried using Matlab to concatenate the three graphs, but it won't give me an equation of it.
 
Last edited:
Physics news on Phys.org
  • #2
I'm not sure what you mean by a "convenient" equation. What you have is a perfectly good function, You could use the "Heaviside step function" which is defined by H(x)= 0 if x<= 0, H(x)= 1 if x> 0.

Then f(t)= cos(2pi f1 t)+ ((cos(2pi f2 t)- cos(2pi f1 t))H(t-4)+ (cos(2pi f3 t)- cos(2pi f2 t))H(t-8).

for 0<= t<= 4, both t-4< 0 and t-8< 0 so both H(t-4) and H(t-8) are 0 and only the first term, cos(2pi f1 t), is non zero. For 4< t<= 8, t-4> 0 so H(t-4)= 1 but H(t-8) is still 0: f(t)= cos(2pi f1 t)+ cos(2pi f2 t)- cos(2pi f1 t)= cos(2pi f2 t). If 8< t<= 12, both t-4> 0 and t-8>0 so both H(t-4) and H(t-8) are 1. f(t)= cos(2pi f1 t)+ cos(2pi f2 t)- cos(2pi f1 t)+ cos(2pi f3 t)- cos(2pi f2 t)= cos(2pi f3 t).

But is cos(2pi f1 t)+ ((cos(2pi f2 t)- cos(2pi f1 t))H(t-4)+ (cos(2pi f3 t)- cos(2pi f2 t))H(t-8) better than what you have?
 
  • #3


Yes, it is possible to combine all three conditions into one equation. This is known as a piecewise function, where different equations are used for different intervals of the independent variable (in this case, t). The combined equation would look something like this:

x(t) = cos(2*pi*f1*t), 0 <= t < 4
cos(2*pi*f2*t), 4 <= t < 8
cos(2*pi*f3*t), 8 <= t < 12

This equation can be written in a more compact form using the Heaviside step function, which is defined as:

H(t) = 0, t < 0
1, t >= 0

Using this function, the combined equation would be:

x(t) = cos(2*pi*f1*t) * H(t) + cos(2*pi*f2*t) * H(t-4) + cos(2*pi*f3*t) * H(t-8)

This equation takes into account the different intervals for t and uses the appropriate cosine function for each interval. This can be easily implemented in Matlab as well.

So, you are not dreaming and it is possible to combine all three conditions into one equation.
 

FAQ: Can You Create a Single Equation for Multiple Time-Dependent Cosine Functions?

What is a periodic function?

A periodic function is a mathematical function that repeats its values in a regular pattern over a specific interval. This interval is known as the period of the function.

How do you combine two periodic functions?

To combine two periodic functions, you can add or subtract them depending on the desired result. If both functions have the same period, their combination will also be a periodic function with the same period. If the periods are different, the resulting function may still be periodic, but with a new, longer period that is a multiple of both original periods.

Can you combine more than two periodic functions?

Yes, you can combine any number of periodic functions. The same principles apply - if all functions have the same period, the resulting function will also have the same period. If the periods are different, the resulting function may still be periodic, but with a new, longer period that is a multiple of all the original periods.

What is the difference between a periodic function and a sinusoidal function?

A sinusoidal function is a specific type of periodic function that takes the form of a sine or cosine curve. However, not all periodic functions are sinusoidal, as they can have different shapes and patterns. Sinusoidal functions are often used to model real-world phenomena such as sound waves or oscillations.

What are some applications of combining periodic functions?

Combining periodic functions is a powerful tool in mathematics and has many applications in fields such as physics, engineering, and signal processing. It can be used to model and analyze complex periodic phenomena, such as the behavior of electrical circuits or the motion of a pendulum. It also has applications in creating and understanding musical tones and harmonies.

Similar threads

Back
Top