Exercises — Half-range sine and cosine series
Before we start, one reminder of the two master tools, so no symbol is used unearned.
Here is the length of the known interval, counts which "wiggle" we are measuring (1 = one hump, 2 = two humps, …), and is the angle that makes / complete exactly half-waves across . The number (or ) tells you how much of that particular wiggle is in .
Level 1 — Recognition
You are not computing integrals here. You are choosing the right tool by reading the boundary conditions or the required symmetry.
Recall Solution 1.1
Answer: half-range sine series. The building blocks of a sine series are . Look at the figure below (Figure s01 — three sine curves drawn in black over , with red dots marking the two endpoints where every curve crosses zero): each such curve is pinned to zero at (because ) and at (because ).

Since every term already vanishes at both ends, the whole sum automatically satisfies at the walls — exactly the Dirichlet condition. A cosine series would generally be non-zero there, so it cannot obey the boundary rule. See Heat Equation — separation of variables.
Recall Solution 1.2
Answer: half-range cosine series. The blocks have zero slope at both ends: their derivative is zero at and (same reason). Zero slope = no heat flux = insulated. This is the Neumann Boundary Conditions pairing. Sine blocks have maximum slope at the ends, so they'd force heat through — wrong.
Recall Solution 1.3
False. On both reproduce . But outside they are different inventions:
- The sine series is the odd extension (flip through the origin), period .
- The cosine series is the even extension (mirror across the -axis), period . Same data on , two different fantasies on . See Even and Odd Functions.
Level 2 — Application
Now turn the crank: plug into the formula and integrate.
Recall Solution 2.1
WHAT: compute . WHY this integral: the sine formula with gives . So . This is when is even and when is odd. Meaning: the odd extension of the constant is a square wave (+1 then −1), and its Fourier series is exactly this classic odd-harmonics-only sum.
Recall Solution 2.2
The shortcut: is already even. Its even extension is just the constant everywhere. , and for : A constant needs no wiggles — the whole function is its own average. This is the cleanest sanity check that the term really is the mean value.
Recall Solution 2.3
WHY the product-to-sum identity? The integrand is a product of two different trig functions, times . We have no rule to integrate a product directly, and integration by parts here just bounces between sines and cosines forever. But a sum of single sines is trivial to integrate term by term. So we trade the product for a sum using which with gives Now every piece is a lone sine we already know how to integrate. For : . With (opposite parity to ): , so , which is for odd and for even . For even : For odd : . For : , so .
Level 3 — Analysis
Now explain why the numbers behave as they do.
Recall Solution 3.1
Look at the two extensions (Figure s02 — over the black "V" curve is the even extension, the red straight sawtooth line is the odd extension, with a red dot marking the jump at ):

- Odd extension of = a sawtooth: it jumps from down to at each period boundary. A jump (discontinuity) is "expensive" — you need lots of high harmonics to build a vertical cliff, so coefficients die only as .
- Even extension of = , a continuous "V" tent. No jumps, only a corner. Continuous functions need fewer high harmonics; coefficients die faster, as . Rule of thumb: the smoother the periodic extension, the faster the decay. The sawtooth's cliffs make the sine partial sums spikier (Gibbs overshoot at the jump). See Dirichlet Conditions.
Recall Solution 3.2
At : every term has , so the series sums to . But . No contradiction: is a jump point of the odd (sawtooth) extension — it leaps from (approaching from below) to (the next period). By Dirichlet's theorem the series converges to the midpoint of the jump: . ✓ This is why we always write the equality for the open interval .
Recall Solution 3.3
The sine series converges to the odd extension, whose value at the ends is forced to (odd ; jump midpoint at ). So if or , the series does not reproduce those endpoint heights — it snaps them to . Physically that's fine for a Wave Equation on a finite string with fixed ends, because a real string is pinned to there. The claim is only "wrong" if you expected the series to honour a nonzero endpoint value it can never represent.
Level 4 — Synthesis
Combine several ideas in one problem.
Recall Solution 4.1
Rederive the coefficients (self-contained). Here , so we use and .
- Constant term: (the average height of on — sanity check ✓).
- via integration by parts (why IBP? polynomial × trig; IBP lowers the polynomial power): with , The bracket is because . The remaining integral is with a minus sign in front, giving . Hence which is for even and for odd . So Now evaluate at (a point of continuity of the even extension, so equality is exact): Cross-check: this is the famous odd-square sum; combined with it gives the even part , and indeed . ✓
Recall Solution 4.2
We need blocks that are zero at (so use , since ) and have zero slope at . Slope of is ; it vanishes at when , i.e. , giving . These are half-integer frequencies. What "quarter-range" means: an ordinary half-range series knows on = half of one period , and both ends are the same type of boundary. When the two ends are different types (one fixed, one insulated), the natural period of the resulting waves is instead of — the known piece is now only a quarter of a full period, which is why we call it a quarter-range expansion. Concretely, completes one full cycle over a length of , i.e. period with . Neither pure sine nor pure cosine of integer harmonics works; the mixed BC forces this new family. (Same separation-of-variables machinery as Heat Equation — separation of variables.)
Level 5 — Mastery
Build and justify a full result end-to-end.
Recall Solution 5.1
Step 1 — separate variables (WHY: turns a PDE into two ODEs). Try . Then (constant). The fixed-end BCs kill at both ends, so we need that vanishes there → sine blocks with (period- half-range, ). Step 2 — time factor. . Step 3 — superpose and match the initial shape. , and at this must equal . That's exactly the half-range sine series of (parent Example 1): Answer: Verify BCs: every term has → . ✓ Verify IC: at the exponential is and the sum is the sine series of , equal to on . ✓ Physical picture: as grows, the factor crushes high harmonics fastest, so the sharp sawtooth smooths and the whole rod cools toward .
Recall Solution 5.2
WHY Parseval, and what it says. Parseval's identity is a statement of energy conservation: the "total squared size" of measured directly (by integrating ) must equal the total squared size measured harmonic-by-harmonic (by adding up ). Because the sine blocks are mutually orthogonal on , all cross terms integrate to zero and only the squares survive. For a half-range sine series on the identity reads This is the perfect tool here: it converts an integral of (easy) into an infinite sum of the (which contains the we want). Left side: Right side: Set them equal and solve: ✓ The Basel sum, recovered from a rod-temperature expansion!
Wrap-up Recall
Recall One-line self-test
Fixed ends → sine; insulated ends → cosine; mixed ends → half-integer frequencies. Series equals on the open interval; at jumps it gives the midpoint.
Connections
- Parent topic — the formulas these exercises drill.
- Fourier Series — full range — where both series come from.
- Even and Odd Functions — the symmetry choosing sine vs cosine.
- Dirichlet Conditions — the midpoint rule at jumps (Ex 3.2).
- Heat Equation — separation of variables — Ex 5.1.
- Wave Equation on a finite string — fixed-end sine expansions.
- Neumann Boundary Conditions — insulated ends → cosine (Ex 1.2).