### Solving Second-Order ODE by Variation of Parameters To solve $y'' + P(x)y' + Q(x)y = f(x)$: 1. **Complementary Solution ($y_c$):** Find the general solution to the homogeneous equation $y'' + P(x)y' + Q(x)y = 0$. * This gives $y_c = C_1y_1(x) + C_2y_2(x)$. 2. **Wronskian ($W, W_1, W_2$):** Calculate the Wronskians. $$W(y_1, y_2) = \begin{vmatrix} y_1 & y_2 \\ y_1' & y_2' \end{vmatrix} = y_1y_2' - y_2y_1'$$ $$W_1 = \begin{vmatrix} 0 & y_2 \\ f(x) & y_2' \end{vmatrix} = -y_2f(x)$$ $$W_2 = \begin{vmatrix} y_1 & 0 \\ y_1' & f(x) \end{vmatrix} = y_1f(x)$$ *Note: Ensure the ODE is in standard form ($y''$ coefficient is 1) before identifying $f(x)$. If not, divide by the coefficient of $y''$.* 3. **Find $u_1$ and $u_2$:** $$u_1' = \frac{W_1}{W} \implies u_1 = \int \frac{W_1}{W} dx$$ $$u_2' = \frac{W_2}{W} \implies u_2 = \int \frac{W_2}{W} dx$$ 4. **Particular Solution ($y_p$):** $$y_p = u_1y_1 + u_2y_2$$ 5. **General Solution ($y$):** $$y = y_c + y_p = C_1y_1 + C_2y_2 + u_1y_1 + u_2y_2$$ #### Example 1: $y'' - 4y' + 4y = (x+1)e^{2x}$ 1. **Complementary Solution:** Auxiliary equation: $m^2 - 4m + 4 = 0 \implies (m-2)^2 = 0 \implies m=2$ (repeated root). $y_c = C_1e^{2x} + C_2xe^{2x}$ Here, $y_1 = e^{2x}$, $y_2 = xe^{2x}$, and $f(x) = (x+1)e^{2x}$. 2. **Wronskians:** $y_1' = 2e^{2x}$, $y_2' = e^{2x} + 2xe^{2x} = (1+2x)e^{2x}$ $$W = \begin{vmatrix} e^{2x} & xe^{2x} \\ 2e^{2x} & (1+2x)e^{2x} \end{vmatrix} = e^{2x}(1+2x)e^{2x} - xe^{2x}(2e^{2x}) = (1+2x)e^{4x} - 2xe^{4x} = e^{4x}$$ $$W_1 = \begin{vmatrix} 0 & xe^{2x} \\ (x+1)e^{2x} & (1+2x)e^{2x} \end{vmatrix} = -xe^{2x}(x+1)e^{2x} = -(x^2+x)e^{4x}$$ $$W_2 = \begin{vmatrix} e^{2x} & 0 \\ 2e^{2x} & (x+1)e^{2x} \end{vmatrix} = e^{2x}(x+1)e^{2x} = (x+1)e^{4x}$$ 3. **Find $u_1$ and $u_2$:** $$u_1' = \frac{-(x^2+x)e^{4x}}{e^{4x}} = -(x^2+x) \implies u_1 = \int (-x^2-x)dx = -\frac{x^3}{3} - \frac{x^2}{2}$$ $$u_2' = \frac{(x+1)e^{4x}}{e^{4x}} = x+1 \implies u_2 = \int (x+1)dx = \frac{x^2}{2} + x$$ 4. **Particular Solution:** $$y_p = \left(-\frac{x^3}{3} - \frac{x^2}{2}\right)e^{2x} + \left(\frac{x^2}{2} + x\right)xe^{2x} = \left(-\frac{x^3}{3} - \frac{x^2}{2} + \frac{x^3}{2} + x^2\right)e^{2x} = \left(\frac{x^3}{6} + \frac{x^2}{2}\right)e^{2x}$$ 5. **General Solution:** $$y = C_1e^{2x} + C_2xe^{2x} + \left(\frac{x^3}{6} + \frac{x^2}{2}\right)e^{2x}$$ #### Example 2: $4y'' + 36y = \csc(3x)$ 1. **Complementary Solution:** First, divide by 4 to get $y'' + 9y = \frac{1}{4}\csc(3x)$. Auxiliary equation: $4m^2 + 36 = 0 \implies m^2 + 9 = 0 \implies m = \pm 3i$. $y_c = C_1\cos(3x) + C_2\sin(3x)$ Here, $y_1 = \cos(3x)$, $y_2 = \sin(3x)$, and $f(x) = \frac{1}{4}\csc(3x)$. 2. **Wronskians:** $y_1' = -3\sin(3x)$, $y_2' = 3\cos(3x)$ $$W = \begin{vmatrix} \cos(3x) & \sin(3x) \\ -3\sin(3x) & 3\cos(3x) \end{vmatrix} = 3\cos^2(3x) - (-3\sin^2(3x)) = 3(\cos^2(3x) + \sin^2(3x)) = 3$$ $$W_1 = \begin{vmatrix} 0 & \sin(3x) \\ \frac{1}{4}\csc(3x) & 3\cos(3x) \end{vmatrix} = -\sin(3x)\left(\frac{1}{4}\csc(3x)\right) = -\frac{1}{4}$$ $$W_2 = \begin{vmatrix} \cos(3x) & 0 \\ -3\sin(3x) & \frac{1}{4}\csc(3x) \end{vmatrix} = \cos(3x)\left(\frac{1}{4}\csc(3x)\right) = \frac{1}{4}\frac{\cos(3x)}{\sin(3x)} = \frac{1}{4}\cot(3x)$$ 3. **Find $u_1$ and $u_2$:** $$u_1' = \frac{-1/4}{3} = -\frac{1}{12} \implies u_1 = \int -\frac{1}{12}dx = -\frac{1}{12}x$$ $$u_2' = \frac{\frac{1}{4}\cot(3x)}{3} = \frac{1}{12}\cot(3x) \implies u_2 = \int \frac{1}{12}\cot(3x)dx = \frac{1}{12}\cdot\frac{1}{3}\ln|\sin(3x)| = \frac{1}{36}\ln|\sin(3x)|$$ 4. **Particular Solution:** $$y_p = \left(-\frac{1}{12}x\right)\cos(3x) + \left(\frac{1}{36}\ln|\sin(3x)|\right)\sin(3x)$$ 5. **General Solution:** $$y = C_1\cos(3x) + C_2\sin(3x) - \frac{1}{12}x\cos(3x) + \frac{1}{36}\ln|\sin(3x)|\sin(3x)$$ ### Cauchy-Euler Equations A second-order Cauchy-Euler equation has the form $ax^2y'' + bxy' + cy = 0$. 1. **Auxiliary Equation:** Assume $y = x^m$. Then $y' = mx^{m-1}$ and $y'' = m(m-1)x^{m-2}$. Substitute into the ODE: $ax^2(m(m-1)x^{m-2}) + bx(mx^{m-1}) + cx^m = 0$ $a m(m-1)x^m + bmx^m + cx^m = 0$ Since $x^m \neq 0$, we get the auxiliary equation: $am(m-1) + bm + c = 0$. This simplifies to $am^2 + (b-a)m + c = 0$. 2. **Roots and Solutions:** * **Distinct Real Roots ($m_1, m_2$):** $y = C_1x^{m_1} + C_2x^{m_2}$ * **Repeated Real Root ($m_1 = m_2 = m$):** $y = C_1x^m + C_2x^m \ln|x|$ * **Complex Conjugate Roots ($m = \alpha \pm i\beta$):** $y = x^\alpha(C_1\cos(\beta \ln|x|) + C_2\sin(\beta \ln|x|))$ #### Example 1: $x^2y'' - 2y = 0$ 1. **Auxiliary Equation:** $a=1, b=0, c=-2$. $m(m-1) - 2 = 0 \implies m^2 - m - 2 = 0 \implies (m-2)(m+1) = 0$. 2. **Roots and Solution:** Distinct real roots: $m_1 = 2, m_2 = -1$. $y = C_1x^2 + C_2x^{-1} = C_1x^2 + \frac{C_2}{x}$. #### Example 2: $4x^2y'' + y = 0$ 1. **Auxiliary Equation:** $a=4, b=0, c=1$. $4m(m-1) + 1 = 0 \implies 4m^2 - 4m + 1 = 0 \implies (2m-1)^2 = 0$. 2. **Roots and Solution:** Repeated real root: $m = \frac{1}{2}$. $y = C_1x^{1/2} + C_2x^{1/2}\ln|x|$. #### Example 3: $3x^2y'' + 6xy' + y = 0$ 1. **Auxiliary Equation:** $a=3, b=6, c=1$. $3m(m-1) + 6m + 1 = 0 \implies 3m^2 - 3m + 6m + 1 = 0 \implies 3m^2 + 3m + 1 = 0$. Using quadratic formula: $m = \frac{-3 \pm \sqrt{3^2 - 4(3)(1)}}{2(3)} = \frac{-3 \pm \sqrt{9-12}}{6} = \frac{-3 \pm \sqrt{-3}}{6} = \frac{-3 \pm i\sqrt{3}}{6} = -\frac{1}{2} \pm i\frac{\sqrt{3}}{6}$. 2. **Roots and Solution:** Complex conjugate roots: $\alpha = -\frac{1}{2}$, $\beta = \frac{\sqrt{3}}{6}$. $y = x^{-1/2}\left(C_1\cos\left(\frac{\sqrt{3}}{6}\ln|x|\right) + C_2\sin\left(\frac{\sqrt{3}}{6}\ln|x|\right)\right)$. ### Laplace Transforms: Definitions - **Definition:** $\mathcal{L}\{f(t)\} = F(s) = \int_0^\infty e^{-st}f(t)dt$ - **Linearity:** $\mathcal{L}\{af(t) + bg(t)\} = a\mathcal{L}\{f(t)\} + b\mathcal{L}\{g(t)\} = aF(s) + bG(s)$ #### Common Transforms - $\mathcal{L}\{1\} = \frac{1}{s}$ - $\mathcal{L}\{t^n\} = \frac{n!}{s^{n+1}}$ (for $n=0,1,2,\dots$) - $\mathcal{L}\{e^{at}\} = \frac{1}{s-a}$ - $\mathcal{L}\{\sin(kt)\} = \frac{k}{s^2+k^2}$ - $\mathcal{L}\{\cos(kt)\} = \frac{s}{s^2+k^2}$ #### Properties of Laplace Transforms - **First Translation Theorem (Shifting on the s-axis):** $\mathcal{L}\{e^{at}f(t)\} = F(s-a)$ - $\mathcal{L}\{e^{at}t^n\} = \frac{n!}{(s-a)^{n+1}}$ - $\mathcal{L}\{e^{at}\sin(kt)\} = \frac{k}{(s-a)^2+k^2}$ - $\mathcal{L}\{e^{at}\cos(kt)\} = \frac{s-a}{(s-a)^2+k^2}$ - **Transforms of Derivatives:** - $\mathcal{L}\{y'(t)\} = sY(s) - y(0)$ - $\mathcal{L}\{y''(t)\} = s^2Y(s) - sy(0) - y'(0)$ - $\mathcal{L}\{y^{(n)}(t)\} = s^nY(s) - s^{n-1}y(0) - \dots - y^{(n-1)}(0)$ - **Transform of $t^n f(t)$:** $\mathcal{L}\{t^n f(t)\} = (-1)^n \frac{d^n}{ds^n}F(s)$ - $\mathcal{L}\{t\sin(kt)\} = (-1)^1 \frac{d}{ds}\left(\frac{k}{s^2+k^2}\right) = -k \frac{-2s}{(s^2+k^2)^2} = \frac{2ks}{(s^2+k^2)^2}$ - $\mathcal{L}\{t\cos(kt)\} = (-1)^1 \frac{d}{ds}\left(\frac{s}{s^2+k^2}\right) = -\frac{(s^2+k^2)(1) - s(2s)}{(s^2+k^2)^2} = -\frac{s^2+k^2-2s^2}{(s^2+k^2)^2} = \frac{s^2-k^2}{(s^2+k^2)^2}$ - **Convolution Theorem:** $\mathcal{L}\{f(t) * g(t)\} = F(s)G(s)$ - Where $f(t) * g(t) = \int_0^t f(\tau)g(t-\tau)d\tau$ #### Solving Initial-Value Problems (IVPs) using Laplace Transforms 1. **Transform the ODE:** Apply the Laplace transform to both sides of the differential equation, using the linearity property and derivative transforms. Substitute initial conditions. 2. **Algebraic Manipulation:** Solve the resulting algebraic equation for $Y(s) = \mathcal{L}\{y(t)\}$. 3. **Partial Fractions:** Decompose $Y(s)$ into partial fractions. 4. **Inverse Transform:** Apply the inverse Laplace transform $\mathcal{L}^{-1}$ to $Y(s)$ to find $y(t)$. #### Example: $y'' - 4y' = 6e^{3t} - 3e^{-t}$, $y(0)=1, y'(0)=-1$ 1. **Transform the ODE:** $\mathcal{L}\{y''\} - 4\mathcal{L}\{y'\} = 6\mathcal{L}\{e^{3t}\} - 3\mathcal{L}\{e^{-t}\}$ $(s^2Y(s) - sy(0) - y'(0)) - 4(sY(s) - y(0)) = 6\left(\frac{1}{s-3}\right) - 3\left(\frac{1}{s+1}\right)$ $(s^2Y(s) - s(1) - (-1)) - 4(sY(s) - 1) = \frac{6}{s-3} - \frac{3}{s+1}$ $s^2Y(s) - s + 1 - 4sY(s) + 4 = \frac{6}{s-3} - \frac{3}{s+1}$ $(s^2 - 4s)Y(s) - s + 5 = \frac{6}{s-3} - \frac{3}{s+1}$ 2. **Algebraic Manipulation:** $s(s-4)Y(s) = s - 5 + \frac{6}{s-3} - \frac{3}{s+1}$ $Y(s) = \frac{s-5}{s(s-4)} + \frac{6}{s(s-4)(s-3)} - \frac{3}{s(s-4)(s+1)}$ 3. **Partial Fractions:** (This step can be lengthy, showing the final combined result) $Y(s) = \frac{5/4}{s} - \frac{1/4}{s-4} + \frac{2}{s-3} - \frac{1/2}{s} + \frac{3/2}{s-4} - \frac{3/5}{s} + \frac{3/4}{s-4} + \frac{3/20}{s+1}$ Combine terms for each denominator: $Y(s) = \left(\frac{5}{4} - \frac{1}{2} - \frac{3}{5}\right)\frac{1}{s} + \left(-\frac{1}{4} + \frac{3}{2} + \frac{3}{4}\right)\frac{1}{s-4} + \frac{2}{s-3} + \frac{3/20}{s+1}$ $Y(s) = \frac{5/20}{s} + \frac{11/4}{s-4} + \frac{2}{s-3} + \frac{3/20}{s+1}$ (Error in original document, $5/20$ should be $5/4 - 1/2 - 3/5 = (25-10-12)/20 = 3/20$) $Y(s) = \frac{3/20}{s} + \frac{11/4}{s-4} + \frac{2}{s-3} + \frac{3/20}{s+1}$ 4. **Inverse Transform:** $y(t) = \mathcal{L}^{-1}\{Y(s)\} = \frac{3}{20}\mathcal{L}^{-1}\left\{\frac{1}{s}\right\} + \frac{11}{4}\mathcal{L}^{-1}\left\{\frac{1}{s-4}\right\} + 2\mathcal{L}^{-1}\left\{\frac{1}{s-3}\right\} + \frac{3}{20}\mathcal{L}^{-1}\left\{\frac{1}{s+1}\right\}$ $y(t) = \frac{3}{20} + \frac{11}{4}e^{4t} + 2e^{3t} + \frac{3}{20}e^{-t}$