# simulink discrete integrator block problem

I am testing the Simulink discrete integrator block as shown in the picture below. The simulation is fixed step with $$T_s = 1e-5$$ and the cosine wave block setting and the scope display is also shown below.

For the discrete integrator block, the gain value K is set to be 1 and the integration method was chosen to be "Accumulation: Forward Euler". However, how come the magnitude of the result is so big as shown in the top part of the scope picture? I thought integrating a cosine wave will produce a sine wave with the same magnitude. If the integration method is chosen to be "integrator: Forward Euler", the result becomes very small, as shown below. It just can't produce a sine wave with magnitude of 1. How to get the correct result? ## 1 Answer

All of a sudden I realized I made a silly mistake. $$\int \cos(\omega\cdot t)dt=\frac{1}{\omega}\sin(\omega\cdot t)$$ which means the "integrator: Forward Euler" choice produced the correct result.