Piecewise Ode
1. **Problem statement:**
We are given two piecewise functions to analyze and understand:
- Problem 65:
$$f(t) = \begin{cases} t, & 0 \leq t < 1 \\ 0, & 1 \leq t < 2 \\ \sin(\pi t), & t \geq 2 \end{cases}$$
- Problem 75: Solve the differential equation
$$y'' + 4y = \sin t \cdot U(t - 2\pi), \quad y(0) = 1, \quad y'(0) = 0,$$
where $U(t - 2\pi)$ is the Heaviside step function activating at $t=2\pi$.
---
2. **Understanding Problem 65:**
This is a piecewise function defined in three intervals:
- For $0 \leq t < 1$, $f(t) = t$ (a linear function).
- For $1 \leq t < 2$, $f(t) = 0$ (zero function).
- For $t \geq 2$, $f(t) = \sin(\pi t)$ (a sinusoidal function).
This function is continuous at the boundaries if values match:
- At $t=1$, from left $f(1^-) = 1$, from right $f(1) = 0$, so there is a jump discontinuity.
- At $t=2$, from left $f(2^-) = 0$, from right $f(2) = \sin(2\pi) = 0$, continuous.
---
3. **Understanding Problem 75:**
We have a second order linear ODE with forcing term $f(t) = \sin t \cdot U(t - 2\pi)$.
- The Heaviside function $U(t - 2\pi)$ is 0 for $t < 2\pi$ and 1 for $t \geq 2\pi$.
- So the forcing term is zero until $t=2\pi$, then it becomes $\sin t$.
Initial conditions are $y(0) = 1$ and $y'(0) = 0$.
---
4. **Solving Problem 65:**
Since the problem only asks to analyze the function, we describe it and its behavior:
- For $0 \leq t < 1$, $f(t) = t$ is increasing linearly from 0 to 1.
- For $1 \leq t < 2$, $f(t) = 0$ is flat at zero.
- For $t \geq 2$, $f(t) = \sin(\pi t)$ oscillates with period $2$ (since period of $\sin(\pi t)$ is $\frac{2\pi}{\pi} = 2$).
This function is piecewise continuous with a jump at $t=1$.
---
5. **Solving Problem 75:**
Step 1: Solve the homogeneous equation
$$y'' + 4y = 0.$$
Characteristic equation:
$$r^2 + 4 = 0 \implies r = \pm 2i.$$
General solution:
$$y_h = C_1 \cos 2t + C_2 \sin 2t.$$
Step 2: Use Laplace transform to solve with forcing term involving Heaviside function.
Let $Y(s) = \mathcal{L}\{y(t)\}$.
Laplace transform of $y'' + 4y$:
$$s^2 Y(s) - s y(0) - y'(0) + 4 Y(s) = \mathcal{L}\{\sin t \cdot U(t - 2\pi)\}.$$
Given $y(0) = 1$, $y'(0) = 0$:
$$s^2 Y(s) - s \cdot 1 + 4 Y(s) = e^{-2\pi s} \mathcal{L}\{\sin(t + 2\pi)\}.$$
Using the second shifting theorem:
$$\mathcal{L}\{f(t - a) U(t - a)\} = e^{-as} F(s).$$
Rewrite forcing term:
$$\sin t \cdot U(t - 2\pi) = \sin((t - 2\pi) + 2\pi) U(t - 2\pi) = \sin(t - 2\pi) U(t - 2\pi)$$
(since $\sin$ is $2\pi$ periodic).
So,
$$\mathcal{L}\{\sin t \cdot U(t - 2\pi)\} = e^{-2\pi s} \mathcal{L}\{\sin t\} = e^{-2\pi s} \frac{1}{s^2 + 1}.$$
Step 3: Substitute into equation:
$$s^2 Y(s) - s + 4 Y(s) = e^{-2\pi s} \frac{1}{s^2 + 1}.$$
Group terms:
$$(s^2 + 4) Y(s) = s + e^{-2\pi s} \frac{1}{s^2 + 1}.$$
Step 4: Solve for $Y(s)$:
$$Y(s) = \frac{s}{s^2 + 4} + e^{-2\pi s} \frac{1}{(s^2 + 4)(s^2 + 1)}.$$
Step 5: Inverse Laplace transform:
- First term:
$$\mathcal{L}^{-1}\left\{\frac{s}{s^2 + 4}\right\} = \cos 2t.$$
- Second term involves shift:
$$\mathcal{L}^{-1}\left\{e^{-2\pi s} F(s)\right\} = U(t - 2\pi) f(t - 2\pi),$$
where
$$F(s) = \frac{1}{(s^2 + 4)(s^2 + 1)}.$$
Step 6: Find $f(t) = \mathcal{L}^{-1}\{F(s)\}$.
Use partial fractions:
$$\frac{1}{(s^2 + 1)(s^2 + 4)} = \frac{A s + B}{s^2 + 1} + \frac{C s + D}{s^2 + 4}.$$
Since numerator is constant 1, and denominators are quadratic, try:
$$\frac{1}{(s^2 + 1)(s^2 + 4)} = \frac{E}{s^2 + 1} + \frac{F}{s^2 + 4}.$$
Multiply both sides by denominator:
$$1 = E (s^2 + 4) + F (s^2 + 1) = (E + F) s^2 + 4E + F.$$
Equate coefficients:
- Coefficient of $s^2$: $0 = E + F$
- Constant term: $1 = 4E + F$
From first: $F = -E$
Substitute into second:
$$1 = 4E - E = 3E \implies E = \frac{1}{3}, \quad F = -\frac{1}{3}.$$
So,
$$F(s) = \frac{1/3}{s^2 + 1} - \frac{1/3}{s^2 + 4}.$$
Step 7: Inverse Laplace transforms:
- $$\mathcal{L}^{-1}\left\{\frac{1}{s^2 + a^2}\right\} = \frac{\sin a t}{a}.$$
Therefore,
$$f(t) = \frac{1}{3} \sin t - \frac{1}{3} \frac{\sin 2t}{2} = \frac{1}{3} \sin t - \frac{1}{6} \sin 2t.$$
Step 8: Final solution:
$$y(t) = \cos 2t + U(t - 2\pi) \left( \frac{1}{3} \sin (t - 2\pi) - \frac{1}{6} \sin 2(t - 2\pi) \right).$$
Since sine is $2\pi$ periodic,
$$\sin (t - 2\pi) = \sin t, \quad \sin 2(t - 2\pi) = \sin 2t,$$
so
$$y(t) = \cos 2t + U(t - 2\pi) \left( \frac{1}{3} \sin t - \frac{1}{6} \sin 2t \right).$$
---
**Final answers:**
- Problem 65: The piecewise function is
$$f(t) = \begin{cases} t, & 0 \leq t < 1 \\ 0, & 1 \leq t < 2 \\ \sin(\pi t), & t \geq 2 \end{cases}$$
with a jump discontinuity at $t=1$ and sinusoidal behavior for $t \geq 2$.
- Problem 75: The solution to the ODE is
$$y(t) = \cos 2t + U(t - 2\pi) \left( \frac{1}{3} \sin t - \frac{1}{6} \sin 2t \right).$$