End-Term Rally

Question 1. Solve the differential equation

\displaystyle \frac{\mathrm dy}{\mathrm dx} - y = e^{2x}.

(Click for Solution)

Solution. We identify P(x) = -1, Q(x) = e^{2x} and compute the integrating factor

I(x) = e^{\int P(x)\, \mathrm dx} = e^{\int -1\, \mathrm dx} = e^{-x}.

It follows that the general solution is given by

\begin{aligned} I(x) \cdot y &= \int I(x) Q(x)\, \mathrm dx \\ e^{-x} y &= \int e^{-x} \cdot e^{2x}\, \mathrm dx \\ &= \int e^x \, \mathrm dx \\ &= e^x + C.\end{aligned}

Question 2. Solve the differential equation

\displaystyle \frac{\mathrm d^2 y}{\mathrm dx^2} + y = e^{x} \sin(2x).

(Click for Solution)

Solution. We rewrite the differential equation using \mathcal D-notation:

(\mathcal D^2 + 1)y = e^x \sin(2x).

The general solution is given by y = y_{\mathrm P} + y_{\mathrm C}. To compute the complementary function y_{\mathrm C}, we solve (\mathcal D^2 + 1)y = 0. Since the characteristic equation m^2 + 1 = 0 has complex conjugate roots m = \pm i, the general solution is given by

y_{\mathrm C} = C_1 \sin(x) + C_2 \cos(x).

To compute the particular integral y_{\mathrm P}, we use inverse-\mathcal D notation to evaluate

\begin{aligned} y_{\mathrm P} &= \frac 1{\mathcal D^2 + 1}(e^x \sin(2x)) \\ &= e^x \cdot \frac 1{(\mathcal D+1)^2 + 1}(\sin(2x)) \\ &= e^x \cdot \frac 1{\mathcal D^2 + 2\mathcal D + 1 + 1}(\sin(2x)) \\ &= e^x \cdot \frac 1{\mathcal D^2 + 2\mathcal D + 2}(\sin(2x)) \\ &= e^x \cdot \frac 1{-2^2 + 2\mathcal D + 2}(\sin(2x)) \\ &= e^x \cdot \frac 1{2\mathcal D - 2}(\sin(2x)) \\ &= \frac 12 e^x \cdot \frac 1{\mathcal D - 1}(\sin(2x)) \\ &= \frac 12 e^x \cdot \frac {\mathcal D+1}{\mathcal D^2 - 1}(\sin(2x)) \\ &= \frac 12 e^x \cdot \frac {\mathcal D+1}{-2^2 - 1}(\sin(2x)) \\ &= -\frac 1{10} e^x \cdot (\mathcal D+1)(\sin(2x)) \\ &= -\frac 1{10} e^x \cdot (\mathcal D(\sin(2x))+\sin(2x)) \\ &= -\frac 1{10} e^x \cdot (2 \cos(2x) +\sin(2x)). \end{aligned}

Therefore, the general solution is given by

y = y_{\mathrm P} + y_{\mathrm C} = -\frac 1{10} e^x \cdot (2 \cos(2x) +\sin(2x)) + C_1 \sin(x) + C_2 \cos(x).

Question 3. Solve the initial value problem

\displaystyle \left\{ \begin{aligned} y'' + 2y' + 2y &= t^2 \delta(t-2), \\ y(0) &= 0, \\ y'(0) &= 0.\end{aligned} \right.

(Click for Solution)

Solution. Denote Y(s) \equiv Y = \mathcal L\{y\} \equiv \mathcal L\{ y(t) \}. Taking Laplace transforms on both sides and applying linearity,

\mathcal L \{y''\} + 2 \cdot \mathcal L\{ y' \} + 2 \cdot \mathcal L \{ y \} = \mathcal L \{ t^2 \delta(t-2) \}.

Evaluating each of the Laplace transforms,

\begin{aligned} \mathcal L\{y''\} &= s^2 Y(s) - sy(0) - y'(0) = s^2 Y(s), \\ \mathcal L\{y' \} &= sY(s) - y(0) = sY(s), \\ \mathcal L \{t^2 \delta(t-2) \} &= -\frac{\mathrm d}{\mathrm ds} \mathcal L \{t \delta(t-2)\} \\ &= -\frac{\mathrm d}{\mathrm ds} \left(-\frac{\mathrm d}{\mathrm ds}\mathcal L\{\delta(t-2)\}\right) \\ &= -\frac{\mathrm d}{\mathrm ds} \left(-\frac{\mathrm d}{\mathrm ds} (e^{-2s})\right) \\ &= -\frac{\mathrm d}{\mathrm ds} (2e^{-2s})  \\ &= -(2 \cdot -2e^{-2s}) \\ &= 4e^{-2s}. \end{aligned}

Substituting all terms,

\begin{aligned} s^2Y(s) +2s Y(s) + 2Y(s) &= 4e^{-2s} \\ (s^2 + 2s + 2) Y(s) &= 4e^{-2s} \\ Y(s) &= \frac{4 e^{-2s}}{s^2 + 2s + 2}. \end{aligned}

Motivated by the shift theorems, define F(s) = 4/(s^2+2s+2). Then

\begin{aligned} \mathcal L^{-1} \left\{ \frac{4e^{-2s}}{s^2 + 2s + 2} \right\} &= \mathcal L^{-1} \left\{ e^{-2s} F(s) \right\} = f(t-2) U(t-2). \end{aligned}

It remains to evaluate f(t) = \mathcal L^{-1} \{F(s)\}, which is a nontrivial task. However, if we complete the square on the denominator,

\displaystyle \frac 4{s^2 + 2s + 2} = \frac 4{(s^2 + 2s + 1) + 1} = \frac 4{(s+1)^2 + 1^2},

then

\begin{aligned} f(t) = \mathcal L^{-1} \{F(s)\} &= \mathcal L^{-1} \left\{ \frac 4{(s+1)^2 + 1^2} \right\} = 4 \cdot \mathcal L^{-1} \left\{ \frac 1{(s+1)^2 + 1^2} \right\}. \end{aligned}

Motivated by the shift theorem again, we define G(s+1) = 1/((s+1)^2 + 1^2). Then

f(t) = 4 \cdot \mathcal L^{-1}\{ G(s+1) \} = 4 \cdot e^{-t} g(t),

where

\begin{aligned} g(t) = \mathcal L^{-1}\{ G(s) \} &= \mathcal L^{-1} \left\{ \frac 1{s^2 + 1^2} \right\} = \sin(t), \end{aligned}

so that f(t) = 4e^{-t} \sin(t). Replacing t with t-2 yields the final answer

\displaystyle \begin{aligned} \mathcal L^{-1} \left\{ \frac{4e^{-2s}}{s^2 + 2s + 2} \right\} &= f(t-2) U(t-2) \\ &= 4 e^{-(t-2)} \sin(t-2)  \cdot U(t-2). \end{aligned}

Question 4. The function f(t) is defined by f(t) = t^2 + t for -1 \leq t < 1 and periodic extension f(t) = f(t+2). Use the Fourier series of f(t) to evaluate the infinite series

\displaystyle \frac 1{1^2} - \frac 1{2^2} + \frac 1{3^2} - \frac 1{4^2} + \cdots.

(Click for Solution)

Solution. We contextualise the Fourier series to T = 2:

\displaystyle f(t) = \frac{a_0}{2} + \sum_{n=1}^\infty \left(a_n \cos (\pi n t) + b_n \sin (\pi n t) \right),

where

\displaystyle a_n = \int_{-1}^1 f(t) \cos (\pi n t)\, \mathrm dt,\quad b_n = \int_{-1}^1 f(t) \sin (\pi n t)\, \mathrm dt.

For a_n, since \cos(\cdot) is even,

\begin{aligned} a_n &= \int_{-1}^1 f(t) \cos (\pi n t)\, \mathrm dt \\ &= \int_{-1}^1 (t^2 + t) \cos (\pi n t) \, \mathrm dt \\ &= \int_{-1}^1 t^2\cos (\pi n t) \, \mathrm dt + \int_{-1}^1 t \cos (\pi n t) \, \mathrm dt \\ &= 2\int_0^1 t^2\cos (\pi n t) \, \mathrm dt. \end{aligned}

Similarly, since \sin(\cdot) is odd, we integrate by parts to obtain

\displaystyle \begin{aligned} b_n &= 2 \int_0^1 t \sin (\pi n t) \, \mathrm dt \\ &= 2 \cdot \left[ t \cdot \frac{-\cos(\pi n t)}{\pi n} + \frac{\sin(\pi n t)}{\pi^2 n^2} \right]_0^1 \\ &= 2 \left( - \frac{\cos(\pi n)}{\pi n}\right) = \frac{2(-1)^{n+1}}{\pi n}. \end{aligned}

To evaluate a_n for n \neq 0, we integrate by parts to obtain

\displaystyle \begin{aligned} a_n &= 2 \left( \left[ t^2 \cdot \frac{\sin (\pi n t)}{\pi n} \right]_0^1 - \frac 1{\pi n} \cdot 2 \int_0^1 t \sin(\pi n t)\, \mathrm dt \right) \\ &= 2\left( (0 - 0) -\frac 1{\pi n} \cdot b_n \right) = \frac {4(-1)^n}{\pi^2 n^2}.\end{aligned}

For the case n = 0,

\displaystyle a_0 = 2 \cdot \int_0^1 t^2\, \mathrm dt = 2 \cdot \left[ \frac{t^3}{3} \right]_0^1 = \frac 23.

Substituting the values of a_n and b_n, the Fourier series of f(t) is given by

\displaystyle f(t) = \frac 13 - \sum_{n=1}^\infty \left(\frac {4(-1)^{n-1}}{\pi^2 n^2} \cos(\pi n t) - \frac{2(-1)^{n-1}}{\pi n} \sin(\pi n t) \right).

Setting t = 0, since f(0) = 0,

\begin{aligned}0 &= \frac 13 - \frac 4{\pi^2} \sum_{n=1}^\infty \frac {(-1)^{n-1}}{n^2}. \end{aligned}

By algebruh,

\displaystyle \frac 1{1^2} - \frac 1{2^2} + \frac 1{3^2} - \frac 1{4^2} + \cdots = \sum_{n=1}^\infty \frac {(-1)^{n-1}}{n^2} = \frac{\pi^2}{12}.

Remark. If we have \displaystyle \sum_{n=1}^\infty \frac 1{n^2} = \frac{\pi^2}{6}, then

\displaystyle \begin{aligned} \sum_{n=1}^\infty \frac 1{n^2} - \sum_{n=1}^\infty \frac {(-1)^{n-1}}{n^2} &= \sum_{n=1}^\infty \frac {1- (-1)^{n-1}}{n^2} = \sum_{n=1}^\infty \frac {2}{(2n)^2} = \frac 12 \sum_{n=1}^\infty \frac {1}{n^2}. \end{aligned}

Then

\displaystyle \sum_{n=1}^\infty \frac {(-1)^{n-1}}{n^2} = \frac 12 \sum_{n=1}^\infty \frac {1}{n^2} = \frac 12 \cdot \frac{\pi^2}{6} = \frac{\pi^2}{12}.

—Joel Kindiak, 19 Apr 25, 2352H

,

Published by


Leave a comment