solving ordinary differential equations illustration of linear damping with sinusoidal excitation we now extend the previous example to also involve some external oscillating force on the systemf td sin wtdriving car on road with sinusoidal bumps might give such an external excitation on the spring system in the car ( is related to the velocity of the carwith : and from math import pisin lambda ta*sin( *twe get the graph in fig the striking difference from fig is that the oscillations start out as damped cos signal without much influence of the external forcebut then the free oscillations of the undamped system (cos tu die out and the external force : sin tinduces oscillations with shorter period = you are encouraged to play around with larger and switch from sine to cosine in and observe the effects if you look this up in physics bookyou can find exact analytical solutions to the differential equation problem in these cases particularly interesting case arises when the excitation force has the same frequency as the free oscillations of the undamped systemi td sin with the same amplitude : but smaller damping : the oscillations in fig becomes qualitatively very different as the amplitude grows significantly larger over some periods this phenomenon is called resonance and is exemplified in fig removing the damping results in an amplitude that grows linearly in time fig effect of linear damping in combination with sinusoidal external force