A-Level Further Mathematics – Chapter 10: Second-Order Differential Equations Further Pure
Contents
10.1 Introduction to Second-Order ODEs
A second-order ordinary differential equation (ODE) involves a second derivative $\dfrac{d^2y}{dx^2}$. The order of an ODE is the highest derivative present; the degree is the power to which that highest derivative is raised (when the equation is polynomial in its derivatives).
Definition — Second-Order Linear ODE
The general second-order linear ODE with constant coefficients has the form:
$$a\frac{d^2y}{dx^2} + b\frac{dy}{dx} + cy = f(x)$$
where $a, b, c$ are real constants with $a \neq 0$ and $f(x)$ is a given function of $x$.
- When $f(x) = 0$, the equation is homogeneous.
- When $f(x) \neq 0$, the equation is non-homogeneous.
Theorem — Structure of the General Solution
The general solution to a non-homogeneous second-order linear ODE is:
$$y = y_{\text{CF}} + y_{\text{PI}}$$
where:
- $y_{\text{CF}}$ is the Complementary Function — the general solution to the associated homogeneous equation $ay'' + by' + cy = 0$. It contains two arbitrary constants.
- $y_{\text{PI}}$ is a Particular Integral — any one solution to the full non-homogeneous equation. It contains no arbitrary constants.
Example 10.1.1 — Identifying Order and Degree
Classify each ODE and state whether it is homogeneous:
- $y'' + 3y' - 4y = 0$ → Order 2, degree 1, homogeneous.
- $y'' - 5y' + 6y = e^{2x}$ → Order 2, degree 1, non-homogeneous.
- $(y'')^2 + y = x$ → Order 2, degree 2 (non-linear; not covered by the CF+PI method).
- $y'' + \omega^2 y = \cos\omega x$ → Order 2, degree 1, non-homogeneous; this is the resonance case.
Exam Tip
Always identify the order before attempting a solution. A second-order equation has a general solution with exactly two arbitrary constants; boundary conditions are needed to determine both.
10.2 Homogeneous Second-Order ODEs
To solve $ay'' + by' + cy = 0$, try $y = e^{mx}$. Substituting gives the auxiliary equation:
$$am^2 + bm + c = 0$$
The nature of the roots of this quadratic determines the form of the complementary function.
Theorem — Three Cases for the Complementary Function
Case 1 — Two real distinct roots $m_1 \neq m_2$:
$$y_{\text{CF}} = Ae^{m_1 x} + Be^{m_2 x}$$
Case 2 — Repeated root $m_1 = m_2 = m$:
$$y_{\text{CF}} = (A + Bx)e^{mx}$$
Case 3 — Complex roots $m = \alpha \pm \beta i$:
$$y_{\text{CF}} = e^{\alpha x}(A\cos\beta x + B\sin\beta x)$$
In all cases, $A$ and $B$ are arbitrary real constants determined by boundary conditions.
Figure 10.1 — Family of solutions $y = Ae^{-x} + Be^{-3x}$ (auxiliary roots $m = -1, -3$) for various values of $A$ and $B$, illustrating overdamped behaviour.
Example 10.2.1 — Case 1: Two Real Distinct Roots
Solve $y'' + 4y' + 3y = 0$.
Step 1 Write the auxiliary equation: $m^2 + 4m + 3 = 0$.
Step 2 Factorise: $(m+1)(m+3) = 0$, giving $m = -1$ or $m = -3$.
Step 3 Two distinct real roots, so the general solution is:
$$y = Ae^{-x} + Be^{-3x}$$
Example 10.2.2 — Case 2: Repeated Root
Solve $y'' - 6y' + 9y = 0$.
Step 1 Auxiliary equation: $m^2 - 6m + 9 = 0$.
Step 2 Factorise: $(m-3)^2 = 0$, giving $m = 3$ (repeated).
Step 3 Repeated root, so:
$$y = (A + Bx)e^{3x}$$
Example 10.2.3 — Case 3: Complex Roots
Solve $y'' + 2y' + 5y = 0$.
Step 1 Auxiliary equation: $m^2 + 2m + 5 = 0$.
Step 2 Quadratic formula: $m = \dfrac{-2 \pm \sqrt{4 - 20}}{2} = -1 \pm 2i$.
Step 3 $\alpha = -1$, $\beta = 2$, so:
$$y = e^{-x}(A\cos 2x + B\sin 2x)$$
This represents a damped oscillation — the amplitude decays exponentially as $x \to \infty$.
Figure 10.2 — Underdamped solution $y = e^{-x}(\cos 2x + \sin 2x)$ (i.e.\ $A = B = 1$) with dashed exponential envelopes $\pm\sqrt{2}\,e^{-x}$, showing oscillation with decaying amplitude.
Example 10.2.4 — Pure Imaginary Roots (Simple Harmonic)
Solve $y'' + 9y = 0$.
Step 1 Auxiliary equation: $m^2 + 9 = 0 \Rightarrow m = \pm 3i$.
Step 2 $\alpha = 0$, $\beta = 3$, so:
$$y = A\cos 3x + B\sin 3x$$
This is undamped oscillation (simple harmonic motion with angular frequency $3$).
Exam Tip
For Case 3, always write the complex roots as $\alpha \pm \beta i$ and read off $\alpha$ (for the exponential) and $\beta$ (for the trig functions). Do not confuse $\alpha$ and $\beta$ with the roots themselves.
10.3 Non-Homogeneous ODEs and Particular Integrals
For $ay'' + by' + cy = f(x)$ with $f(x) \neq 0$, we need a Particular Integral $y_{\text{PI}}$. The trial function (also called the method of undetermined coefficients) chooses a form for $y_{\text{PI}}$ that mirrors $f(x)$.
Table of Trial Functions
- $f(x) = $ polynomial of degree $n$ → Try $y_{\text{PI}} = p_n x^n + \cdots + p_1 x + p_0$ (full polynomial of degree $n$).
- $f(x) = ke^{px}$ → Try $y_{\text{PI}} = \lambda e^{px}$, provided $p$ is not a root of the auxiliary equation.
- $f(x) = k\cos nx$ or $k\sin nx$ → Try $y_{\text{PI}} = \lambda\cos nx + \mu\sin nx$.
- Resonance: If the trial function duplicates part of $y_{\text{CF}}$, multiply by $x$ (or $x^2$ for a repeated root).
Example 10.3.1 — Exponential Right-Hand Side
Find the general solution of $y'' - 5y' + 6y = e^{4x}$.
CF Auxiliary equation: $m^2 - 5m + 6 = 0 \Rightarrow (m-2)(m-3) = 0$.
Roots $m = 2, 3$, so $y_{\text{CF}} = Ae^{2x} + Be^{3x}$.
PI Try $y_{\text{PI}} = \lambda e^{4x}$. Then $y'' = 16\lambda e^{4x}$, $y' = 4\lambda e^{4x}$.
Substituting: $16\lambda - 20\lambda + 6\lambda = 1 \Rightarrow 2\lambda = 1 \Rightarrow \lambda = \tfrac{1}{2}$.
So $y_{\text{PI}} = \tfrac{1}{2}e^{4x}$.
GS $$y = Ae^{2x} + Be^{3x} + \tfrac{1}{2}e^{4x}$$
Example 10.3.2 — Polynomial Right-Hand Side
Find the general solution of $y'' + y' - 2y = 4x + 1$.
CF $m^2 + m - 2 = 0 \Rightarrow (m+2)(m-1) = 0$, roots $m = -2, 1$.
$y_{\text{CF}} = Ae^{-2x} + Be^{x}$.
PI Try $y_{\text{PI}} = px + q$. Then $y'' = 0$, $y' = p$.
Substituting: $0 + p - 2(px + q) = 4x + 1$
$\Rightarrow -2px + (p - 2q) = 4x + 1$.
Comparing coefficients: $-2p = 4 \Rightarrow p = -2$; $\;p - 2q = 1 \Rightarrow -2 - 2q = 1 \Rightarrow q = -\tfrac{3}{2}$.
$y_{\text{PI}} = -2x - \tfrac{3}{2}$.
GS $$y = Ae^{-2x} + Be^{x} - 2x - \tfrac{3}{2}$$
Example 10.3.3 — Trigonometric Right-Hand Side
Solve $y'' + 4y = \sin 3x$.
CF $m^2 + 4 = 0 \Rightarrow m = \pm 2i$, so $y_{\text{CF}} = A\cos 2x + B\sin 2x$.
PI Try $y_{\text{PI}} = \lambda\cos 3x + \mu\sin 3x$.
$y'' = -9\lambda\cos 3x - 9\mu\sin 3x$.
Substituting: $(-9\lambda + 4\lambda)\cos 3x + (-9\mu + 4\mu)\sin 3x = \sin 3x$
$\Rightarrow -5\lambda = 0$ and $-5\mu = 1$, giving $\lambda = 0$, $\mu = -\tfrac{1}{5}$.
$y_{\text{PI}} = -\tfrac{1}{5}\sin 3x$.
GS $$y = A\cos 2x + B\sin 2x - \tfrac{1}{5}\sin 3x$$
Example 10.3.4 — Resonance Case
Solve $y'' - 3y' + 2y = e^{2x}$.
CF $m^2 - 3m + 2 = 0 \Rightarrow (m-1)(m-2) = 0$, roots $m = 1, 2$.
$y_{\text{CF}} = Ae^{x} + Be^{2x}$.
PI $e^{2x}$ appears in the CF (since $m = 2$ is a root), so try $y_{\text{PI}} = \lambda x e^{2x}$.
$y' = \lambda e^{2x} + 2\lambda xe^{2x}$, $\;y'' = 4\lambda e^{2x} + 4\lambda xe^{2x}$.
Substituting: $(4\lambda + 4\lambda x) - 3(\lambda + 2\lambda x) + 2\lambda x = 1$ (coefficient of $e^{2x}$)
$\Rightarrow 4\lambda - 3\lambda = 1 \Rightarrow \lambda = 1$.
$y_{\text{PI}} = xe^{2x}$.
GS $$y = Ae^{x} + Be^{2x} + xe^{2x}$$
Example 10.3.5 — Mixed Right-Hand Side
Find the general solution of $y'' - 2y' + y = x + e^{x}$. Note $m = 1$ is a repeated root.
CF $m^2 - 2m + 1 = (m-1)^2 = 0$, repeated root $m = 1$.
$y_{\text{CF}} = (A + Bx)e^{x}$.
PI for $x$ Try $y_1 = px + q$: $0 - 2p + (px + q) = x \Rightarrow p = 1$, $q - 2p = 0 \Rightarrow q = 2$.
$y_1 = x + 2$.
PI for $e^x$ Since $e^x$ duplicates the CF with a repeated root, try $y_2 = \lambda x^2 e^x$.
Substituting gives $2\lambda = 1 \Rightarrow \lambda = \tfrac{1}{2}$, so $y_2 = \tfrac{1}{2}x^2 e^x$.
GS $$y = (A + Bx)e^x + x + 2 + \tfrac{1}{2}x^2 e^x$$
Exam Tip
Always check whether your trial PI matches any term in the CF before substituting. Forgetting to multiply by $x$ in the resonance case is one of the most common errors in this topic.
10.4 Initial Value Problems
The general solution contains two arbitrary constants $A$ and $B$. An initial value problem (IVP) specifies the values of $y$ and $y'$ at a given point (usually $x = 0$), allowing us to determine $A$ and $B$ uniquely.
Example 10.4.1 — Applying Initial Conditions
Solve $y'' + 2y' - 3y = 0$ subject to $y(0) = 1$ and $y'(0) = -1$.
CF $m^2 + 2m - 3 = (m+3)(m-1) = 0$, roots $m = -3, 1$.
General solution: $y = Ae^{-3x} + Be^{x}$.
ICs $y(0) = A + B = 1$.
$y' = -3Ae^{-3x} + Be^{x} \Rightarrow y'(0) = -3A + B = -1$.
Solve Subtracting: $4A = 2 \Rightarrow A = \tfrac{1}{2}$, $B = \tfrac{1}{2}$.
$$y = \tfrac{1}{2}e^{-3x} + \tfrac{1}{2}e^{x}$$
Example 10.4.2 — IVP with Particular Integral
Solve $y'' + 4y = 8\cos 2x$ subject to $y(0) = 0$, $y'(0) = 2$.
CF $m^2 + 4 = 0 \Rightarrow m = \pm 2i$, so $y_{\text{CF}} = A\cos 2x + B\sin 2x$.
PI $\cos 2x$ is in the CF (resonance). Try $y_{\text{PI}} = x(\lambda\cos 2x + \mu\sin 2x)$.
After differentiating twice and substituting, comparing coefficients gives $\lambda = 0$, $\mu = 2$.
$y_{\text{PI}} = 2x\sin 2x$.
GS $y = A\cos 2x + B\sin 2x + 2x\sin 2x$.
ICs $y(0) = A = 0$.
$y' = -2A\sin 2x + 2B\cos 2x + 2\sin 2x + 4x\cos 2x$.
$y'(0) = 2B = 2 \Rightarrow B = 1$.
$$y = \sin 2x + 2x\sin 2x = (1 + 2x)\sin 2x$$
Example 10.4.3 — Boundary Conditions at Two Points
Solve $y'' + \pi^2 y = 0$ with $y(0) = 0$ and $y(1) = 0$.
CF $m = \pm \pi i$, so $y = A\cos\pi x + B\sin\pi x$.
BCs $y(0) = A = 0$. Then $y = B\sin\pi x$.
$y(1) = B\sin\pi = 0$ — satisfied for any $B$.
So the solution $y = B\sin\pi x$ is valid for any constant $B$ (an eigenvalue problem).
Example 10.4.3 — Interpreting the Solution Physically
The equation $y'' + 2y' + 5y = 10$ models a damped spring system driven by a constant force. Find the general solution and describe the long-term behaviour.
CF $m^2 + 2m + 5 = 0 \Rightarrow m = -1 \pm 2i$. $y_{\text{CF}} = e^{-x}(A\cos 2x + B\sin 2x)$.
PI Try $y_{\text{PI}} = k$ (constant). Substituting: $0 + 0 + 5k = 10 \Rightarrow k = 2$.
GS $y = e^{-x}(A\cos 2x + B\sin 2x) + 2$.
As $x \to \infty$, the CF decays to zero (transient response). The long-term behaviour is $y \to 2$ — the particle settles to the equilibrium position $y = 2$ determined by the PI (steady-state response).
Exam Tip
Always differentiate the complete general solution (CF + PI) before substituting initial conditions. A common error is differentiating only the CF and forgetting the PI term.
10.5 Substitution Methods
Some second-order ODEs can be reduced in order or simplified by a substitution. Two important techniques are: (i) letting $v = \dfrac{dy}{dx}$ to reduce to a first-order equation in $v$, and (ii) changing the independent variable to convert an Euler–Cauchy equation into one with constant coefficients.
Definition — Euler–Cauchy Equation
An equation of the form:
$$ax^2y'' + bxy' + cy = f(x)$$
is called an Euler–Cauchy (or equidimensional) equation. The substitution $x = e^t$ (i.e. $t = \ln x$) transforms it into a second-order ODE with constant coefficients in $t$.
Example 10.5.1 — Reduction of Order Using $v = dy/dx$
Solve $y'' + 2(y')^2 = 0$ (a non-linear ODE but reducible).
Let $v = y'$, so $y'' = v\,\dfrac{dv}{dy}$ (using the chain rule: $y'' = \dfrac{dv}{dx} = \dfrac{dv}{dy}\cdot\dfrac{dy}{dx} = v\dfrac{dv}{dy}$).
Substituting: $v\dfrac{dv}{dy} + 2v^2 = 0$. Dividing by $v$ (assuming $v \neq 0$): $\dfrac{dv}{dy} + 2v = 0$.
Separating variables: $\dfrac{dv}{v} = -2\,dy \Rightarrow \ln|v| = -2y + C_1 \Rightarrow v = Ke^{-2y}$.
Since $v = \dfrac{dy}{dx}$: $\dfrac{dy}{dx} = Ke^{-2y} \Rightarrow e^{2y}\,dy = K\,dx \Rightarrow \tfrac{1}{2}e^{2y} = Kx + C_2$.
Example 10.5.2 — Euler–Cauchy Equation
Solve $x^2y'' + xy' - 4y = 0$ for $x > 0$.
Substitution Let $x = e^t$, so $t = \ln x$. Using the standard results:
$xy' = \dfrac{dy}{dt}$ and $x^2y'' = \dfrac{d^2y}{dt^2} - \dfrac{dy}{dt}$.
Transform The equation becomes:
$\left(\dfrac{d^2y}{dt^2} - \dfrac{dy}{dt}\right) + \dfrac{dy}{dt} - 4y = 0 \Rightarrow \dfrac{d^2y}{dt^2} - 4y = 0$.
Solve Auxiliary equation: $m^2 - 4 = 0 \Rightarrow m = \pm 2$.
$y = Ae^{2t} + Be^{-2t}$. Substituting back $t = \ln x$:
$$y = Ax^2 + Bx^{-2}$$
Example 10.5.3 — Given One Solution, Find Another
Given that $y_1 = x$ is a solution of $x^2y'' - xy' - 3y = 0$, find the general solution.
Try $y = x \cdot u(x)$. Then $y' = u + xu'$ and $y'' = 2u' + xu''$.
Substituting: $x^2(2u' + xu'') - x(u + xu') - 3xu = 0$
$\Rightarrow x^3u'' + (2x^2 - x^2)u' + (-x - 3x)u = 0$
$\Rightarrow x^3u'' + x^2u' - 4xu = 0$.
Since $y_1 = x$ is a solution, the terms in $u$ vanish (they must), leaving a first-order ODE in $w = u'$. Solving gives the second independent solution $y_2 = x^{-3}$, so:
$$y = Ax + Bx^{-3}$$
Example 10.5.4 — Substitution to Decouple Variables
Use the substitution $z = \dfrac{dy}{dx}$ to solve $y'' = 2y\,y'$ (treating $y$ as the independent variable).
Let $z = y'$. Since $y'' = z\dfrac{dz}{dy}$ (chain rule), the equation becomes: $z\dfrac{dz}{dy} = 2yz$.
Dividing by $z$ (assuming $z \neq 0$): $\dfrac{dz}{dy} = 2y \Rightarrow z = y^2 + C_1$.
So $\dfrac{dy}{dx} = y^2 + C_1$. This is a separable first-order ODE: $\displaystyle\int \frac{dy}{y^2 + C_1} = x + C_2$.
If $C_1 = k^2 > 0$: $\dfrac{1}{k}\arctan\dfrac{y}{k} = x + C_2$, giving $y = k\tan(kx + D)$.
Summary — Choosing the Right Method
- Constant coefficients, homogeneous: Use the auxiliary equation (three CF cases).
- Constant coefficients, non-homogeneous: CF + PI (trial function method).
- Variable coefficients (Euler–Cauchy $x^2y'' + \ldots$): Substitute $x = e^t$.
- One solution known: Use reduction of order (substitute $y = y_1 \cdot u(x)$).
- Second-order reducible to first-order: Substitute $v = y'$ or $v = y'$ as a function of $y$.
Exam Tip
For Euler–Cauchy equations, the key formulas are $xy' = \dot{y}$ and $x^2y'' = \ddot{y} - \dot{y}$ where dots denote derivatives with respect to $t = \ln x$. Write these on your working before substituting.
Practice Problems
Problem 1
Find the general solution of $y'' - 7y' + 12y = 0$.
Show solution
Auxiliary equation: $m^2 - 7m + 12 = (m-3)(m-4) = 0$, roots $m = 3, 4$.
$$y = Ae^{3x} + Be^{4x}$$
Problem 2
Find the general solution of $y'' + 4y' + 4y = 0$.
Show solution
Auxiliary equation: $(m+2)^2 = 0$, repeated root $m = -2$.
$$y = (A + Bx)e^{-2x}$$
Problem 3
Find the general solution of $y'' - 4y' + 13y = 0$.
Show solution
Auxiliary equation: $m = \dfrac{4 \pm \sqrt{16 - 52}}{2} = 2 \pm 3i$.
$$y = e^{2x}(A\cos 3x + B\sin 3x)$$
Problem 4
Find the general solution of $y'' + 3y' + 2y = 6e^{x}$.
Show solution
CF: $(m+1)(m+2) = 0$, roots $-1, -2$. $y_{\text{CF}} = Ae^{-x} + Be^{-2x}$.
PI: Try $\lambda e^x$. Substituting: $\lambda - 3\lambda(-) + \ldots$: $(\lambda + 3\lambda + 2\lambda)e^x = 6e^x \Rightarrow 6\lambda = 6 \Rightarrow \lambda = 1$. $y_{\text{PI}} = e^x$.
$$y = Ae^{-x} + Be^{-2x} + e^{x}$$
Problem 5
Solve $y'' - 2y' - 3y = 9x^2$ finding the general solution.
Show solution
CF: $(m-3)(m+1) = 0$, roots $3, -1$. $y_{\text{CF}} = Ae^{3x} + Be^{-x}$.
PI: Try $px^2 + qx + r$. Substituting: $2p - 2(2px + q) - 3(px^2 + qx + r) = 9x^2$.
Coefficient of $x^2$: $-3p = 9 \Rightarrow p = -3$.
Coefficient of $x$: $-4p - 3q = 0 \Rightarrow 12 - 3q = 0 \Rightarrow q = 4$.
Constant: $2p - 2q - 3r = 0 \Rightarrow -6 - 8 - 3r = 0 \Rightarrow r = -\tfrac{14}{3}$.
$$y = Ae^{3x} + Be^{-x} - 3x^2 + 4x - \tfrac{14}{3}$$
Problem 6
Solve $y'' + y = \cos x$ (resonance case).
Show solution
CF: $m = \pm i$, so $y_{\text{CF}} = A\cos x + B\sin x$.
$\cos x$ is in the CF, so try $y_{\text{PI}} = x(\lambda\cos x + \mu\sin x)$.
Differentiating twice and substituting: $-2\lambda\sin x + 2\mu\cos x = \cos x$.
So $\lambda = 0$, $\mu = \tfrac{1}{2}$. $y_{\text{PI}} = \tfrac{1}{2}x\sin x$.
$$y = A\cos x + B\sin x + \tfrac{1}{2}x\sin x$$
Problem 7
Solve $y'' - 4y = 0$ with $y(0) = 3$ and $y'(0) = -2$.
Show solution
$m = \pm 2$, so $y = Ae^{2x} + Be^{-2x}$.
$y(0): A + B = 3$. $y' = 2Ae^{2x} - 2Be^{-2x} \Rightarrow y'(0): 2A - 2B = -2 \Rightarrow A - B = -1$.
Adding: $2A = 2 \Rightarrow A = 1$, $B = 2$.
$$y = e^{2x} + 2e^{-2x}$$
Problem 8
Solve $y'' + 2y' + 2y = 0$ with $y(0) = 0$ and $y'(0) = 1$.
Show solution
$m = -1 \pm i$, so $y = e^{-x}(A\cos x + B\sin x)$.
$y(0) = A = 0$. Then $y = Be^{-x}\sin x$.
$y' = Be^{-x}(\cos x - \sin x)$. $y'(0) = B = 1$.
$$y = e^{-x}\sin x$$
Problem 9
Find the general solution of $x^2y'' - 2y = 0$ for $x > 0$ using the Euler–Cauchy method.
Show solution
The equation is $x^2y'' + 0 \cdot xy' - 2y = 0$. Substituting $x = e^t$:
$(\ddot{y} - \dot{y}) - 2y = 0 \Rightarrow \ddot{y} - \dot{y} - 2y = 0$.
Auxiliary equation: $m^2 - m - 2 = (m-2)(m+1) = 0$, roots $m = 2, -1$.
$y = Ae^{2t} + Be^{-t} = Ax^2 + Bx^{-1}$.
$$y = Ax^2 + \dfrac{B}{x}$$
Problem 10
Solve $y'' + 5y' + 6y = 2e^{-2x}$ and hence find the particular solution with $y(0) = 1$, $y'(0) = 0$.
Show solution
CF: $(m+2)(m+3) = 0$, roots $-2, -3$. $y_{\text{CF}} = Ae^{-2x} + Be^{-3x}$.
$e^{-2x}$ is in the CF, so try $y_{\text{PI}} = \lambda xe^{-2x}$.
$y' = \lambda e^{-2x} - 2\lambda xe^{-2x}$, $y'' = -4\lambda e^{-2x} + 4\lambda xe^{-2x}$.
Substituting: $(-4\lambda + 4\lambda x) + 5(\lambda - 2\lambda x) + 6\lambda x = 2$
$\Rightarrow \lambda(-4 + 5) = 2 \Rightarrow \lambda = 2$.
GS: $y = Ae^{-2x} + Be^{-3x} + 2xe^{-2x}$.
$y(0) = A + B = 1$.
$y' = -2Ae^{-2x} - 3Be^{-3x} + 2e^{-2x} - 4xe^{-2x}$.
$y'(0) = -2A - 3B + 2 = 0 \Rightarrow 2A + 3B = 2$.
From $A + B = 1$: $A = 1 - B$. Substituting: $2 - 2B + 3B = 2 \Rightarrow B = 0$, $A = 1$.
$$y = e^{-2x} + 2xe^{-2x} = (1 + 2x)e^{-2x}$$