This notebook teaches how to represent smooth functions locally using Taylor and Maclaurin power series, and how to represent periodic and piecewise-smooth functions globally using Fourier trigonometric series. Learners will compute full and half-range Fourier expansions over arbitrary intervals and apply Dirichlet's convergence theorem to evaluate classical infinite numerical series.
Before you start: Higher-order derivatives of elementary functions; Definite integration and integration by parts; Trigonometric identities and values at integer multiples of pi.
Your path through this module
Local Approximation with Taylor and Maclaurin Series: Any infinitely differentiable function can be represented near a chosen center point as an infinite sum of powers whose coefficients are determined by the function's derivatives at that center.
Periodic Functions and Euler's Formulas for Fourier Series: A periodic, piecewise-smooth function on any interval of length 2L can be decomposed into an average value plus an infinite sum of sines and cosines whose coefficients are found by integrating the function against each harmonic.
Integration Shortcuts and Dirichlet's Convergence Theorem: By evaluating Euler integrals with tabular integration by parts and then plugging a specific x-value into Dirichlet's convergence formula, we can find exact closed-form sums for famous infinite numerical series.
Even and Odd Extensions and Half-Range Series: A function defined only on [0, L] can be mirrored evenly across the vertical axis to produce a pure cosine series, or mirrored oddly through the origin to produce a pure sine series.
Practice: Computing Maclaurin and Taylor Series: Find the general k-th derivative formula (or rewrite the expression in terms of a standard geometric series) to generate Taylor and Maclaurin expansions and identify their intervals of convergence.
Practice: Full Fourier Series on 2pi-Length Intervals: Break integrals across piecewise intervals on [-pi, pi] or [0, 2pi] and apply tabular integration by parts to find full Fourier expansions and sum classical series.
Practice: Full Fourier Series on Arbitrary Intervals [-L, L] and [0, 2L]: Replace nx with npix/L in Euler's formulas to handle arbitrary interval lengths, and combine evaluations at continuous and jump points to solve for multiple infinite series at once.
Practice: Half-Range Cosine Series on [0, L]: Extend a function on [0, L] as an even function to represent it purely with cosines, taking care to compute the n = 1 coefficient separately whenever a product-to-sum formula divides by n - 1.
Practice: Half-Range Sine Series on [0, L]: Extend a function on [0, L] as an odd function so that a0 = 0 and an = 0, leaving only a single sine integral bn to compute.
Local Approximation with Taylor and Maclaurin Series
You already know how to compute derivatives of all orders for elementary functions; now we use those derivatives at a single point to build an infinite polynomial that matches the function. This lets us replace complicated curves with simple addition and multiplication.
Imagine driving along a winding mountain road in heavy fog. Even if you only know your exact position, speed, and how fast you are turning the wheel right now, you can predict where the road goes for the next few meters. In mathematics, a smooth function is one you can differentiate infinitely many times without any sharp corners or breaks. An infinite power series is an endless polynomial built from powers of how far you step away from a starting point x0.
To make our polynomial match the function f(x) near the center pointx0, we force both to have the exact same value, slope, curvature, and higher derivatives at x0. This rule produces the Taylor series:
f(x)=k=0∑∞k!f(k)(x0)(x−x0)k
In plain words, each term adjusts the polynomial's k-th derivative to match f(k)(x0), while the factorial k! cancels out the constants that drop down during repeated differentiation. To see this, draw a wavy curve f(x) and mark a point x0. Draw a straight tangent line at x0 (using up to k=1); it hugs the curve right at x0. Now draw a parabola that also matches the second derivative (up to k=2); it bends with the curve and stays close over a wider stretch.
When we choose the origin x0=0 as our center, the formula simplifies and is called a Maclaurin series:
f(x)=k=0∑∞k!f(k)(0)xk
Rather than computing derivatives every time, engineers memorize four foundational Maclaurin expansions and their region of convergence, which is the set of x values where the infinite sum actually equals the function. You can also substitute algebraic expressions directly for x inside these series.
Function
Maclaurin Series
Region of Convergence
ex
1+x+2!x2+3!x3+⋯=∑k=0∞k!xk
All real x
sin(x)
x−3!x3+5!x5−⋯=∑k=0∞(−1)k(2k+1)!x2k+1
All real x
cos(x)
1−2!x2+4!x4−⋯=∑k=0∞(−1)k(2k)!x2k
All real x
1−x1
1+x+x2+x3+⋯=∑k=0∞xk
$
Worked example
Find the first three nonzero terms of the Taylor series for f(x)=ln(x) centered at x0=1, and find the Maclaurin series for g(x)=1+x21.
Evaluate derivatives at the center x0=1 to find the Taylor coefficients: We need the function value and derivatives at x0=1. Here f(1)=ln(1)=0, f′(x)=x−1 so f′(1)=1, f′′(x)=−x−2 so f′′(1)=−1, and f′′′(x)=2x−3 so f′′′(1)=2.
Assemble the Taylor series for ln(x): Plugging these numbers into the Taylor formula gives ln(x)=0+1!1(x−1)+2!−1(x−1)2+3!2(x−1)3+⋯=(x−1)−21(x−1)2+31(x−1)3−⋯.
Use algebraic substitution for g(x) to avoid taking derivatives: Rewrite g(x) as 1−(−x2)1 to match the standard geometric form 1−u1 with u=−x2.
Substitute into the known Maclaurin series: Replace x with −x2 in ∑k=0∞xk to get g(x)=1−x2+x4−x6+⋯=∑k=0∞(−1)kx2k, which converges when ∣−x2∣<1, or ∣x∣<1.
Remember
A Taylor series builds a polynomial around x=x0 using coefficients k!f(k)(x0); a Maclaurin series is simply a Taylor series centered at x0=0.
Memorize the Maclaurin series for ex, sin(x), cos(x) (valid for all x) and 1−x1 (valid for ∣x∣<1).
Obtain new series quickly by substituting algebraic terms into the four standard series instead of differentiating from scratch.
Periodic Functions and Euler's Formulas for Fourier Series
In the previous lesson, we built Taylor series for smooth functions around a single point. Now we will represent repeating signals—even those with sharp corners or sudden jumps—using an infinite sum of sines and cosines across a whole interval.
Think of an electrocardiogram (ECG) trace or a blinking turn signal: the same pattern repeats over and over. A periodic function satisfies f(x+T)=f(x) for all x, where the smallest positive shift T is the fundamental period. For convenience in formulas, we write this period as T=2L, where L is the half-period. Any interval of length 2L, written [c,c+2L], captures one full cycle and is called a fundamental interval. On a graph, if you trace the curve from x=−L to x=L (or from 0 to 2L) and slide that cutout sideways by 2L, it lands right back on the graph.
Real engineering signals, like a switch flipping on and off, cannot be expanded in Taylor series because derivatives fail at jumps. Instead, we only require the signal to obey Dirichlet's conditions on one period: it must have a finite number of maxima and minima, and be piecewise continuous. Piecewise continuous means the graph is made of unbroken smooth pieces separated by a finite number of jump discontinuities—places where the graph steps instantaneously from a finite left-hand value to a finite right-hand value without shooting to infinity.
Just as a musical chord can be separated into pure tuning-fork notes, any periodic function meeting Dirichlet's conditions can be written as a Fourier trigonometric seriesS(x):
S(x)=2a0+n=1∑∞(ancosLnπx+bnsinLnπx)
In words, the function is built from a constant baseline 2a0 plus waves of frequency Lnπ, called harmonics. To find how much of each wave is inside f(x), we use Euler's formulas over any one period [c,c+2L]:
Here, 2a0 is simply the average height of the graph over one cycle. On a standard interval like [−π,π] or [0,2π], the half-period is L=π, so Lnπx simplifies nicely to nx.
Worked example
Find the Fourier series for the square wave f(x)=0 on (−2,0) and f(x)=4 on (0,2), repeated with period 2L=4.
Identify the half-period and check Dirichlet's conditions: The fundamental interval is [−2,2] of length 2L=4, so L=2. The graph has two flat pieces and finite jumps at x=0 and x=2, so Dirichlet's conditions hold.
Compute a0 to find the average height: Set c=−2 and L=2 in Euler's formula. Since f(x)=0 on (−2,0), integrate only from 0 to 2:
Always divide the full period T by 2 to get the half-period L before writing Euler's formulas.
The constant term in the series is 2a0 (the average value over one period), so take care not to forget the factor of 21.
When f(x) is defined in pieces, split each Euler integral into matching sub-intervals.
Integration Shortcuts and Dirichlet's Convergence Theorem
Now that you can set up Euler's integrals for a Fourier series, you need fast shortcuts to evaluate them and a rule to know what the infinite sum actually equals at any point, enabling you to sum famous numerical series.
When a periodic signal is a ramp or parabola, Euler's formulas require integrating a polynomial u(x) times a wave v(x). Doing integration by parts repeatedly is slow and error-prone. Instead, we use Bernoulli's generalized integration by parts (often called tabular integration), where you differentiate u until it vanishes and repeatedly integrate v:
∫uvdx=uv1−u′v2+u′′v3−u′′′v4+⋯
Here u′,u′′ are successive derivatives of u, and v1,v2,v3 are successive integrals of v. In words: multiply each derivative of the polynomial by the next integral of the wave, alternating plus and minus signs.
Other signals decay like a plucked guitar string or beat like two tuning forks. To integrate a decaying wave eax times cos(bx) or sin(bx), or the product of two waves, use these direct shortcuts:
When you plug integration limits like π or −π into your results for an integer n, always simplify using sin(nπ)=0 and cos(nπ)=(−1)n. On a unit circle, stepping by n half-turns always lands on the horizontal axis, alternating between −1 and +1.
Once you build the series, does it equal f(x)? Imagine tracing a square wave: at a vertical cliff, the smooth waves cannot be in two places at once, so they split the difference. A jump discontinuity is a point x0 where the left-hand limitf(x0−) (value approached from the left) and right-hand limitf(x0+) (value approached from the right) are finite but unequal. Dirichlet's convergence theorem states that for a periodic, piecewise-smooth function, the Fourier series at any x0 converges to the midpoint of the left and right limits:
S(x0)=2f(x0−)+f(x0+)
If you draw a vertical jump from height 1 to height 3 at x0, place a solid dot at height 2; the series lands on that dot. Where f is continuous, both limits equal f(x0), so the series equals f(x0). Substituting a clever x0 turns the function series into an exact sum for a numerical series.
Worked example
Given that f(x)=x2 on (−π,π) with period 2π has a0=32π2 and bn=0, find an and evaluate ∑n=1∞n21.
Integrate using Bernoulli's formula: To find an=π1∫−ππx2cos(nx)dx, set u=x2 and v=cos(nx) so we avoid integrating by parts twice.
Simplify at the limits: Because sin(nπ)=0 and cos(nπ)=(−1)n, the sine terms vanish and the cosine term doubles:
an=π1[n22π(−1)n−n22(−π)(−1)n]=n24(−1)n
Apply Dirichlet's theorem at x=π: The periodic extension of x2 is continuous at x=π, since f(π−)=π2 and by periodicity f(π+)=f(−π+)=(−π)2=π2. Plugging x=π into the Fourier series gives:
π2=3π2+n=1∑∞n24(−1)ncos(nπ)
Solve for the numerical sum: Replace cos(nπ) with (−1)n, note that (−1)n(−1)n=1, and isolate the sum:
32π2=4n=1∑∞n21⟹n=1∑∞n21=6π2
Remember
Use Bernoulli's formula ∫uvdx=uv1−u′v2+u′′v3−⋯ when u is a polynomial.
For any integer n, always simplify sin(nπ)=0 and cos(nπ)=(−1)n.
By Dirichlet's theorem, a Fourier series converges to f(x0) at continuous points and to 2f(x0−)+f(x0+) at jumps.
Even and Odd Extensions and Half-Range Series
In the previous lessons, you learned how to find full Fourier series by integrating both cosines and sines over a full period [−L,L]. Now, you will use symmetry to cut that work in half and represent a function defined only on [0,L] using purely cosines or purely sines.
Imagine folding a sheet of paper along the vertical y-axis. An even function matches up with itself when folded across the y-axis, so f(−x)=f(x), like cos(x) or x2. On a symmetric interval [−L,L], the signed area of an even function on the left equals the area on the right: ∫−LLf(x)dx=2∫0Lf(x)dx. An odd function matches up only if you fold across the y-axis and then flip across the x-axis, so f(−x)=−f(x), like sin(x) or x. Because its left and right areas have opposite signs, the symmetric integral of an odd function is zero: ∫−LLf(x)dx=0.
In engineering, a signal or a vibrating string of length L is often defined only on [0,L]. Since we do not care what happens for negative x, we can invent the left half on [−L,0] to create symmetry. An even periodic extension reflects the graph across the y-axis onto [−L,0] and repeats it every 2L, while an odd periodic extension reflects the graph across the y-axis and then flips it upside down across the x-axis before repeating.
Because the product of an even and an odd function is always odd, choosing an extension zeroes out half the Euler coefficients and yields a half-range series valid on [0,L]:
Extension Type
Visual on [−L,L]
Zero Terms
Remaining Coefficients (Double the [0,L] integral)
Series on [0,L]
Even (Half-Range Cosine)
Mirror across y-axis
bn=0
a0=L2∫0Lf(x)dx, an=L2∫0Lf(x)cos(Lnπx)dx
2a0+∑n=1∞ancos(Lnπx)
Odd (Half-Range Sine)
Flip through origin
a0=0,an=0
bn=L2∫0Lf(x)sin(Lnπx)dx
∑n=1∞bnsin(Lnπx)
Worked example
Find the half-range sine series for f(x)=1 on [0,π].
Choose the extension: A half-range sine series requires an odd extension, so a0=0 and an=0 automatically.
Set up the sine coefficient bn: With L=π, double the integral over the half-period [0,π]: bn=π2∫0π1⋅sin(nx)dx.
Integrate and simplify: Evaluating gives bn=π2[−ncos(nx)]0π=nπ2(1−(−1)n). This equals 0 for even n and nπ4 for odd n.
Write the series: Summing over odd integers n=1,3,5,… gives f(x)∼π4(sin(x)+3sin(3x)+5sin(5x)+…).
Remember
Even × Even = Even, Odd × Odd = Even, and Even × Odd = Odd.
On [−L,L], the integral of an odd function is 0; the integral of an even function is 2∫0L.
On [0,L], mirror evenly across the y-axis for a pure cosine series (bn=0), or flip oddly through the origin for a pure sine series (a0=an=0).
Practice: Computing Maclaurin and Taylor Series
With the theory of Taylor and Maclaurin series in place, we now practice deriving power series expansions from higher-order derivative patterns and algebraic substitutions. You will find the general k-th derivative formula or rewrite an expression in terms of a standard geometric series to generate expansions and identify their intervals of convergence.
The idea
Writing out the first three or four terms of a Taylor or Maclaurin series is straightforward, but writing the infinite sum requires a general formula for the k-th derivative, f(k)(x). By computing the first few derivatives before plugging in the center x0, you can spot how signs alternate, how factorials grow from repeated power-rule steps, or how trigonometric functions cycle every four derivatives. Once you write f(k)(x0) in terms of k, dividing by k! often cancels factorial factors cleanly.
For rational functions, repeated differentiation produces a geometric series whose terms are powers of (x−x0). Once you know the basic Maclaurin expansion 1−u1=1+u+u2+u3+…, which converges on the interval of convergence∣u∣<1, you do not need to differentiate from scratch every time. You can factor out constants to create a leading 1 in the denominator and substitute a rescaled variable u directly into the known series. The series is valid wherever the substituted expression satisfies ∣u∣<1.
Worked example
Given: The exponential function f(x)=ex centered at x0=0.
Find: The Maclaurin series expansion of f(x).
Evaluate the function at the center x0=0: f(0)=e0=1, which gives the constant term.
Compute the first few derivatives at x=0: since f′(x)=ex and f′′(x)=ex, we get f′(0)=1 and f′′(0)=1.
State the general k-th derivative pattern: because ex is its own derivative, f(k)(x)=ex, so f(k)(0)=1 for all k≥0.
Substitute f(k)(0)=1 into the Maclaurin formula ∑k=0∞k!f(k)(0)xk to write out the expansion.
Answer:1+x+2!x2+⋯+k!xk+…
More problems
Problem Q(i): Maclaurin series for the decaying exponential
Given: The function f(x)=e−x for all x∈R.
Find: The Maclaurin series of f(x).
By the chain rule, each derivative of e−x multiplies by −1, giving f(k)(0)=(−1)k (or substitute −x into the series for ex).
Substitute these coefficients into the Maclaurin series formula to get the alternating expansion.
Answer:1−x+2!x2−3!x3+…
Problem Q(ii): Maclaurin series for the basic geometric fraction
Given: The function f(x)=1−x1 in the region ∣x∣<1.
Find: The Maclaurin series of f(x).
Differentiate f(x)=(1−x)−1 repeatedly using the chain rule to find f(k)(x)=(1−x)k+1k!, so f(k)(0)=k!.
Divide f(k)(0)=k! by k! in the Maclaurin formula, leaving a coefficient of 1 on every power xk.
Answer:1+x+x2+x3+…
Problem 1: Maclaurin series for the sine function
Given: The trigonometric function f(x)=sinx.
Find: The Maclaurin series of f(x).
Evaluate the function and its first four derivatives at 0: f(0)=0, f′(0)=cos0=1, f′′(0)=−sin0=0, f′′′(0)=−cos0=−1, and f(4)(0)=sin0=0.
Group the derivatives into even and odd orders: for k≥0, all even derivatives vanish (f(2k)(0)=0) because sin0=0.
Write the odd derivative formula: f(2k+1)(x)=(−1)kcosx, which gives f(2k+1)(0)=(−1)k for k≥0.
Substitute the non-zero odd terms into the Maclaurin formula to obtain the odd-power series.
Answer:x−3!x3+5!x5−⋯=∑k=0∞(−1)k(2k+1)!x2k+1
Problem 2: Maclaurin series for the cosine function
Given: The trigonometric function f(x)=cosx.
Find: The Maclaurin series of f(x).
Evaluate the derivatives of cosx at x=0: odd derivatives contain sin0 and vanish, while even derivatives alternate as f(2k)(0)=(−1)k.
Substitute the even-order derivatives into the Maclaurin series formula.
Answer:1−2!x2+4!x4−⋯=∑k=0∞(−1)k(2k)!x2k
Problem 3: Maclaurin series for an alternating rational function
Given: The function f(x)=1+x1 for ∣x∣<1.
Find: The Maclaurin series of f(x).
Compute the value and first two derivatives at x=0: f(0)=1, f′(x)=(1+x)2−1⟹f′(0)=−1, and f′′(x)=(1+x)32⟹f′′(0)=2.
Compute the third and fourth derivatives to see the factorial pattern: f′′′(x)=(1+x)4−2⋅3⟹f′′′(0)=−3! and f(4)(x)=(1+x)52⋅3⋅4⟹f(4)(0)=4!.
State the general k-th derivative at x=0: f(k)(0)=(−1)kk!.
Substitute f(k)(0) into the Maclaurin formula and cancel k! in the numerator and denominator.
Watch out. The k-th derivative of (1+x)−1 has denominator (1+x)k+1, not (1+x)k; at x=0 both equal 1, so f(k)(0)=(−1)kk! is unaffected.
Answer:1−x+x2−x3+⋯=∑k=0∞(−1)kxk
Problem Q(1): Taylor series of the reciprocal function at x = 1
Given: The function f(x)=x1 about x0=1 in the region ∣x−1∣<1.
Find: The Taylor series of f(x) at x=1.
Evaluate f(x) and its first four derivatives at x0=1: f(1)=1, f′(1)=−1, f′′(1)=2, f′′′(1)=−3!, and f(4)(1)=4!.
Write the general derivative value at x0=1: f(k)(1)=(−1)kk! for k≥1 (and k=0).
Substitute f(k)(1) into the Taylor formula ∑k=0∞k!f(k)(1)(x−1)k and cancel k! to get powers of (x−1).
Watch out. The k-th derivative of x−1 is xk+1(−1)kk! (exponent k+1, not k), which still evaluates to (−1)kk! at x=1.
Answer:1−(x−1)+(x−1)2−(x−1)3+⋯=∑k=0∞(−1)k(x−1)k
Problem Q(2): Taylor series of a shifted rational function at x = 1
Given: The function f(x)=1+x1 at x0=1 in the region ∣x−1∣<1.
Find: The Taylor series of f(x) at x=1.
Evaluate f(x) and its first two derivatives at x0=1: f(1)=21, f′(x)=(1+x)2−1⟹f′(1)=−41, and f′′(x)=(1+x)32⟹f′′(1)=232.
Evaluate the third and fourth derivatives at x0=1: f′′′(1)=24−3! and f(4)(1)=254!.
Write the general k-th derivative formula at x0=1: from f(k)(x)=(1+x)k+1(−1)kk!, we have f(k)(1)=2k+1(−1)kk! for k≥0.
Substitute f(k)(1) into the Taylor formula ∑k=0∞k!f(k)(1)(x−1)k and cancel k! in each term.
Problem Q(3): Maclaurin series by algebraic factoring and substitution
Given: The function f(x)=2−x3 in the region ∣x∣<2.
Find: The Maclaurin series of f(x).
Factor 2 from the denominator so the constant term becomes 1: f(x)=23(1−x/21).
Recall the standard geometric Maclaurin series 1−u1=1+u+u2+u3+… for ∣u∣<1.
Check the convergence condition: since ∣x∣<2, the rescaled variable satisfies ∣2x∣<1.
Replace u with 2x in the geometric series and multiply by 23.
Answer:23(1+2x+(2x)2+(2x)3+…)
Practice: Full Fourier Series on 2pi-Length Intervals
Having mastered power series at a point, we now practice computing full trigonometric Fourier series on standard 2π intervals for square waves and polynomials. The new skill here is breaking Euler's integrals across piecewise subintervals on [−π,π] or [0,2π] and applying tabular integration by parts to find full Fourier expansions and sum classical infinite series.
The idea
When a function f(x) has period 2L=2π, the harmonic factor Lnπx simplifies directly to nx. Whether the base interval is [−π,π] (where c=−π) or [0,2π] (where c=0), Euler's formulas take the streamlined form:
Two integration techniques handle almost every problem on these intervals. First, if f(x) is a piecewise-constant square wave with jump discontinuities, split each Euler integral into separate integrals over each subinterval where the formula for f(x) is constant. Second, if f(x) is a polynomial, use Bernoulli's integration by parts (tabular integration):
∫uvdx=uv1−u′v2+u′′v3−…
where u is the polynomial differentiated until it vanishes, and v1,v2,v3,… are successive antiderivatives of cos(nx) or sin(nx).
Once you assemble the Fourier seriesS(x)=a0+∑n=1∞[ancos(nx)+bnsin(nx)], you can sum numerical series by applying Dirichlet's convergence theorem: at any point x where f(x) is continuous, the series converges directly to the function value, S(x)=f(x).
Worked example
Problem 2:Given:f(x)={−K,K,−π<x<00<x<π on (−π,π) with K>0.
Find: The Fourier series of f(x) and the sum of 1−31+51−…
Split the a0 integral at the jump x=0 because f(x) changes formula there:
a0=2π1[∫−π0(−K)dx+∫0πKdx]=2π1[−Kπ+Kπ]=0
Split the an integral at x=0 and integrate cos(nx), which vanishes because sin(nπ)=sin(0)=0:
an=π1[[n−Ksin(nx)]−π0+[nKsin(nx)]0π]=0
Split the bn integral at x=0 and integrate sin(nx) to get cosine terms:
bn=π1[[nKcos(nx)]−π0+[n−Kcos(nx)]0π]
Evaluate at the limits using cos(−nπ)=cos(nπ)=(−1)n to simplify bn:
bn=nπK[2−2cos(nπ)]=nπ2K(1−(−1)n)
Substitute a0, an, and bn into S(x), noting that 1−(−1)n equals 2 for odd n and 0 for even n:
f(x)=π4K[sinx+31sin(3x)+51sin(5x)+…]
Substitute x=2π, where f(x) is continuous with f(2π)=K, to evaluate the alternating series:
K=π4K(1−31+51−…)⟹1−31+51−⋯=4π
Answer:f(x)=π4K[sinx+31sin(3x)+51sin(5x)+…], and 1−31+51−⋯=4π.
More problems
Problem 3: Periodic square wave on [0, 2pi]
Given:f(x)=⎩⎨⎧K,−K,K,0≤x<π/2π/2≤x<3π/23π/2≤x<2π on [0,2π].
Find: The Fourier series of f(x) and the sum of 1−31+51−…
Split the a0 integral across the three subintervals to find the average value:
a0=2πK[(2π−0)−(23π−2π)+(2π−23π)]=0
Integrate f(x)cos(nx) across all three subintervals:
Combine a0, an, and bn into the Fourier series:
S(x)=12π2+n=1∑∞n21cos(nx)
Substitute x=0, where the periodic extension is continuous with f(0)=4π2, to evaluate the sum:
4π2=12π2+n=1∑∞n21⟹n=1∑∞n21=6π2
Figure: Graph of the periodic function (pi - x)^2 / 4
A 2D coordinate graph titled 'Figure 4.7 : Graph of the periodic function (pi - x)^2 / 4'. A horizontal axis (x-axis) with a rightward-pointing arrowhead at the right end is marked from left to right with values -2pi, -pi, 0, pi, 2pi, 3pi, and 4pi. A vertical axis (y-axis) with an upward-pointing arrowhead at the top intersects the horizontal axis at 0 and has tick labels 1 and 3 to the left of the axis. The plotted curve consists of three repeating, upward-opening parabolic segments over the intervals [-2pi, 0], [0, 2pi], and [2pi, 4pi], representing the 2pi-periodic extension of f(x) = (pi - x)^2 / 4. The curve touches the horizontal axis (minimum y = 0) at x = -pi, pi, and 3pi, and rises to sharp peaks (cusps at y = pi^2 / 4, slightly below the label 3) at x = -2pi, 0, 2pi, and 4pi.
Watch out. When differentiating (π−x)2 during tabular integration, do not forget the inner derivative (−1): its first derivative is −2(π−x) and its second derivative is +2.
Answer:S(x)=12π2+∑n=1∞n21cos(nx), and ∑n=1∞n21=6π2.
Problem 5: Absolute value function on [-pi, pi]
Given:f(x)=∣x∣ on [−π,π].
Find: The Fourier series of f(x) and the sum of 1+321+521+…
Split the integral at x=0 where ∣x∣ changes from −x to x to compute a0:
a0=2π1[∫−π0(−x)dx+∫0πxdx]=2π1[2π2+2π2]=2π
Integrate ∣x∣cos(nx) by parts across [−π,0] and [0,π]:
an=π2[xnsin(nx)+n2cos(nx)]0π=πn22[(−1)n−1]
Integrate ∣x∣sin(nx) across [−π,0] and [0,π], where the two halves cancel by odd symmetry:
bn=π1[∫−π0(−x)sin(nx)dx+∫0πxsin(nx)dx]=0
Write the Fourier series keeping only odd n where (−1)n−1=−2:
S(x)=2π−π4[12cosx+32cos(3x)+52cos(5x)+…]
Substitute x=0, where f(x)=∣x∣ is continuous with f(0)=0, to evaluate the sum:
0=2π−π4[1+321+521+…]⟹1+321+521+⋯=8π2
Answer:S(x)=2π−π4∑n=1,3,5,…∞n2cos(nx), and 1+321+521+⋯=8π2.
Problem 6: Product x sin(x) on (-pi, pi)
Given:f(x)=xsinx on −π<x<π.
Find: The Fourier series of f(x) and the sums (i) 1+1⋅32−3⋅52+5⋅72−… and (ii) 1⋅31−2⋅41+3⋅51−…
Integrate xsinx by parts on (−π,π) to find a0:
a0=2π1[−xcosx+sinx]−ππ=2π1[−2πcosπ]=1
Compute a1 separately because sinxcosx=21sin(2x) prevents division by n2−1:
Answer:S(x)=1−21cosx+2∑n=2∞n2−1(−1)n+1cos(nx); (i) 2π; (ii) 41.
Practice: Full Fourier Series on Arbitrary Intervals [-L, L] and [0, 2L]
Now that you can expand functions with period 2π, we extend the exact same method to functions of any period 2L by scaling the harmonic arguments. In this section, you will replace nx with Lnπx in Euler's formulas to handle arbitrary interval lengths, and combine evaluations at continuous and jump points to solve for multiple infinite series at once.
The idea
Standard sines and cosines repeat every 2π units, so they cannot directly build a function that repeats every 2L units. By replacing the argument nx with the scaled frequencyLnπx, each wave completes exactly n full cycles as x travels across an interval of length 2L. Whether the base interval is symmetric like [−L,L] or shifted like [0,2L], the half-period L is always half the total interval length.
With this scaling, the Fourier series becomes S(x)=a0+∑n=1∞[ancos(Lnπx)+bnsin(Lnπx)]. In Euler's integrals, the front multiplier π1 becomes L1 (and 2π1 becomes 2L1 for a0). When you integrate cos(Lnπx) or sin(Lnπx) by parts, each antiderivative step brings out a factor of nπL instead of n1. At the interval boundaries x=±L or x=2L, the scaled angles simplify cleanly to multiples of nπ, where sin(nπ)=0 and cos(nπ)=(−1)n.
Once you have the series, you can evaluate multiple numerical sums from a single expansion. Evaluating S(x) at an interior point where f(x) is continuous gives one series, while evaluating at a jump discontinuity (including the endpoints where the periodic copies meet) gives a second series via the average 2f(x+)+f(x−). Adding or subtracting those two results isolates even-term or odd-term sub-series.
Worked example
Problem 4.2.10.Given:f(x)=x∣x∣ on the interval (−1,1).
Find: The Fourier series S(x) on (−1,1).
Find the half-period L from the interval length 2L=1−(−1)=2, which gives L=1 and harmonic arguments 1nπx=nπx.
Check symmetry on (−1,1): since f(−x)=(−x)∣−x∣=−x∣x∣=−f(x), the function is odd, so a0=0 and an=0 because the product of an odd function and an even cosine is odd.
Set up the sine coefficient integral using even symmetry of f(x)sin(nπx), and replace ∣x∣ with x since x>0 on (0,1):
bn=11∫−11x∣x∣sin(nπx)dx=2∫01x2sin(nπx)dx
Apply tabular integration by parts three times to integrate x2sin(nπx), dividing by nπ at each step:
Substitute a0, an, and bn into the Fourier series expansion.
Figure: Graph of periodic function e^-x
Figure 4.13: Graph of periodic function e^-x. A two-dimensional Cartesian coordinate graph with a horizontal axis pointing right and a vertical axis pointing up through 0. The horizontal axis has tick marks labeled -2, -1, 0, 1, and 2. The vertical axis has the value 1 labeled just to the left of the axis at the peak of the curve at x = 0. Four identical decreasing, concave-up exponential curve segments are drawn across the intervals [-2, -1], [-1, 0], [0, 1], and [1, 2], each starting at a height of 1 at the left endpoint of its interval and decaying to a smaller positive height at the right endpoint. Vertical dashed lines at x = -1 and x = 1 connect the lower end of one curve segment to the upper starting point (height 1) of the next segment.
Watch out. In steps 3 and 4, the integral starts with upper limit 2, but the evaluation switches the upper limit to 1, producing e−1(−1)n instead of e−2.
For (ii), evaluate at the endpoint jump x=0, using f(0+)=0 and f(0−)=f(3)=−3:
20+(−3)=−π29n=1∑∞n21⟹121+221+321+⋯=6π2
For (iii), average the series from (i) and (ii) so the even-indexed terms cancel out:
21(12π2+6π2)=121+321+521+⋯=8π2
Figure: Graph of periodic function 2x - x^2
Coordinate graph titled 'Figure 4.12 : Graph of periodic function 2x - x^2' with period 3. The horizontal x-axis has a right-pointing arrowhead and tick marks labelled -3, -2, -1, 0, 1, 2, 3, 4, 5, 6. The vertical y-axis has an upward-pointing arrowhead and tick marks labelled -3, -2, -1, 1. Three identical downward-opening parabolic segments are plotted over consecutive intervals of length 3: the first on [-3, 0] passing through (-3, 0), vertex (-2, 1), (-1, 0), and ending at (0, -3); the second (drawn with a thicker line) on [0, 3] passing through the origin (0, 0), vertex (1, 1), x-intercept (2, 0), and ending at (3, -3), with a vertical dashed line connecting (3, 0) down to (3, -3); the third on [3, 6] passing through (3, 0), vertex (4, 1), x-intercept (5, 0), and ending at (6, -3).
Answer:S(x)=∑n=1∞[−n2π29cos32nπx+nπ3sin32nπx]; (i) 12π2; (ii) 6π2; (iii) 8π2.
Practice: Half-Range Cosine Series on [0,L]
You already know how to integrate over a full interval [−L,L] to find both cosine and sine coefficients. Instead of integrating over a full period, we now practice extending a function evenly on [0,L] so that bn=0 and only cosine coefficients need to be computed. We also take care to compute the n=1 coefficient separately whenever a product-to-sum formula divides by n−1.
The idea
When a function f(x) is given only on the half-interval [0,L], we can mirror its graph across the vertical axis to create an even extensionF(x) on [−L,L], where F(x)=f(−x) for −L<x≤0 and F(x)=f(x) for 0≤x<L. Repeating this symmetric shape every 2L units produces an even periodic extension.
Figure: Graph of f(x)
Coordinate axes for Figure 4.15 ('Graph of f(x)'). A horizontal axis (with a rightward arrowhead at the right end) intersects a vertical axis (with an upward arrowhead at the top end) at the origin, which is labelled '0' in the fourth quadrant just below the horizontal axis and to the right of the vertical axis. A tick mark to the right of the origin on the horizontal axis is labelled 'L'. In the first quadrant, over the interval from 0 to L, a smooth curve labelled 'f(x)' starts at a positive height on the vertical axis (at x = 0), dips slightly to a local minimum, and then rises to a higher positive value above the tick mark L (at x = L).
Figure: Graph of even extension of f(x)
Coordinate axes for Figure 4.16 ('F(x) : Graph of even extension of f(x)'). A horizontal axis (with a rightward arrowhead) intersects a vertical axis (with an upward arrowhead) at the origin, labelled '0'. Two tick marks on the horizontal axis are symmetrically placed on either side of the origin: '-L' to the left and 'L' to the right. Above the horizontal axis over the interval [-L, L] is a continuous curve symmetric about the vertical axis and labelled 'f(x)' in the first quadrant. On [0, L] it is the same curve as in Figure 4.15 (starting at a positive y-intercept, dipping slightly, then rising to a maximum at x = L), and on [-L, 0] it is its mirror image across the vertical axis (starting at the same high value at x = -L, dipping slightly to a local minimum, and rising slightly to meet the positive y-intercept at x = 0).
Figure: Graph of even periodic extension of f(x)
Coordinate axes for Figure 4.17 ('Graph of even periodic extension of f(x)'). A horizontal axis (with a rightward arrowhead) intersects a vertical axis (with an upward arrowhead) at the origin, labelled '0'. Tick marks along the horizontal axis from left to right are labelled '-2L', '-L', '0' (at the vertical axis), 'L', and '2L'. Above the horizontal axis is a continuous, wave-like periodic curve with period 2L, symmetric about the vertical axis and labelled 'f(x)' in the first quadrant. The even extension pattern from [-L, L] repeats periodically across [-2L, -L] and [L, 2L], showing peaks at x = -L and x = L, and dipping segments with a slight central bump around x = -2L, x = 0, and x = 2L.
Because F(x) is symmetric across the vertical axis, its product with sin(nπx/L) is odd, forcing every sine coefficient bn to be zero. The products for a0 and an are even, so integrating from −L to L is just twice the integral from 0 to L. This gives the half-range cosine seriesS(x)=a0+∑n=1∞ancos(Lnπx) on 0<x<L, with coefficients:
a0=L1∫0Lf(x)dx,an=L2∫0Lf(x)cos(Lnπx)dx
When f(x) contains a sine or cosine factor, rewrite the integrand using a product-to-sum identity before integrating. If the resulting general formula for an has n−1 in the denominator, that formula is invalid for n=1; you must plug n=1 directly into the original integral to compute a1 separately. Finally, because an even extension matches at x=0 (F(0+)=F(0−)=f(0)) and at x=L (F(L−)=F((−L)+)=f(L)), the periodic extension is continuous at both endpoints whenever f(x) is continuous on [0,L], allowing you to evaluate S(x)=f(x) right at x=0 or x=L to sum numerical series.
Worked example
Problem 4.3.1: Find the half-range cosine series of ex in [0,1], and hence evaluate ∑n=1∞1+n2π2e(−1)n−1.
Given:f(x)=ex on [0,1], so the half-period is L=1.
Find: The half-range cosine series S(x) and the sum ∑n=1∞1+n2π2e(−1)n−1.
Write the half-range cosine series form for L=1, where cos(nπx/L) simplifies to cos(nπx):
S(x)=a0+n=1∑∞ancos(nπx)
Compute the average value a0 by integrating ex over [0,1]:
a0=11∫01exdx=[ex]01=e−1
Set up the integral for an on [0,1] and apply the standard exponential-cosine antiderivative formula:
Figure 4.18: Graph of even periodic extension of e^x. A two-dimensional Cartesian coordinate graph with a horizontal x-axis (with a right-pointing arrowhead) and a vertical y-axis (with an upward-pointing arrowhead) intersecting at the origin. The horizontal axis has tick marks labeled -3, -2, -1, 0, 1, 2, 3. The vertical axis has tick marks labeled 1 and 2 above the origin. A continuous, symmetric, periodic wave is plotted across the interval from x = -3 to x = 3: on [0, 1] it follows the curve y = e^x from (0, 1) up to a sharp peak of height e (just above y = 2) at x = 1; on [-1, 0] it is the reflection y = e^(-x) from the peak at (-1, e) down to the cusp minimum at (0, 1); this V-shaped exponential pattern repeats periodically with period 2, having local minima (cusps) of y = 1 at x = -2, 0, 2 and local maxima (peaks) of y = e at x = -3, -1, 1, 3.
Answer:S(x)=e−1+∑n=1∞1+n2π22[e(−1)n−1]cos(nπx), and the sum is 22−e.
More problems
Problem 4.3.4: Half-range cosine series of x2 on [0,5]
Given:f(x)=x2 on [0,5], so L=5.
Find: The half-range cosine series of f(x) and the sum 1−221+321−⋯.
Compute a0 by integrating x2 over [0,5]:
a0=51∫05x2dx=51[3x3]05=325
Integrate an=52∫05x2cos(5nπx)dx using tabular integration by parts:
Figure 4.21: Graph of even periodic extension of x^2. A 2D Cartesian coordinate graph with a horizontal axis pointing right (with an arrowhead at the right end) and a vertical axis pointing up through the origin (with an arrowhead at the top). Along the horizontal axis, tick marks and labels are shown below the axis at -10, -5, 0, 5, and 10. Along the vertical axis, the value 25 is labelled to the left of the axis at the level of the curve's peaks. The plotted curve is an even, periodic function of period 10 consisting of three contiguous upward-opening parabolic arches: the central arch y = x^2 has its vertex tangent to the horizontal axis at (0, 0) and rises symmetrically to sharp peaks (cusps) at (-5, 25) and (5, 25); the left arch y = (x + 10)^2 has its vertex tangent to the horizontal axis at (-10, 0), meeting the central arch at the peak (-5, 25) and rising to height 25 on the far left (at x = -15); the right arch y = (x - 10)^2 has its vertex tangent to the horizontal axis at (10, 0), meeting the central arch at the peak (5, 25) and rising to height 25 on the far right (at x = 15).
Answer:S(x)=325+π2100∑n=1∞n2(−1)ncos(5nπx), and the sum is 12π2.
Problem 4.3.2: Half-range cosine series of sinx on [0,π/2]
Given:f(x)=sinx on [0,π/2], so L=π/2.
Find: The half-range cosine series of sinx and the sum 1⋅31+3⋅51+5⋅71+⋯.
With L=π/2, note that cos(nπx/L)=cos(2nx) and compute a0:
a0=π2∫0π/2sinxdx=π2[−cosx]0π/2=π2
Set up an and rewrite sinxcos(2nx) using 2sinAcosB=sin(A+B)+sin(A−B):
Figure: Graph of even periodic extension of sin(x)
A coordinate graph captioned 'Figure 4.19 : Graph of even periodic extension of sin(x)', showing the rectified sine wave |sin(x)| over the interval [-pi, 2pi]. The horizontal axis has an arrowhead on the right and is marked from left to right with labels -pi, -pi/2, 0, pi/2, pi, and 2pi. The vertical axis intersects the horizontal axis at 0, has an arrowhead at the top, and has a tick mark labeled 1 corresponding to the maximum height of the curve. The graph consists of three identical upward-curving half-sine arches above the horizontal axis: the first starts at (-pi, 0), reaches a peak of height 1 at x = -pi/2, and returns to (0, 0); the second starts at (0, 0), reaches a peak of height 1 at x = pi/2, and returns to (pi, 0); the third starts at (pi, 0), reaches a peak of height 1 halfway between pi and 2pi, and returns to (2pi, 0).
Answer:S(x)=π2−π4∑n=1∞4n2−11cos(2nx), and the sum is 21.
Problem 4.3.5: Piecewise linear function on [0,l]
Given:f(x)=5x on [0,l/2] and f(x)=5(l−x) on [l/2,l), so L=l.
Find: The half-range cosine series of f(x).
Split the a0 integral at x=l/2 and integrate both linear pieces:
Watch out. Because the general formula for an divides by n−1, you must start the summation at n=2 and add the separately computed a1cosx term in front.
Figure: Graph of even periodic extension of x sin(x)
Figure 4.20: Graph of the even periodic extension of x sin(x). A 2D coordinate plot with a horizontal axis pointing right and a vertical axis pointing up. The horizontal axis has tick marks and labels at -2π, -π, 0, π, and 2π (and unlabelled intercepts at -3π and 3π). The vertical axis has tick marks and labels at 1 and 2. On the fundamental interval [-π, π], the curve is symmetric about the vertical axis: it has a smooth local minimum tangent to the horizontal axis at (0, 0), rises to rounded peaks of height slightly below 2 on either side of the vertical axis (around x ≈ ±2.03), and falls steeply to sharp cusps on the horizontal axis at (-π, 0) and (π, 0). This two-humped pattern repeats periodically with period 2π over [-3π, -π] (touching (-2π, 0) smoothly between two peaks) and [π, 3π] (touching (2π, 0) smoothly between two peaks).
Answer:S(x)=1−21cosx+2∑n=2∞(n−1)(n+1)(−1)n−1cos(nx), and the sum is 4π−2.
Practice: Half-Range Sine Series on [0, L]
Having built pure cosine expansions via even extensions, we conclude by extending functions on [0,L] oddly to build pure sine expansions. By mirroring f(x) through the origin, both cosine coefficients a0 and an vanish automatically, leaving only the single sine coefficient bn to compute.
The idea
When a function f(x) is given only on the half-interval [0,L], we can represent it using sines alone by constructing its odd extensionF(x) on [−L,L]:
F(x)={−f(−x)f(x)if −L<x≤0if 0≤x<L
Figure: Graph of f(x) defined on interval [0, L]
Figure 4.22 (Graph of f(x)): A 2D coordinate system with a horizontal axis (arrow pointing right) and a vertical axis (arrow pointing up) intersecting at the origin, which is labelled 0 just below and to the right of the intersection. A tick mark on the positive horizontal axis is labelled L. On the interval [0, L] in the first quadrant, a smooth curve labelled f(x) starts at a small positive value on the vertical axis at x = 0, dips slightly to a local minimum, and then rises to a higher positive value above x = L.
Figure: Graph of F(x), odd extension of f(x)
Figure 4.23 (F(x): Graph of odd extension of f(x)): A 2D coordinate system with a horizontal axis (arrow pointing right) and a vertical axis (arrow pointing up) intersecting at the origin labelled 0. Tick marks on the horizontal axis are labelled -L on the left and L on the right. On [0, L] in the first quadrant, the curve labelled f(x) is identical to Figure 4.22 (starting at a small positive height at x = 0, dipping slightly, then rising toward x = L). On [-L, 0] in the third quadrant, the curve is reflected through the origin to form the odd extension -f(-x), starting at a negative value at x = -L, rising to a local maximum, and ending at a small negative value on the vertical axis at x = 0.
Repeating F(x) every 2L units forms the odd periodic extension. Because F(x) is odd, its product with cos(nπx/L) is odd (so a0=0 and an=0), while its product with sin(nπx/L) is even. Doubling the integral over the half-interval [0,L] gives the half-range sine series:
Figure 4.24 (Graph of odd periodic extension of f(x)): A 2D coordinate system with a horizontal axis (arrow pointing right) and a vertical axis (arrow pointing up) intersecting at the origin labelled 0. Tick marks along the horizontal axis from left to right are labelled -2L, -L, 0, L, and 2L. The odd extension on [-L, L] from Figure 4.23 (labelled f(x) in the first quadrant) is repeated periodically with period 2L: on [-2L, -L] the positive first-quadrant branch from [0, L] is repeated, and on [L, 2L] the negative third-quadrant branch from [-L, 0] is repeated. Vertical dashed segments at x = -L and x = L indicate the jump discontinuities between the upper and lower branches.
Notice what happens at the endpoints x=0 and x=L: every term sin(nπx/L) evaluates to zero there. If f(0)=0 or f(L)=0, the odd periodic extension jumps from −f(0) to +f(0) at x=0, and from f(L) to −f(L) at x=L. At any interior continuity point x∈(0,L), Dirichlet's theorem guarantees S(x)=f(x), whereas at jump discontinuities S(x)=2f(x+)+f(x−).
Worked example
Problem 4.3.6.Given:f(x)=x2 on [0,5].
Find: The half-range sine series of f(x).
Identify the half-period L=5 so the series takes the form S(x)=∑n=1∞bnsin(5nπx).
Set up the sine coefficient integral on [0,5]:
bn=52∫05x2sin(5nπx)dx
Apply tabular integration by parts (differentiating x2 down to 0 and integrating the sine factor three times):
Figure 4.25: Graph of odd periodic extension of x^2. A 2D Cartesian coordinate graph with a horizontal axis (with a rightward arrow at the right end) and a vertical axis (with an upward arrow at the top end) intersecting at the origin labeled 0. Along the horizontal axis, tick marks and labels are placed at -10, -5, 0, 5, and 10. Along the vertical axis, tick marks and labels are placed at -25 (below the origin) and 25 (above the origin). Two vertical dashed lines at x = -5 and x = 5 extend between y = -25 and y = 25, marking the discontinuities of the periodic extension (period T = 10). Three identical S-shaped cubic-like curve branches of the odd extension are drawn: the central branch starts at (-5, -25), curves upward with decreasing slope to pass smoothly with a horizontal tangent and inflection point through the origin (0, 0) (representing -x^2 on (-5, 0) and x^2 on (0, 5)), and continues curving steeply upward to (5, 25); an identical left branch starts at (-15, -25) (partially shown starting from y = -25 around x = -15), passes through (-10, 0) with a horizontal tangent, and rises to (-5, 25); an identical right branch starts at (5, -25), passes through (10, 0) with a horizontal tangent, and rises to (15, 25).
Substitute bn into the sine series expansion; note that the odd periodic extension has jump discontinuities at all integers.
Figure: Graph of odd periodic extension of e^x
A Cartesian graph titled 'Figure 4.27 : Graph of odd periodic extension of e^x'. The horizontal x-axis has a rightward arrow at its positive end and tick marks labelled -3, -2, -1, 0, 1, 2, 3. The vertical y-axis has an upward arrow at its positive end and tick marks labelled -2, -1, 1, 2. The graph shows the odd periodic extension of f(x) = e^x from (0, 1) with period 2: on (-3, -2), an increasing curve from (-3, -e) (below -2) to (-2, -1); on (-2, -1), an increasing curve from (-2, 1) to (-1, e) (above 2); on (-1, 0), an increasing curve from (-1, -e) to (0, -1); on (0, 1), a thicker increasing curve from (0, 1) to (1, e); on (1, 2), an increasing curve from (1, -e) to (2, -1); and on (2, 3), an increasing curve from (2, 1) to (3, e). Vertical dashed lines connect the jump discontinuities at x = -2 (between y = -1 and y = 1), x = -1 (between y = -e and y = e), x = 1 (between y = -e and y = e), and x = 2 (between y = -1 and y = 1).
Answer:S(x)=∑n=1∞1+n2π22nπ[e(−1)n+1+1]sin(nπx).
Problem 4.3.7: Piecewise triangular wave on (0, pi)
Given:f(x)={x,π−x,if 0<x≤π/2if π/2<x<π.
Find: The half-range sine series of f(x) and the sum 1+321+521+…
With L=π, split the bn integral at x=π/2 to match the two linear pieces:
bn=π2[∫0π/2xsin(nx)dx+∫π/2π(π−x)sin(nx)dx]
Integrate both parts by parts (noting the derivative of π−x is −1):
Evaluate at the limits so the cosine terms cancel and the sine terms add:
bn=π2[n22sin(2nπ)]=πn24sin(2nπ)
Write out the expansion by plugging n=1,2,3,… into sin(nπ/2):
S(x)=π4(sinx−321sin3x+521sin5x−…)
Evaluate S(x)=f(x) at the continuity point x=π/2, where f(π/2)=π/2, to solve for the numerical series:
2π=π4(1+321+521+…)
Figure: Graph of Odd periodic extension of f(x)
Figure 4.26: Graph of Odd periodic extension of f(x). A 2D Cartesian coordinate plane with a horizontal x-axis (with an arrowhead pointing right) and a vertical y-axis (with an arrowhead pointing up) intersecting at the origin labeled 0. Along the horizontal axis, tick marks and labels from left to right are -π, -π/2, 0, π/2, and π. Along the vertical axis, tick marks are labeled π/2 above the origin and -π/2 below the origin. The graph is a continuous, piecewise-linear triangular wave representing an odd periodic function: starting from a high point of y = π/2 at the left (x = -3π/2, unlabeled), a straight line segment slopes downward through (-π, 0) to a local minimum (trough) at (-π/2, -π/2); from (-π/2, -π/2), a straight line segment slopes upward through the origin (0, 0) to a local maximum (peak) at (π/2, π/2); from (π/2, π/2), a straight line segment slopes downward through (π, 0) to a low point of y = -π/2 at the right (x = 3π/2, unlabeled).
Answer:S(x)=∑n=1∞πn24sin(2nπ)sin(nx), and 1+321+521+⋯=8π2.
Problem 4.3.9: Trigonometric product x sin(x) on (0, pi)
Given:f(x)=xsinx on (0,π).
Find: The half-range sine series of f(x).
With L=π, rewrite the integrand using 2sinxsin(nx)=cos((n−1)x)−cos((n+1)x):