# How do you integrate a square wave?

• Evilinside
In summary, the conversation discusses finding the function representation of the output signal from a simple op amp integrator circuit using a 4.7k resistor and a .01uf capacitor. The equation -1/rc * int vin(t) is used, but integrating a square wave input is challenging. It is suggested to integrate the input in sections and account for initial conditions. The output is a triangle wave with a frequency of 2000khz and a period of 500us. Thanks to the help provided, the speaker was able to determine the answer.
Evilinside
I'm doing homework where i have to find a function representation of the output signal from a simple op amp integrator circuit with a 4.7k resistor and a .01uf capacitor. I know I'm supposed to use the equation -1/rc * int vin(t) but the input is a square wave signal. I never learned how to integrate that. Can i anyone help me out? Do i have to use something called a Fourier series or Fourier transform?

This quote from wikipedia also applies to a square wave:

A definite integral of a function can be represented as the signed area of the region bounded by its graph.
Does that help?

This is a discontinuous function, so it is easier to integrate in sections. You need to do integrals over specifc intervals and you need to account for the initial conditions at each interval.

As pointed out above, you have to integrate each half cycle of the input square wave in sections. The basic form of the integration is

$$V_{out}(t)=\frac{-1}{RC}\int_t V_{in}(t) dt$$

Each segment is a straight line. The line is continuous, but its derivative is not. The output of the square wave is a triangle wave.

Bob S

Yes I finally got the answer i think. I set the square wave input to 2V peak and i got an answer of (-4Vp/.000047)*t and since the frequency of the input square wave is 2000khz, the period is 500us. so (-4v/.00047)*t should be the graph of a triangle wave for the an interval of 0-500us and repeat itself every period after that. I think that's the answer anyway. Oh well whether I'm wrong or right, thanks for help.

## 1. How do you integrate a square wave?

Integrating a square wave involves finding the area under the curve of the square wave, which is also known as the integral. This can be done by breaking the wave into smaller parts and calculating the area of each part, then adding them together.

## 2. What is the formula for integrating a square wave?

The formula for integrating a square wave is simply the base multiplied by the height of the wave. This can be written as ∫ f(x) dx = A * h, where A is the amplitude and h is the horizontal length of the wave.

## 3. Can you integrate a square wave using calculus?

Yes, integrating a square wave can be done using calculus. It involves using the fundamental theorem of calculus and breaking the wave into smaller parts to calculate the area under the curve.

## 4. What is the purpose of integrating a square wave?

The purpose of integrating a square wave is to determine the total energy or power of the wave. It is also used in many applications, such as signal processing and circuit analysis.

## 5. Are there any special techniques for integrating a square wave?

Yes, there are some special techniques that can be used for integrating a square wave, such as the trapezoidal rule or Simpson's rule. These methods can provide more accurate results compared to the basic formula for integrating a square wave.

• Electrical Engineering
Replies
10
Views
921
• Engineering and Comp Sci Homework Help
Replies
29
Views
3K
• Engineering and Comp Sci Homework Help
Replies
8
Views
1K
• Engineering and Comp Sci Homework Help
Replies
8
Views
2K
• Electrical Engineering
Replies
16
Views
2K
• Engineering and Comp Sci Homework Help
Replies
5
Views
2K
• Electrical Engineering
Replies
39
Views
2K
• Engineering and Comp Sci Homework Help
Replies
44
Views
3K
• Topology and Analysis
Replies
2
Views
547
• Engineering and Comp Sci Homework Help
Replies
2
Views
3K