fix(ch5): correct VoP Example 2 sign, remove misleading text, clean Example 6

This commit is contained in:
Worker Agent
2026-06-04 16:05:26 -05:00
parent b826747f30
commit df20270091

View File

@@ -402,89 +402,30 @@ There is one important caveat: if any term of your initial guess \textbf{already
&= \bigl[Ax^3 + (-3A + 2(3A-B) - (3A-B))x^2 + \dots\bigr]e^{-x}. &= \bigl[Ax^3 + (-3A + 2(3A-B) - (3A-B))x^2 + \dots\bigr]e^{-x}.
\end{aligned} \end{aligned}
\] \]
Let me compute more carefully. Using the product rule systematically: Computing $y_p''$ more carefully with the product rule:
\[ \[
\begin{aligned} \begin{aligned}
y_p &= (Ax^3 + Bx^2)e^{-x}, \\ y_p' &= e^{-x}\bigl(-Ax^3 + (3A-B)x^2 + 2Bx\bigr), \\
y_p' &= (3Ax^2 + 2Bx - Ax^3 - Bx^2)e^{-x}, \\ y_p'' &= e^{-x}\Bigl(Ax^3 - (6A-B)x^2 + (6A-4B)x + 2B\Bigr).
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} \end{aligned}
\] \]
Now substitute into $y'' + 2y' + y$: Now substitute into $y'' + 2y' + y$:
\[ \[
\begin{aligned} \begin{aligned}
y_p'' + 2y_p' + y_p &= e^{-x}\Bigl[ 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) \\ \bigl(Ax^3 - (6A-B)x^2 + (6A-4B)x + 2B\bigr) \\
&\quad + 2\bigl(-Ax^3 + (3A-B)x^2 + 2Bx\bigr) &\quad + 2\bigl(-Ax^3 + (3A-B)x^2 + 2Bx\bigr)
+ (Ax^3 + Bx^2) + (Ax^3 + Bx^2)
\Bigr] \\ \Bigr] \\
&= e^{-x}\Bigl[ &= e^{-x}\Bigl[
(A - 2A + A)x^3 \\ (A - 2A + A)x^3
&\quad + \bigl(-(6A-B) + 2(3A-B) + B\bigr)x^2 \\ + \bigl(-(6A-B) + 2(3A-B) + B\bigr)x^2 \\
&\quad + \bigl((6A-4B) + 4B\bigr)x + 2B &\quad + \bigl((6A-4B) + 4B\bigr)x + 2B
\Bigr] \\ \Bigr] \\
&= e^{-x}\Bigl[ 0\cdot x^3 + (A - B)x^2 + 6Ax + 2B \Bigr]. &= e^{-x}\Bigl[ 0\cdot x^3 + 0\cdot x^2 + 6Ax + 2B \Bigr].
\end{aligned} \end{aligned}
\] \]
Set equal to $3x\,e^{-x}$: Set equal to $g(x) = 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} \begin{cases}
6A = 3 \quad\Longrightarrow\quad A = \dfrac{1}{2}, \\ 6A = 3 \quad\Longrightarrow\quad A = \dfrac{1}{2}, \\
@@ -703,7 +644,7 @@ Integrate to find $u_1$ and $u_2$ (we may choose any antiderivatives; we set the
\[ \[
\begin{aligned} \begin{aligned}
u_2(x) &= \frac{1}{2}\int \left(e^{-x} - \frac{1}{1+e^x}\right)\diff x \\ 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} \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}$.) (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} \begin{aligned}
y_p(x) &= u_1(x)\,y_1(x) + u_2(x)\,y_2(x) \\ 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}\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}. &= -\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} \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.
\textit{Step 5: General solution.} \textit{Step 5: General solution.}
\[ \[
y(x) = c_1 e^x + c_2 e^{3x} - \frac{1}{2}e^x\ln(1+e^x) 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} \end{workedexample}