JOVANA
Explore Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Sine and Cosine Transforms for Half-Line Problems

The full Fourier transform loves the whole line, but real bars and rods have an end. On the half-line 0 < x < ∞, the sine and cosine transforms are the right tools — and which one you reach for is decided entirely by the boundary condition at x = 0.

When the line has an end

In the last two guides the Fourier transform swept across the whole line, from x = -∞ to x = +∞, and turned u_xx into multiplication by -k^2. That worked because nothing special happened at any one point — the line was perfectly homogeneous. But most physical problems are not like that. A metal rod has a left end; the ground has a surface; a semi-infinite pool of water has a wall. The natural domain is the half-line 0 < x < ∞, with the world living to the right of a single boundary at x = 0.

The trouble is that the full transform integrates from -∞ to +∞, so it has no idea what to do with a function only defined for x > 0. We could just plug zero in for x < 0, but then we have invented a jump at the origin out of thin air, and a jump is exactly the kind of feature that makes derivatives misbehave. We need a smarter way to fill in the missing left half — one that respects what the equation demands at the wall x = 0.

Here is the beautiful idea. Instead of guessing, we extend the data across the origin in one of exactly two symmetric ways, and the choice is forced on us by the boundary condition. This is the same trick that, on a finite interval, gave the Fourier sine series and the Fourier cosine series — only now the interval is infinitely long, so the series becomes a continuous integral transform.

Odd and even: two ways to mirror

Take a function f(x) defined only for x > 0. There are two clean ways to give it a left half. The odd extension flips the sign as it reflects: f(-x) = -f(x), which forces the value at the origin to be zero. The even extension mirrors with no sign change: f(-x) = f(x), which forces the slope at the origin to be zero (a smooth peak or valley sits there). These are the odd and even extensions, and each one is tailor-made for a different wall condition.

odd extension     f(-x) = -f(x)   =>  value  f(0) = 0     (Dirichlet)
even extension    f(-x) = +f(x)   =>  slope  f'(0) = 0    (Neumann)
Each mirror pins down one thing at the wall — the value, or the slope.

Why does this matter so much? Because the full Fourier transform of an odd function involves only sines, and the transform of an even function involves only cosines. So extending oddly and then applying the whole-line transform is the same as applying a pure sine transform to the original half-line data; extending evenly gives a pure cosine transform. We never actually draw the left half — we just use whichever of the sine and cosine transforms the symmetry hands us, and integrate from 0 to ∞.

The boundary condition picks the transform

This is the single most important rule of the guide, so let it land. If the wall at x = 0 prescribes the value of u — say the end of the rod is held at a fixed temperature — that is a Dirichlet condition, and you want the value at the origin to be clean and controllable. The odd extension makes u(0) = 0 automatic, so the sine transform is your tool. If instead the wall prescribes the flux, the slope u_x — say the end is perfectly insulated so no heat crosses it — that is a Neumann condition, the even extension makes u_x(0) = 0 automatic, and the cosine transform is your tool.

There is a small but crucial wrinkle in the differentiation rule, and it is the part beginners trip over. On the whole line, the differentiation rule said the transform of u_xx is just -k^2 times the transform of u, with nothing left over. On the half-line, integrating u_xx by parts twice leaves a boundary term at x = 0 — and that is not a bug, it is the feature. For the sine transform that leftover term is proportional to u(0); for the cosine transform it is proportional to u_x(0). The boundary data you actually know gets eaten by the rule and carried straight into the transformed equation.

A worked example: cooling a half-infinite rod

Let us actually solve one. A rod fills x > 0, starts at temperature u(x, 0) = f(x), and its left end is held at zero degrees forever: u(0, t) = 0. The temperature obeys the heat equation u_t = k u_xx. The end condition fixes the value, so it is Dirichlet — which means we reach for the sine transform. Watch how the wall condition disappears into the rule.

  1. Apply the sine transform in x. Call the transformed temperature U(k, t). The time derivative passes straight through, giving U_t on the left.
  2. Transform u_xx. Two integrations by parts give -k^2 U plus a boundary term proportional to u(0, t). But u(0, t) = 0 by our Dirichlet condition, so the boundary term simply vanishes — the wall condition has been absorbed.
  3. The PDE has collapsed to an ODE in time for each k: U_t = -k^2 k U. (One k is the wavenumber, the other is the diffusivity — bad luck with letters, but harmless.) This is the same modal decay you saw on the whole line.
  4. Solve the ODE: U(k, t) = F(k) e^(-k^2 k t), where F(k) is the sine transform of the initial data f. Every mode decays, and short wavelengths (large k) die fastest.
  5. Invert with the sine transform to get u(x, t) back. The answer automatically satisfies u(0, t) = 0 for all time, because every sine already vanishes at x = 0.

Had the end been insulated instead — u_x(0, t) = 0, a Neumann condition — every single step would read the same, except you would use the cosine transform, the leftover boundary term would involve u_x(0, t) = 0 and vanish again, and the modes would be cosines that automatically have zero slope at the wall. One physical change, one transform swap, identical machinery.

Honest fine print

The clean story above hides three honest caveats. First, the sine and cosine transforms handle only homogeneous wall conditions cheaply — u(0) = 0 or u_x(0) = 0. If the end is held at a nonzero temperature, or fed a steady flux, the boundary term in the differentiation rule does not vanish; it becomes a known driving term, and you must either subtract off a steady background first or carry that term through as a source. The method still works, but it is no longer free.

Second, this is the continuous, infinite-domain cousin of separation of variables on a finite interval. There, a Dirichlet end gave a discrete sine series and a Neumann end a cosine series; here the eigenvalues spread into a continuum and the sum becomes an integral. The match is no accident — both rest on the same orthogonality of sines and cosines that makes each mode evolve independently.