4.7.6 · D2Partial Differential Equations

Visual walkthrough — Half-range sine and cosine series

2,148 words10 min readBack to topic

We will derive, from absolute zero, this one result:

and understand every symbol in it.


Step 1 — We only know half the story

WHAT. We are handed a function that is defined only for between and . Think of a temperature reading along a metal rod that starts at the left wall () and ends at the right wall (). To the left of , there is nothing — no rule, no values.

WHY it matters. The Fourier machine (the tool that writes any repeating wiggle as a sum of sines and cosines) needs a function on a full symmetric interval so it can compare the left and right sides. We only have the right side . So we are missing exactly half the input the machine wants.

PICTURE. The solid burnt-orange curve is all we were given; the grey shaded region on the left is the "unknown zone" — completely blank.

Figure — Half-range sine and cosine series

Symbols so far:

  • ::: position along the rod, a number from to .
  • ::: the length of the interval we know (here also the right wall).
  • ::: the given values, drawn only on the right.

Step 2 — We are FREE to invent the left half

WHAT. Because nobody told us what happens for , we get to choose the missing values. Two natural choices exist. In this walkthrough we pick the odd choice: reflect the curve through the origin — flip it left–right and upside-down at the same time.

WHY this choice. An odd function is one where : whatever height you have on the right at distance , you put the negative of it on the left at the same distance. This particular flip has a magic property (revealed in Step 4) that annihilates every cosine. It also forces the curve to pass through zero at the origin — handy for problems with fixed walls.

PICTURE. The original (burnt orange) stays; the new plum curve on the left is the point-flipped copy. Notice the little rotation arrow at the origin — an odd extension is a spin about the point .

Figure — Half-range sine and cosine series

Step 3 — Now the full Fourier machine applies

WHAT. With values on all of , we may write the standard full Fourier series. It says: any well-behaved periodic wiggle is a constant plus a pile of cosines plus a pile of sines.

WHY these pieces. and of are the only pure waves that fit a whole number of humps into the interval and repeat with period . The numbers are "recipe amounts" — how loud each wave plays. The coefficients come from integrals (the tool that measures overlap):

WHY an integral here? An integral is a continuous sum — it adds up the product (a test wave) over the whole interval. If leans the same way as that test wave, the products pile up positive and the coefficient is big; if they disagree, positives and negatives cancel. It is a similarity meter. See Fourier Series — full range.

PICTURE. The bar chart shows the "recipe": some cosine bars (teal) and some sine bars (plum), each of height or . Right now we do not know which are zero — that is Step 4's job.

Figure — Half-range sine and cosine series

Symbols introduced:

  • ::: a counting number — how many humps the wave has.
  • ::: the angle fed into , scaled so that full humps fit in .
  • ::: the average height of over the interval.

Step 4 — Watch the cosines die (odd × even = odd)

WHAT. Take the cosine coefficient integrand: . Our is odd (we made it so). Cosine is even ( — its graph is a mirror across the vertical axis). The product of an odd thing and an even thing is odd.

WHY that kills it. Integrate an odd function over a symmetric interval and you get exactly zero: every positive bump on the right is matched by an equal negative bump on the left. They cancel in pairs. So

Every cosine amount is zero. The teal bars from Step 3 all vanish.

PICTURE. The left half of the shaded area (plum, negative) is the exact mirror-and-flip of the right half (orange, positive). The two signed areas are equal in size, opposite in sign — total area .

Figure — Half-range sine and cosine series

Step 5 — Watch the sines double (odd × odd = even)

WHAT. Now the sine coefficient integrand: . Sine is odd ( — flip left gives flip down). Odd odd even.

WHY it doubles. An even function () has a left half that is a perfect mirror copy of the right half — same sign, same size. So the area from to equals the area from to . Instead of integrating over the whole symmetric interval, we integrate over the right half and multiply by two:

PICTURE. Both shaded halves now have the same sign (both orange, both above the axis in this example). Their areas are identical — the left is a mirror of the right — so the total is twice one half. That factor of is literally the second copy of the area.

Figure — Half-range sine and cosine series

Step 6 — Where the average went (the missing )

WHAT. In the full series there was a constant term . What happened to it? The constant is just the cosine (since ). Its integrand is , which is odd. Over that integrates to zero as well.

WHY it must vanish. An odd extension has as much curve below the axis on the left as above on the right; its overall average is zero. A sine series therefore has no constant term — it cannot represent a nonzero background level. (If your problem needs that background, you use the cosine series instead — see the cosine branch in the parent note.)

PICTURE. The full odd curve over : the orange area above the axis exactly matches the plum area below. Net signed area (the average) is zero.

Figure — Half-range sine and cosine series

Step 7 — The edge cases: endpoints and jumps

WHAT. Two degenerate spots deserve their own look: the origin and the wall .

At : every . So the sine series always returns at the left end, no matter what was. If , the series simply cannot match it — it splits the difference (the midpoint rule) between the value coming from the right () and the flipped value from the left (), whose average is .

At : the periodic extension may have a jump. If , the flipped copy just past drops to , a sudden cliff. There the series converges to the midpoint , again not to .

WHY care. These are exactly the points where writing "" is a lie. The honest statement holds on the open interval .

PICTURE. Zoom on the sawtooth jump at : the two branches (orange coming up to , plum starting at ) with a plum dot marking the midpoint the series actually hits.

Figure — Half-range sine and cosine series

The one-picture summary

Everything at once. Left panel: the given right half → odd-reflected to fill the left. Middle: pairing with even cosine gives cancelling areas (⇒ ). Right: pairing with odd sine gives matching areas (⇒ double the half-integral). The three moves are the whole derivation.

Figure — Half-range sine and cosine series
Recall Feynman: retell the whole walkthrough in plain words

I was given a wiggle drawn only on the right side of the page, from to . To use the Fourier machine — which needs both sides — I drew the missing left side myself by spinning the picture around the centre dot; that makes it "odd." Then I asked the machine for its recipe of waves. When it tried to measure how much cosine was inside, the left area (now upside-down) cancelled the right area perfectly, so the answer was zero — no cosines at all. When it measured how much sine was inside, the left area matched the right area sign-for-sign, so I just measured the right half and doubled it. That doubling is the little "" out front, and the "only measure the right half" is the . The constant background also cancelled to zero, because an upside-down mirror has as much curve below the line as above. The only place I have to be careful is at the two ends: sines are always zero at , and if my wiggle didn't already touch zero at , the mirror makes a cliff there, and the series lands on the middle of that cliff, not the top. So I write the equality only for . That is the entire half-range sine story.


Connections