From df202700915006241bff0242b28ec9761992094e Mon Sep 17 00:00:00 2001 From: Worker Agent Date: Thu, 4 Jun 2026 16:05:26 -0500 Subject: [PATCH] fix(ch5): correct VoP Example 2 sign, remove misleading text, clean Example 6 --- chapters/ch05_second_order_nonhomogeneous.tex | 140 +++++------------- 1 file changed, 40 insertions(+), 100 deletions(-) diff --git a/chapters/ch05_second_order_nonhomogeneous.tex b/chapters/ch05_second_order_nonhomogeneous.tex index 938559b..74b6005 100644 --- a/chapters/ch05_second_order_nonhomogeneous.tex +++ b/chapters/ch05_second_order_nonhomogeneous.tex @@ -399,99 +399,40 @@ There is one important caveat: if any term of your initial guess \textbf{already y_p' &= (3Ax^2 + 2Bx)e^{-x} - (Ax^3 + Bx^2)e^{-x} = (-Ax^3 + (3A-B)x^2 + 2Bx)\,e^{-x}, \\ y_p'' &= (-3Ax^2 + 2(3A-B)x + 2B)e^{-x} - (-Ax^3 + (3A-B)x^2 + 2Bx)e^{-x} \\ - &= \bigl[Ax^3 + (-3A + 2(3A-B) - (3A-B))x^2 + \dots\bigr]e^{-x}. - \end{aligned} - \] - Let me compute more carefully. Using the product rule systematically: - \[ - \begin{aligned} - y_p &= (Ax^3 + Bx^2)e^{-x}, \\ - y_p' &= (3Ax^2 + 2Bx - Ax^3 - Bx^2)e^{-x}, \\ - y_p'' &= (6Ax + 2B - 3Ax^2 - 2Bx - (3Ax^2 + 2Bx - Ax^3 - Bx^2))e^{-x} \\ - &= (Ax^3 - 5Ax^2 + (6A-4B)x + 2B)\,e^{-x}. - \end{aligned} - \] - Now substitute into $y'' + 2y' + y$: - \[ - \begin{aligned} - y_p'' + 2y_p' + y_p &= e^{-x}\Bigl[ - (Ax^3 - 5Ax^2 + (6A-4B)x + 2B) \\ - &\quad + 2(-Ax^3 + (3A-B)x^2 + 2Bx) - + (Ax^3 + Bx^2) - \Bigr] \\ - &= e^{-x}\Bigl[ - (A - 2A + A)x^3 + (-5A + 6A - 2B + B)x^2 + (6A - 4B + 4B)x + 2B - \Bigr] \\ - &= e^{-x}\Bigl[ (A-B)x^2 + 6Ax + 2B \Bigr]. - \end{aligned} - \] - Set equal to $g(x) = 3x\,e^{-x}$: - \[ - (A - B)x^2 + 6Ax + 2B = 3x. - \] - Equate coefficients: - \[ - \begin{cases} - A - B = 0 \quad\Longrightarrow\quad A = B, \\ - 6A = 3 \quad\Longrightarrow\quad A = \dfrac{1}{2}, \\ - 2B = 0 \quad\Longrightarrow\quad B = 0. - \end{cases} - \] - Wait --- $A = B$ from the first equation, but $A = 1/2$ and $B = 0$ from the others. Let me recheck the $x^2$ coefficient in $y_p''$. - - Let me redo this more carefully with a different approach. Set $y_p = e^{-x}(Ax^3 + Bx^2)$. - - \[ - \begin{aligned} - y_p' &= -e^{-x}(Ax^3 + Bx^2) + e^{-x}(3Ax^2 + 2Bx) \\ - &= e^{-x}\bigl(-Ax^3 + (3A-B)x^2 + 2Bx\bigr), \\ - y_p'' &= -e^{-x}\bigl(-Ax^3 + (3A-B)x^2 + 2Bx\bigr) - + e^{-x}\bigl(-3Ax^2 + 2(3A-B)x + 2B\bigr) \\ - &= e^{-x}\Bigl(Ax^3 - (3A-B+3A)x^2 + (2(3A-B)-2B)x + 2B\Bigr) \\ - &= e^{-x}\Bigl(Ax^3 - (6A-B)x^2 + (6A-4B)x + 2B\Bigr). - \end{aligned} - \] - Now $y'' + 2y' + y$: - \[ - \begin{aligned} - &e^{-x}\Bigl[ - \bigl(Ax^3 - (6A-B)x^2 + (6A-4B)x + 2B\bigr) \\ - &\quad + 2\bigl(-Ax^3 + (3A-B)x^2 + 2Bx\bigr) - + (Ax^3 + Bx^2) - \Bigr] \\ - &= e^{-x}\Bigl[ - (A - 2A + A)x^3 \\ - &\quad + \bigl(-(6A-B) + 2(3A-B) + B\bigr)x^2 \\ - &\quad + \bigl((6A-4B) + 4B\bigr)x + 2B - \Bigr] \\ - &= e^{-x}\Bigl[ 0\cdot x^3 + (A - B)x^2 + 6Ax + 2B \Bigr]. - \end{aligned} - \] - Set equal to $3x\,e^{-x}$: - \[ - \begin{cases} - A - B = 0 \quad\Longrightarrow\quad A = B, \\ - 6A = 3 \quad\Longrightarrow\quad A = \dfrac{1}{2}, \\ - 2B = 0 \quad\Longrightarrow\quad B = 0. - \end{cases} - \] - These are inconsistent. The issue is that the guess $x^2 e^{-x}(Ax + B)$ introduces a $Bx^2 e^{-x}$ term whose second derivative + $2y' + y$ does not vanish. Let me try the correct guess: since $e^{-x}$ and $xe^{-x}$ are in $y_h$, the unmodified guess for $xe^{-x}$ is $e^{-x}(Ax + B)$. Overlap on both terms $\Rightarrow$ multiply by $x^2$: - \[ - y_p = x^2 e^{-x}(Ax + B). - \] - This is what I computed. The inconsistency means I made an arithmetic error. Let me re-examine the $x^2$ coefficient: - $-(6A-B) + 2(3A-B) + B = -6A + B + 6A - 2B + B = 0$. So the $x^2$ coefficient is actually $0$, not $A - B$. Let me redo: - \[ - \text{Coefficient of } x^2: \quad -6A + B + 6A - 2B + B = 0. - \] - Good, that cancels. So the remaining equations are: - \[ - \begin{cases} - 6A = 3 \quad\Longrightarrow\quad A = \dfrac{1}{2}, \\ - 2B = 0 \quad\Longrightarrow\quad B = 0. - \end{cases} - \] - So $y_p(x) = \dfrac{1}{2}x^3 e^{-x}$. + &= \bigl[Ax^3 + (-3A + 2(3A-B) - (3A-B))x^2 + \dots\bigr]e^{-x}. + \end{aligned} + \] + Computing $y_p''$ more carefully with the product rule: + \[ + \begin{aligned} + y_p' &= e^{-x}\bigl(-Ax^3 + (3A-B)x^2 + 2Bx\bigr), \\ + y_p'' &= e^{-x}\Bigl(Ax^3 - (6A-B)x^2 + (6A-4B)x + 2B\Bigr). + \end{aligned} + \] + Now substitute into $y'' + 2y' + y$: + \[ + \begin{aligned} + y_p'' + 2y_p' + y_p &= e^{-x}\Bigl[ + \bigl(Ax^3 - (6A-B)x^2 + (6A-4B)x + 2B\bigr) \\ + &\quad + 2\bigl(-Ax^3 + (3A-B)x^2 + 2Bx\bigr) + + (Ax^3 + Bx^2) + \Bigr] \\ + &= e^{-x}\Bigl[ + (A - 2A + A)x^3 + + \bigl(-(6A-B) + 2(3A-B) + B\bigr)x^2 \\ + &\quad + \bigl((6A-4B) + 4B\bigr)x + 2B + \Bigr] \\ + &= e^{-x}\Bigl[ 0\cdot x^3 + 0\cdot x^2 + 6Ax + 2B \Bigr]. + \end{aligned} + \] + Set equal to $g(x) = 3x\,e^{-x}$: + \[ + \begin{cases} + 6A = 3 \quad\Longrightarrow\quad A = \dfrac{1}{2}, \\ + 2B = 0 \quad\Longrightarrow\quad B = 0. + \end{cases} + \] + So $y_p(x) = \dfrac{1}{2}x^3 e^{-x}$. \textit{Step 3: General solution.} \[ @@ -703,7 +644,7 @@ Integrate to find $u_1$ and $u_2$ (we may choose any antiderivatives; we set the \[ \begin{aligned} u_2(x) &= \frac{1}{2}\int \left(e^{-x} - \frac{1}{1+e^x}\right)\diff x \\ - &= \frac{1}{2}\Bigl(-e^{-x} - \ln(1+e^x) + x\Bigr). + &= \frac{1}{2}\Bigl(-e^{-x} - x + \ln(1+e^x)\Bigr). \end{aligned} \] (The second integral: $\int \frac{1}{1+e^x}\diff x = x - \ln(1+e^x)$, obtained by writing $\frac{1}{1+e^x} = 1 - \frac{e^x}{1+e^x}$.) @@ -712,16 +653,15 @@ Integrate to find $u_1$ and $u_2$ (we may choose any antiderivatives; we set the \[ \begin{aligned} y_p(x) &= u_1(x)\,y_1(x) + u_2(x)\,y_2(x) \\ - &= -\frac{1}{2}\ln(1+e^x)\,e^x + \frac{1}{2}\Bigl(-e^{-x} - \ln(1+e^x) + x\Bigr)e^{3x} \\ - &= -\frac{1}{2}e^x\ln(1+e^x) - \frac{1}{2}e^{2x} - \frac{1}{2}e^{3x}\ln(1+e^x) + \frac{1}{2}x\,e^{3x}. - \end{aligned} - \] - The term $-\frac{1}{2}e^{3x}\ln(1+e^x)$ can be absorbed into the homogeneous part for large $x$, but it is part of the particular solution as computed. The term $-\frac{1}{2}e^{2x}$ is not a homogeneous solution, so it stays. + &= -\frac{1}{2}\ln(1+e^x)\,e^x + \frac{1}{2}\Bigl(-e^{-x} - x + \ln(1+e^x)\Bigr)e^{3x} \\ + &= -\frac{1}{2}e^x\ln(1+e^x) - \frac{1}{2}e^{2x} + \frac{1}{2}e^{3x}\ln(1+e^x) - \frac{1}{2}x\,e^{3x}. + \end{aligned} + \] \textit{Step 5: General solution.} \[ y(x) = c_1 e^x + c_2 e^{3x} - \frac{1}{2}e^x\ln(1+e^x) - - \frac{1}{2}e^{3x}\ln(1+e^x) - \frac{1}{2}e^{2x} + \frac{1}{2}x\,e^{3x}. + + \frac{1}{2}e^{3x}\ln(1+e^x) - \frac{1}{2}e^{2x} - \frac{1}{2}x\,e^{3x}. \] \end{workedexample}