NivaarExam PrepOfficial exam papers ↗

04-BS-5 · Undated paper

Question 2 of 7: Fourier Series of a Piecewise-Linear Wave and a Series Identity

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

Paper format. National Examinations, 04-BS-5 Advanced Mathematics — three-hour closed-book paper; one approved Casio or Sharp calculator and one 8.5″×11″ two-sided aid sheet are permitted. Seven questions are printed and any five constitute a complete paper, all questions being of equal value (20 marks each). All seven questions are solved below, because the set is a study resource rather than an examination attempt.

Reference texts for 04-BS-5 Advanced Mathematics. E. Kreyszig, Advanced Engineering Mathematics, 10th ed. — Ch. 5 (series solutions of ODEs), Ch. 11 (Fourier series and Fourier transforms), Ch. 19 (numerics: root finding, interpolation, integration), Ch. 20 (numeric linear algebra); R. L. Burden and J. D. Faires, Numerical Analysis, 9th ed. — Ch. 2 (bisection, Newton, fixed-point iteration), Ch. 3 (divided-difference interpolation), Ch. 4 (Romberg integration); G. Strang, Introduction to Linear Algebra, 6th ed. — Ch. 6 (eigenvalues, Cayley–Hamilton).

Reading of the paper. Where a printed symbol is unclear, the reading adopted is stated explicitly and justified from the paper's own internal evidence (for example Question 7's matrix, which is recovered exactly from the characteristic equation the question prints).

Question 2: Fourier Series of a Piecewise-Linear Wave and a Series Identity (20 marks: (a) 15, (b) 5)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

Given. One period of a $2\pi$-periodic wave built from two straight segments of different slope, together with the target series identity.

Given data
QuantityValue
Period$p = 2\pi$, so the harmonics are $\cos nx$, $\sin nx$
Branch on $-\pi \lt x \lt 0$$f(x)=x+\pi$ (slope $1$, rises from $0$ to $\pi$)
Branch on $0 \lt x \lt \pi$$f(x)=x/2$ (slope $\tfrac12$, rises from $0$ to $\pi/2$)
Discontinuityat $x=0$ (and every $x=2k\pi$), from $\pi$ down to $0$

Find. The coefficients $a_{0}$, $a_{n}$, $b_{n}$ and the assembled series in part (a); then the numerical value of $\sum 1/(2n-1)^{2}$ extracted from that series in part (b).

−3π−2π−π0π2π3π0123xf(x)jump: mean value π/2
Three periods of the given wave. Each period rises linearly from $0$ to $\pi$ on the left half and from $0$ to $\pi/2$ on the right half, so a jump of height $\pi$ occurs at every $x=2k\pi$; the dashed segments mark the jumps whose mean value $\pi/2$ is what part (b) exploits.

Approach. Integrate $f$ against $1$, $\cos nx$ and $\sin nx$ over one period, treating the two branches separately; then evaluate the resulting series at the discontinuity $x=0$, where Dirichlet's theorem replaces $f$ by the mean of its one-sided limits and every sine term vanishes.

  1. Constant term. With $a_{0}=\dfrac{1}{\pi}\displaystyle\int_{-\pi}^{\pi}f(x)\,dx$, $$\int_{-\pi}^{0}(x+\pi)\,dx = \Big[\tfrac{x^{2}}{2}+\pi x\Big]_{-\pi}^{0} = \frac{\pi^{2}}{2},\qquad \int_{0}^{\pi}\frac{x}{2}\,dx = \frac{\pi^{2}}{4},$$ so $a_{0} = \dfrac{1}{\pi}\Big(\dfrac{\pi^{2}}{2}+\dfrac{\pi^{2}}{4}\Big) = \dfrac{3\pi}{4}$ and the constant term of the series is $\dfrac{a_{0}}{2} = \dfrac{3\pi}{8}$.
  2. Cosine coefficients. Using $\int x\cos nx\,dx = \dfrac{x\sin nx}{n}+\dfrac{\cos nx}{n^{2}}$ and noting that $\int_{-\pi}^{0}\pi\cos nx\,dx = 0$, $$\int_{-\pi}^{0}(x+\pi)\cos nx\,dx = \frac{1-(-1)^{n}}{n^{2}},\qquad \int_{0}^{\pi}\frac{x}{2}\cos nx\,dx = \frac{(-1)^{n}-1}{2n^{2}} .$$ Adding them and dividing by $\pi$ leaves $$\boxed{\,a_{n} = \frac{1-(-1)^{n}}{2\pi n^{2}} = \begin{cases} \dfrac{1}{\pi n^{2}} & n \text{ odd} \\[4pt] 0 & n \text{ even}\end{cases}}$$
  3. Sine coefficients. Using $\int x\sin nx\,dx = -\dfrac{x\cos nx}{n}+\dfrac{\sin nx}{n^{2}}$ together with $\int_{-\pi}^{0}\pi\sin nx\,dx = \dfrac{\pi}{n}\big((-1)^{n}-1\big)$, the left branch contributes $-\pi/n$ and the right branch $-\pi(-1)^{n}/(2n)$. Dividing by $\pi$, $$\boxed{\,b_{n} = -\frac{2+(-1)^{n}}{2n} = \begin{cases} -\dfrac{1}{2n} & n \text{ odd} \\[4pt] -\dfrac{3}{2n} & n \text{ even}\end{cases}}$$ The sine terms survive for every $n$, as they must: $f$ is neither even nor odd.
  4. Assemble the series. Separating the odd harmonics $n=2k-1$ from the even ones $n=2k$, $$f(x) = \frac{3\pi}{8} + \frac{1}{\pi}\sum_{k=1}^{\infty}\frac{\cos\big((2k-1)x\big)}{(2k-1)^{2}} - \frac{1}{2}\sum_{k=1}^{\infty}\frac{\sin\big((2k-1)x\big)}{2k-1} - \frac{3}{2}\sum_{k=1}^{\infty}\frac{\sin(2kx)}{2k} .$$ This completes part (a). The series converges to $f(x)$ at every point of continuity and to the mean of the one-sided limits at each jump.
  5. Evaluate at the jump to obtain the identity (part b). At $x=0$ every sine term is zero, while the left- and right-hand limits of $f$ are $f(0^{-}) = \pi$ and $f(0^{+}) = 0$. Dirichlet's theorem therefore gives the series the value $\tfrac12\big(\pi+0\big) = \pi/2$, so $$\frac{\pi}{2} = \frac{3\pi}{8} + \frac{1}{\pi}\sum_{k=1}^{\infty}\frac{1}{(2k-1)^{2}} .$$ Subtracting and multiplying by $\pi$, $$\boxed{\;\sum_{n=1}^{\infty}\frac{1}{(2n-1)^{2}} = \pi\left(\frac{\pi}{2}-\frac{3\pi}{8}\right) = \pi\cdot\frac{\pi}{8} = \frac{\pi^{2}}{8}\;}$$ as required. Numerically the left side is $1.2337$ and $\pi^{2}/8 = 1.2337$, which confirms the algebra.
Final results — Question 2
QuantityResult
Constant term $a_{0}/2$$3\pi/8 \approx 1.1781$
$a_{n}$$1/(\pi n^{2})$ for odd $n$; $0$ for even $n$
$b_{n}$$-1/(2n)$ for odd $n$; $-3/(2n)$ for even $n$
Series value at $x=0$$\pi/2$ (mean of $\pi$ and $0$)
Series identity$\sum_{n\ge1}1/(2n-1)^{2} = \pi^{2}/8 \approx 1.2337$