I am trying to simulate the following block diagram in Matlab Simulink
which simulates the equation: $\ddot{y}(t) = - \omega_0^2\ y(t)$ with the second integrator having the initial condition of 1. where this equation can have the solution : $y(t) = cos(\omega_0 t)$
but upon simulation, I got the following result:
I can notice the mathematical solution doesn't follow the actual simulation where the simulation will always produce a sinusoidal trying to reach a stability state which is the oscillation between (inital_condition / 2) and (-inital_condition / 2). So why doesn't the mathematical solution match the simulation