------------------------------
So first we find:
∫ p(x) dx = ∫ − (x² − 2)/(x(x − 2)) dx -----> use partial fractions
. . . . . . . = − ∫ (1/x + 1/(x−2) + 1) dx
. . . . . . . = − (ln(x) + ln(x−2) + x)
e^(−∫ p(x) dx) = e^(ln(x) + ln(x−2) + x)
. . . . . . . . . . . = e^ln(x) * e^ln(x−2) * e^x
. . . . . . . . . . . = x (x−2) e^x
------------------------------
v(x) = C ∫ ( e^(−∫ p(x) dx) / y₁² dx)
. . . . = C ∫ x (x−2) e^x / e^(2x) dx
. . . . = C ∫ x (x−2) e^(−x) dx
. . . . = C ∫ (x² − 2x) e^(−x) dx
Note that d/dx (f(x) e^(−x)) = −f(x) e^(−x) + f'(x) e^(−x) = −e^(−x) (f(x) − f'(x))
So if we let f(x) = x², then d/dx (x² e^(−x)) = −e^(−x) (x² − 2x)
Therefore:
v(x) = −C(x² e^(−x))
. . . . = C₀ x² e^(−x)
If we let C₀ = 1, t hen we get:
y₂(x) = y₁(x) v(x)
y₂(x) = e^x * x² e^(−x)
y₂(x) = x²
Solution to differential equation: y = c₁ e^x + c₂ x²