ECE 4330 Lecture 3 Math Review (continued) Prof. Mohamad Hassoun

Series and Series Sum:

1 + 2 + 3 + 4 + ⋯ + 푢푘 + ⋯

{1, 2, 3, 4, … , 푢푘 … } (Arithmetic series) A finite series and its sum:

푆푛 = 1, 2, 3, … , 푛 푛 ∑ 푘 = 1 + 2 + 3 + ⋯ + 푛 푘=1

Problem: Find a closed form expression for the above sum. Solution: Add the series to itself as arranged below (Gauss): 1 + 2 + ⋯ + (푛 − 1) + 푛 푛 + (푛 − 1) + ⋯ + 2 + 1 (푛 + 1) + (푛 + 1) + ⋯ + (푛 + 1) + (푛 + 1) = 푛(푛 + 1)

푛 100 푛(푛 + 1) 100(100 + 1) ∑ 푘 = , 푒푔. ∑ 푘 = = 5050 2 2 푘=1 푘=1 Example of sum of divergent infinite series, ∞ ∞(∞ + 1) ∑ 푘 = = ∞ → 퐷푖푣푒푟푔푒푛푡 푆푒푟푖푒푠 2 푘=1

Geometric Series: {푎1, 푎2, 푎3, … , 푎푛} Here, the ratio of two consecutive series terms is a constant, 푎푘+1 = 푎 → 푐표푛푠푡푎푛푡 푎푘 The sum of a finite geometric series is given by 푛 푎푛+1 − 푎푚 ∑ 푎푘 = , ∀푎 ≠ 1 푎 − 1 푘=푚 where 푎 is complex valued in general. If we start the sum from 푚 = 1 then, as 푛 approaches we obtain ∞ 푎(푎∞ − 1) ∞ |푎| ≥ 1 ∑ 푎푘 = = { 푎 푎 − 1 |푎| < 1 푘=1 1 − 푎 Series converges for |푎| < 1 and diverges, otherwise. If the sum starts from zero, we obtain ∞ ∞ 푎 1 ∑ 푎푘 = 1 + ∑ 푎푘 = 1 + = , |푎| < 1 1 − 푎 1 − 푎 푘=0 푘=1 Example. Sum the geometric series,

∞ 푘 1 1 2 ∑ ( ) = 1 = 1 2 1 − 푘=1 2 1 1 1 Explicitly, we may write: + + + ⋯ = 1 2 4 8 Proof for the sum of a geometric series with a = 1/2: ∞ 1 푘 1 1 1 ∑ ( ) = + + + ⋯ = ? 2 2 4 8 푘=1 Start with a circle with unit area and divide it as shown,

A = 1

1 1 1 Then, it can be easily seen that 퐴 = + + + ⋯ = 1 2 4 8 Example. Alternating geometric series. ∞ 1 푘 1 2 ∑ (− ) = 1 = 2 1 − (− ) 3 푘=0 2 1 1 1 2 1 − + − + ⋯ = 2 4 8 3 The geometric series was known to the Greek mathematicians. However, there is evidence that the Egyptians used it 1500 years before the Greeks. (Source: Wikipedia) of Syracuse (historic city in Sicily, 287 BC – 212 BC) was an Ancient Greek mathematician, physicist, engineer, inventor, and astronomer. Although few details of his life are known, he is regarded as one of the leading scientists in classical antiquity. Archimedes used the sum of a geometric series to compute the area enclosed by a parabola and a straight line. His method was to dissect the area into an infinite number of triangles. Archimedes' Theorem states that the total area under the parabola is 4/3 of the area of the blue triangle (defined by any three points on three parabola).

Archimedes determined that each green triangle has 1/8 the area of the blue triangle (refer to last slide for a derivation outline), each yellow triangle has 1/8 the area of a green triangle, and so forth. Assuming that the blue triangle has area 1, the total area is an infinite sum: 1 1 2 1 3 1 + 2 ( ) + 4 ( ) + 8 ( ) + ⋯ 8 8 8 The first term represents the area of the blue triangle, the second term the areas of the two green triangles, the third term the areas of the four yellow triangles, and so on. Simplifying the fractions gives 1 1 1 1 + + + + ⋯ 4 16 64 This is a geometric series with common ratio ¼ that sums to

∞ 1 푛 1 4 ∑ ( ) = 1 = 4 1 − 3 푛=0 4 This computation uses the method of exhaustion, an early version of integration. In modern calculus, the same area could be found using a definite integral. Your turn: Employ Mathcad or Matlab to obtain a closed form answer (formula) for the following finite sums (see next slide): 푛 푛 ∑ 푘2 = ? ∑ 푘푎푘 = ? 푘=1 푘=1 Your turn: Prove the following equalities:

∞ ∞ 푎푛 푎 ∑ 푎푘 = ∑ 푘푎푘 = 1 − 푎 (1 − 푎)2 푘=푛 푘=0 Mathcad Series Sum Examples:

푛(푛 + 1) → 2

푛(푛 + 1)(2푛 + 1) = 6

Matlab Series Sum Examples: The Matlab command symsum returns the sum of a series.

Ibn al-Haytham (965-1039), born in Basra, now in Iraq, derived sum formulas for the powers of an integer and used these formulas to perform what we would call an integration (by Greek-style exhaustion). The following are Ibn al-Haytham’s sum formulas written in our modern notation (your turn: verify using Matlab’s symsum):

푛 푛 1 1 푛3 푛2 푛 ∑ 푘2 = ( + ) 푛 (푛 + ) = + + 3 3 2 3 2 6 푘=1 푛 푛 1 푛4 푛3 푛2 ∑ 푘3 = ( + ) 푛(푛 + 1)푛 = + + 4 4 4 2 4 푘=1 푛 푛 1 1 1 푛5 푛4 푛3 푛 ∑ 푘4 = ( + ) 푛 (푛 + ) [(푛 + 1)푛 − ] = + + − 5 5 2 3 5 2 3 30 푘=1 Example of an infinite sum:

∞ 푥푘 ∑ = 푒푥 0! = 1 푘! 푘=0 1 1 1 푒푥 = 1 + 푥 + 푥2 + 푥3 + 푥4 + ⋯ 2 6 24 Letting 푥 = 1, we obtain ∞ 1 1 1 1 푒 = ∑ = 1 + 1 + + + + ⋯ 푘! 2 6 24 푘=0 ______Does 푥0 = 1 make sense? Sure, just take the natural logarithm of both sides: ln(푥0) = ln(1) → (0)ln (푥) = 0 → 0 = 0 Your Turn: Evaluate ln(−1). Hint: start with Euler’s formula. Series Approximation of π

Did you know that 355/113 is a very good approximation for 휋? Compute the approximtion error.

∞ 1 휋2 ∑ = (2푛 + 1)2 8 푛=0

∞ 1 휋4 ∑ = 푛4 90 푛=1

Convergence tests for infinite sums Ratio Test: ∞ Consider the infinite series ∑푘=1 푢푘. The series convergence is determined by the following test:

< 1 푐표푛푣푒푟푔푒푛푡 푠푒푟푖푒푠 푢푘+1 lim | | = = 1 푖푛푐표푛푐푙푢푠푖푣푒 푡푒푠푡 푘→∞ 푢푘 > 1 푑푖푣푒푟푔푒푛푡 푠푒푟푖푒푠

∞ 푘 Example: Test the geometric series ∑푘=1 푎 for convergence. 푎푘+1 lim | | = lim |푎| = |푎| → 푆푒푟푖푒푠 푐표푛푣푒푟푔푒푠 푖푓 |푎| < 1 푘→∞ 푎푘 푘→∞ Example:

1 ∞ 2 1 (푘+1)2 푘 ∑ : lim | | = lim | | 푘2 푘→∞ 1 푘→∞ 푘2 + 2푘 + 1 푘=1 푘2 푘2 = | lim | = 1 → 퐼푛푐표푛푐푙푢푠푖푣푒 푘→∞ 푘2 + 2푘 + 1 1 1 1 1 + + + + ⋯ 22 32 42

휋2 In fact, the above series is Euler’s series and it converges to . 6 Example: Harmonic Series ∞ 1 1 1 1 ∑ = 1 + + + + ⋯ 푘 2 3 4 푘=1

1 푘 lim | 푘+1 | = | lim | = 1 → 퐼푛푐표푛푐푙푢푠푖푣푒 푘→∞ 1 푘→∞ 푘 + 1 푘

Integral Test: Works for series with positive decreasing terms. Example: Harmonic series. ∞ 1 1 ∑ 푑푒푓푖푛푒 푓(푥) = 푘 푥 푘=1 ∞ 1 ∞ ∫ 푑푥 = 푙푛|푥| | = 푙푛|∞| − 푙푛|1| = ∞ 1 푥 1 Series diverges because integral is infinite. A direct proof of the divergence of the harmonic series ∞ 1 1 1 1 1 1 1 ∑ = 1 + + + + + + + ⋯ 푘 2 3 4 5 6 7 푘=1 Group the terms 1, 2, 4, 8 … terms at a time starting with the term ½ : ∞ 1 1 1 1 1 1 1 1 ∑ = 1 + ( ) + ( + ) + ( + + + ) + ⋯ 푘 2 3 4 5 6 7 8 푘=1 Next, replace each element in a group in parentheses with the smallest fraction in the group, to get ∞ 1 1 1 1 1 1 1 1 ∑ > 1 + + ( + ) + ( + + + ) + ⋯ 푘 2 4 4 8 8 8 8 푘=1 ∞ 1 1 1 1 ∑ > 1 + + + + ⋯ = 1 + 1 + 1 + 1 + ⋯ = ∞ 푘 2 2 2 푘=1 Therefore, the series diverges.

The following is yet another proof of the divergence of the Harmonic series (in the spirit of a proof by Euler): Starting from the power series ∞ 푥푛 푥2 푥3 푥4 ln(1 − 푥) = − ∑ = −푥 − − − − … 푛 2 3 4 푛=1 And letting 푥 → 1, 1 1 1 1 lim ln (1 − 푥) = − (1 + + + + + ⋯ ) 푥→1 2 3 4 5 1 1 1 1 ln(0) = −∞ = − (1 + + + + + ⋯ ) 2 3 4 5 Therefore, 1 1 1 1 1 + + + + + ⋯ = ∞ 2 3 4 5

Adding the first 1,000,000 terms of the harmonic series, the partial sum is only 14.357; and for the first trillion terms, it is approximately 28. It has been pointed out that to reach a sum of 100, we would have to add up 1043 terms of the harmonic series. A computer adding up 1 million terms per second would take about 1037 seconds to complete the job which is on the order of about few universe life times (our universe age is extimated to be 1017 seconds)! This is then an exmaple of a math problem that does not benefit of digital computers; The problem must be solved analytically (theoretically).

Example. Does the following infinite sum converge? ∞ 1 ∑ 푘2 푘=1 Applying the integral test, we get ∞ 1 1 ∞ 1 1 ∫ 2 푑푥 = − | = − ( − ) = 0 + 1 = 1 1 푥 푥 1 ∞ 1 Integral is finite, therefore the series converges. In general, the p-series ∞ ∞ 1 1 푝 ∑ = ∑ ( ) 푘푝 푘 푘=1 푘=1 converges if p > 1. It diverges for p = 1 (harmonic series)

Example: Test the convergence of the following series: ∞ 1 ∑ 푘! 푘=0 Ratio test:

1 (푘+1)! 1 lim | | = | lim | = 0 < 1 푘→∞ 1 푘→∞ 푘 + 1 푘! Series converges. In fact, we saw earlier that ∞ 1 ∑ = 푒 푘! 푘=0 It is interesting to see that Euler’s constant e (also known as Napier’s constant) appears in the following limit: 1 푛 lim (1 + ) = 푒 푛→∞ 푛 Here are some additional math problems where e appears:

1 푥 - The global maximum for 푓(푥) = √푥 = 푥푥 occurs at 푥 = 푒 1 - The global minimum for 푓(푥) = 푥푥 occurs at 푥 = 푒 푥... - Due to a theorem by Euler, the infinite tetration 푥푥푥 1 1 converges iff ≤ 푥 ≤ 푒푒 (or approximately, 0.0660 < 푒푒 푥 < 1.4447)

Refer to the article 푂푛 휋, 푒 푎푛푑 √−1 for more interesting relationships and applications of these constants.

Your turn: Do the following infinite sums converge? Try by inspection first. Then perform the proper convergence test. ∞ ∞ 1 1 ∑ ∑ ln(푘) 푘 푘=2 푘=1 √

Taylor Series

(Wikipedia) A Taylor series is a representation of a function as an infinite sum of terms that are calculated from the values of the function's derivatives at a single point. The concept of a Taylor series was discovered by the Scottish mathematician James Gregory and formally introduced by the English mathematician Brook Taylor in 1715. If the Taylor series is centered at zero, then that series is also called a Maclaurin series, named after the Scottish mathematician Colin Maclaurin, who made extensive use of this special case of Taylor series in the 18th century. The Taylor and Maclaurin Series 푥 − 푎 (푥 − 푎)2 푓(푥) = 푓(푎) + 푓′(푎) + 푓′′(푎) + ⋯ 1! 2! 푑푓(푥) 푑2푓(푥) 푓′(푎) = | 푓′′(푎) = | etc. 푑푥 푥=푎 푑푥2 푥=푎

Maclaurin Series: (assumes a = 0 in the Taylor expansion) 푥 푥2 푥3 푓(푥) = 푓(0) + 푓′(0) + 푓′′(0) + 푓′′′(0) + ⋯ 1! 2! 3! 2 3 푓(푥) = 푎0 + 푎1푥 + 푎2푥 + 푎3푥 + ⋯ where, 1 푑푛푓(푥) 푎 = | 푛 푛! 푑푥푛 푥=0 Note that, 1 푑0푓(푥) 1 푎 = | = 푓(0) = 푓(0) 0 0! 푑푥0 푥=0 1

Taylor series animated (Mathcad) Animation 1 Animation 2

Example: Find the Taylor series expansion of 푓(푥) = 푒푏푥, at x = 0.

푏(0) 푎0 = 푓(0) = 푒 = 1 1 푑푓(푥) 푎 = | = (1) 푏 ∙ 푒푏푥| = 푏 1 1! 푑푥 푥=0 푥=0 1 푑2푓(푥) 1 푏2 푎 = | = 푏2 ∙ 푒0 = 2 2! 푑푥2 푥=0 2 2 ⋮ 푏푥 푏2 푏3 푒푏푥 = 1 + + 푥2 + 푥3 + ⋯ 1! 2! 3! If we set b = 1, we obtain the expansion 푥2 푥3 푒푥 = 1 + 푥 + + + ⋯ 2 6 Furthermore, if we set x = 1, we obtain the following infinite sum and its value ∞ 1 ∑ = 푒 푘! 푘=0 If we set 푏 = 푗 = √−1 in the above expansion for 푒푏푥 we obtain 1 푗 1 푗 푒푗푥 = 1 + 푗푥 − 푥2 − 푥3 + 푥4 + 푥5 − ⋯ 2! 3! 4! 5! Power series representation of other useful functions: 푥2 푥3 푥푛 푒푥 = 1 + 푥 + + + ⋯ + + ⋯ 2! 3! 푛! 푥3 푥5 푥7 sin 푥 = 푥 − + − + ⋯ 3! 5! 7! 푥2 푥4 푥6 푥8 cos 푥 = 1 − + − + − ⋯ 2! 4! 6! 8! 푥3 2푥5 17푥7 −휋 휋 tan 푥 = 푥 + + + + ⋯ < 푥 < 3! 15 315 2 2 푥3 2푥5 17푥7 −휋 휋 tanh 푥 = 푥 − + − + ⋯ < 푥 < 3 15 315 2 2 푛(푛 − 1) 푛(푛 − 1)(푛 − 2) (1 + 푥)푛 = 1 + 푛푥 + 푥2 + 푥3 + ⋯ 2! 3! 푛 + ( ) 푥푘 + ⋯ 푥푛 푘 Note: (1 + 푥)푛 is a polynomial with degree n. And, (1 + 푥)푛 ≈ 1 + 푛푥 |푥| ≪ 1

1 = 1 + 푥 + 푥2 + 푥3 + ⋯ |푥| < 1 1−푥

Proof of conv. of geometric series: 1 ∑∞ 푥푘 = |푥| < 1 푘=0 1−푥 The above series can be used to generate convergent series. If we set 푥 = 휋/4 in the expansion for sin(x), we obtain:

√2 휋 휋3 휋5 휋7 = − + − … 2 4 43. 3! 45. 5! 47. 7!

Taylor series-based proof of Euler’s identity Consider the three expansions: 푥2 푥4 푥6 푥8 cos 푥 = 1 − + − + − ⋯ 2! 4! 6! 8! 푥3 푥5 푥7 sin 푥 = 푥 − + − + ⋯ 3! 5! 7! 1 푗 1 푗 푒푗푥 = 1 + 푗푥 − 푥2 − 푥3 + 푥4 + 푥5 − ⋯ 2! 3! 4! 5! Then, we may write cos(푥) + 푗푠푖푛(푥) = 푥2 푥4 푥6 푥8 푥3 푥5 푥7 1 − + − + − ⋯ + 푗 (푥 − + − + ⋯ ) 2! 4! 6! 8! 3! 5! 7! 1 푗 1 푗 = 1 + 푗푥 − 푥2 − 푥3 + 푥4 + 푥5 − ⋯ = 푒푗푥 2! 3! 4! 5! Therefore, we arrive at the famous Euler’s identity: 푒푗푥 = cos(푥) + 푗sin(푥) Just before his 15th birthday (in April 1933), the physics Nobel prize winner Richard Feynman (1918-1988) made the following entry in his teenage notebook under the title “The Most Remarkable Result in Math”. This is essentially the derivation that we just did for Euler’s identity.

It should be noted here that the power series for sin(푥) and cos (푥) were known before James Taylor by Isaac Newton (1670) and Wilhelm Leibniz (1676). In fact, it is believed that the Indian astronomer and mathematician Madhava (1350-1425) had known about these series before Newton and Leibniz. He also knew that the 1 1 1 1 휋 infinite series 1 − + − + − ⋯ converges to (a result that was rediscovered 3 5 7 9 4 by James Gregory (1671) and Leibniz. Calculus-based verification of Euler’s identity. The idea here is to prove that Euler’s “equation” is an “identity”; i.e., it holds for all x. 푒푗푥 = cos(푥) + 푗sin(푥)

Since 푒푗푥 ≠ 0 for all x real, then we can divide both sides of the above equation to get cos(푥) + 푗sin(푥) 1 = 푒푗푥 or,

푒−푗푥[cos(푥) + 푗 sin(푥)] = 1 Differentiating the equation leads to,

푑 푒−푗푥[cos(푥) + 푗sin(푥)] = 0 푑푥

Using the chain rule on the left hand side, gives −푗푒−푗푥[cos(푥) + 푗sin(푥)] + 푒−푗푥[− sin(푥) + 푗cos(푥)] = [−푗푒−푗푥 cos(푥) + 푒−푗푥 sin(푥)] + [−푒−푗푥 sin(푥) + 푗푒−푗푥 cos(푥)] = 0 Or, 0 = 0. Therefore, the equation is an identity. I highly recommend this book for all senior ECE students (Author: Paul Nahin; Princeton University Press, 2006)

The following are interesting videos on “휋” (take a look at the and physics behind it): (https://www.3blue1brown.com/)

Intro

Why is here? And why is it squared? A geometric answer to the Basel problem

Pi hiding in prime regularities

The most unexpected answer to a counting puzzle

So why do colliding blocks compute pi?

How colliding blocks act like a beam of light...to compute pi.

And, by the way, the above resource has an interesting series on the essence of calculus. Take a look!

Mathcad/Matlab Taylor Series Examples: Mathcad:

Matlab:

Partial Fraction Expansion (Section B.5-2 in textbook) Express the following rational function (ratio of two polynomials) as the sum of partial fractions. 푥 + 1 퐾 퐾 퐻(푥) = = 1 + 2 = 푥2 − 3푥 + 2 푥 − 1 푥 − 2 퐾 (푥 − 2) + 퐾 (푥 − 1) (퐾 + 퐾 )푥 + (−2퐾 − 퐾 ) 1 2 = 1 2 1 2 (푥 − 1)(푥 − 2) 푥2 − 3푥 + 2 By matching the coefficients of the numerator polynomials, we can solve for the constants:

퐾1 + 퐾2 = 1

−2퐾1 − 퐾2 = 1

Solving, gives: 퐾1 = −2 , 퐾2 = 3

Therefore, we arrive at the following PFE, −2 3 퐻(푥) = + 푥 − 1 푥 − 2 Partial fraction expansion is very useful for finding the inverse Laplace (also, Fourier and Z) transform. More on this in Lecture 11. Your turn: Determine the PFE for −5 퐹(푠) = (푠 − 2)(푠 + 3) Partial Fraction Expansion (Mathcad/Matlab): Mathcad:

Matlab:

Now, we may construct the PFE as follows: 푅 푅 1 + 2 + 퐾 푥 − 푃1 푥 − 푃2

The TI89 computes the P.F.E as follows: expand(“expression”, x)

Integration (Anti-derivative) 푑(푥2 + 퐶) 2푥 = 푑푥 푑(푥2 + 퐶) ∫ 2푥 푑푥 = ∫ 푑푥 푑푥

∫ 2푥 푑푥 = ∫ 푑(푥2 + 퐶)

∫ 2푥 푑푥 = 푥2 + 퐶

2x 0 ≤ 푥 ≤ 1 푓(푥) = 0 otherwise

∞ 1 2 1 ∫ 푓(푥)푑푥 = ? → ∫ 2푥푑푥 = 푥 |0 = 1 −∞ 0 Check:

1 (1)(2) A = (푏푎푠푒)(ℎ푒푖푔ℎ푡) = = 1 2 2

Sometimes, the definite integral of a function can be easily determined by computing the area under the curve from a plot of the function. Here is an example:

+∞ ∫ 푔(푥) 푑푥 = 0 −∞

Table of integrals

Mathcad and Matlab Integration Examples Mathcad:

Matlab Examples:

Numeric Integration:

휋 2 ∫ sin(푥) 푑푥 0

Mathcad and Matlab Differentiation Mathcad:

Matlab:

Function Approximation using LSE Minimization In some engineering applications, the analysis can be greatly simplified if a nonlinear function 푓(푥) (over the interval 푥 ∈ [훼 훽]) is approximated by a linear (or another simpler ̃ nonlinear) function 푓(푎0, 푎1, 푎2, … , 푎푚, 푥), where 푎0, 푎1, 푎2, … , 푎푚 are parameters to be determined. One method for determining those parameters is to minimize the total error between 푓 and 푓̃. The least-squares-error (LSE) criterion (error function) may then be employed, and the problem reduces to computing the 푎0, 푎1, 푎2, … , 푎푚 parameters such that the following LSE function is minimized,

훽 ̃ 2 퐸(푎0, 푎1, 푎2, … , 푎푚) = ∫ [푓(푥) − 푓(푥)] 푑푥 훼 The parameters are then obtained by solving (sometimes numerically) the following set of 푚 + 1 equations, 휕퐸 휕퐸 휕퐸 휕퐸 = 0, = 0, = 0, … , = 0, 휕푎0 휕푎1 휕푎2 휕푎푚 Once the equations are formulated, Mathcad or Matlab can then be used to solve the resulting system of (generally, nonlinear) equations numerically. The solution need to be verified to make sure it leads to a minimum (because the derivative of a quantity can be zero at a minimum, maximum or point-of-inflection). In general, there could be multiple solutions (minima) and we need to select the solution that leads to the smallest 퐸. Example. Find the function 푓̃(푥) = 푎푥 + 푏 that best approximates the function 푓(푥) = 푥2, over the interval [0 2].

The 푎 and 푏 parameters are the solution to the system of equations:

휕퐸 휕퐸 = 0 = 0 휕푎 휕푏 where 퐸 is given by

2 퐸(푎, 푏) = ∫ [푥2 − (푎푥 + 푏)]2푑푥 0 The partial derivatives are

2 2 2 휕퐸 휕 2 휕 = ∫ [푥2 − (푎푥 + 푏)] 푑푥 = ∫ [푥2 − (푎푥 + 푏)] 푑푥 휕푎 휕푎 0 0 휕푎 2 2 2 휕퐸 휕 2 휕 = ∫ [푥2 − (푎푥 + 푏)] 푑푥 = ∫ [푥2 − (푎푥 + 푏)] 푑푥 휕푏 휕푏 0 0 휕푏

So, we need to solve the following equation for 푎 and 푏.

2 휕 ∫ [푥2 − (푎푥 + 푏)]2푑푥 = 0 0 휕푎 2 휕 ∫ [푥2 − (푎푥 + 푏)]2푑푥 = 0 0 휕푏 Or,

2 ∫ 2[푥2 − (푎푥 + 푏)](−푥)푑푥 = 0 0 2 ∫ 2[푥2 − (푎푥 + 푏)](−1)푑푥 = 0 0 Your turn: Solve the above system by first performing the integration.

Mathcad solution

Refer to Problem 17 in Assignment 1 for additional practice. Discovering convercent series Consider the following square wave.

T = 2π

Its Fourier series expansion is given by (more on this in a later lecture):

1 1 1 푓(푡) = sin(푡) + sin(3푡) + sin(5푡) + sin(7푡) + ⋯ 3 5 7 1 1 1 with coefficients: 푎 = 1, 푎 = , 푎 = , 푎 = , … 1 2 3 3 5 4 7 Parseval’s Theorem: The energy in a periodic signal is equal to one half the sum of the squares of its Fourier series coefficients.

∞ 1 푇 1 ∫ 푓2(푡)푑푡 = ∑ 푎 2 푇 2 푘 0 푘=1 From the graph of the squared signal, the integral can be computed as the area under the curve as, 1 푇 휋2 ∫ 푓2(푡)푑푡 = 푇 0 16 The infinite sum ∞ 1 1 1 1 1 1 (1 + + + + ⋯ ) = ∑ 2 32 52 72 2 (2푘 + 1)2 푘=0

휋2 will then converge to (by Parseval’s theorem) and we can 16 then write,

∞ 1 휋2 ∑ = (2푘 + 1)2 8 푘=0

Your turn: Find the value of the maximum of 푦(푥) closest to 푥 = 1, where 푦(푥) = 3 cos(4휋푥 − 1.3) + 5cos (2휋푥 + 0.5) Hint, set the derivative of the function to zero. This gives rise to a nonlinear equation that you will have to solve numerically (think Matlab’s fzero solver) for 푥∗. Then the maximum of the function would be 푓(푥∗). Plot the function to get an idea about its shape first. Your turn: Evaluate the following expression.

Your Turn: Consider the parabola 푦(푥) = 푥2 and the inscribed triangles shown (blue and green). In order to simplify the , we will assume that middle vertex of the blue triangle is 푎+푏 at the point (푐, 푐2), where c is at the midpoint . Similarly, the 2 푐+푏 green triangle’s inner vertex is at (푑, 푑2) with 푑 = = 2 푎+푏 +푏 3 1 2 = 푏 + 푎. 2 4 4

Let 퐴1 and 퐴2 be the areas of the blue and green triangles, respectively. Show that: 퐴 1 2 = 퐴1 8 First, show that:

1 1 퐴 = |(푎 − 푏)3| and 퐴 = |(푎 − 푏)3| 1 8 2 64 Hint: The area of a triangle, specified by the coordinates of its vertices, is given by a special case of the Shoelace Formula for the area of a polygon (also known as Gauss's area formula, after , 1795): 1 퐴 = |푎 (푏 −푐 ) + 푏 (푐 −푎 ) + 푐 (푎 −푏 )| 2 푥 푦 푦 푥 푦 푦 푥 푦 푦

For fun! A person wakes up one day to find herself lost in a desert. She looks around and finds a shovel, a huge spool of lightweight rope (over a mile long!) and a note that read: “You are a rope’s length away from water. She survived by finding the water. How did she do it? For a very enlightening overview of the development of mathematics over the ages, consider watching the Netflix Series: The Story of Maths (narrated by , Professor of Mathematics at the University of Oxford). Also available on YouTube. For a “Light” watch this video by John Dersch* (2012): “History of Mathematics in 50 Minutes” https://www.youtube.com/shared?ci=dFG6xy-A3to

*John Dersch is a mathematics professor at Grand Rapids Community College located in Grand Rapids, Michigan.

Archimedes of Syracuse (287–212 BC) was a Greek mathematician, physicist, engineer, inventor, and astronomer. Although few details of his life are known, he is regarded as one of the leading scientists in classical antiquity. Generally considered the greatest mathematician of antiquity and one of the greatest of all time, Archimedes anticipated modern calculus and analysis by applying concepts of infinitesimals and the method of exhaustion to derive and rigorously prove a range of geometrical theorems, including the area of a circle, the surface area and volume of a sphere, and the area under a parabola.

Other mathematical achievements include deriving an accurate approximation of 휋, defining and investigating the spiral bearing his name, and creating a system using exponentiation for expressing very large numbers. He was also one of the first to apply mathematics to physical phenomena, founding hydrostatics and statics, including an explanation of the principle of the lever. He is credited with designing innovative machines, such as his screw pump, compound pulleys, and defensive war machines to protect his native Syracuse from invasion.