plotXpose is a companion app with the book Mathematics for Electrical Engineering and Computing by Mary Attenborough - click for more info
 

Generally square - Solution

Tap y(t) and the Function pop-up menu appears - tap 'Square Wave'. Change the period to 1 and tap OK.

Tap the Settings icon and the Setting pop-up menu appears - tap t-axis to change the minimum t value to 0 and maximum t value to 2.

Tap the View icon and, on the View window, change the derivative method to 'Central Difference' and tap OK.

Square wave function of period 1 and approximate derivative using the Central Difference method. Sampling Interval 0.01


Square wave function of period 1 and approximate derivative using the Central Difference method. Sampling Interval 0.01


Square wave function of period 1 and approximate derivative using the Central Difference method. Sampling Interval 0.005


Square wave function of period 1 and  approximate derivative using the Central Difference method. Sampling Interval 0.005


Square wave function of period 1 and approximate derivative using the Central Difference method. Sampling Interval 0.001


Square wave function of period 1 and  approximate derivative using the Central Difference method. Sampling Interval 0.001


Decreasing the sampling interval has the effect of narrowing the triangular spike in the derivative and increasing its height.

We can see the this the triangle more detail by narrowing the range for t to 0.7<=-t<0.8. We have also switched on the grid from the View menu to get the plot below.

Triangular spike in the central difference approximation to the derivative of a square wave of period 1 with sampling interval 0.01


Triangular spike in the central difference approximation to the derivative of a square wave of period 1 with sampling interval 0.01


The area of a triangle is given by the length of the base times the height divided by 2, so in this case it is
4*0.01 * 100 / 2 = 2

Shortening the sampling interval results in the base of the triangle becoming narrower and its height increasing proportionally (although continuing this process would reach the limits of accuracy of plotXpose) meaning that the area of the triangular spike remains 2. This triangular sequence can be used as a definition of twice the delta function as the height of the peak is tending to infinity while the area of the triangle remains 2.



plotXpose app is available on Google Play and App Store
Download plotXpose on the App Store
Get plotXpose on Google Play
Google Play and the Google Play logo are trademarks of Google LLC.
A version will shortly be available for Windows.
plotXpose app is a companion to the book Mathematics for Electrical Engineering and Computing by Mary Attenborough, published by Newnes, 2003.