Maths WorkshopMaths problems with full solutions
Exercise 757Calculus › Differential equations › First-order equationsL1Added 2 Nov 2026

A linear first-order equation with polynomial right-hand side

#linear equation#homogeneous solution#particular solution

Statement

Solve the differential equation
y′+2y=x2−2x+3.y' + 2y = x^2 - 2x + 3.

Hint

Find the homogeneous solution yh=Ce−2xy_h = Ce^{-2x}, then look for a particular solution of the form yp=ax2+bx+cy_p = ax^2 + bx + c.

Show solutionHide solution

Solution

Homogeneous equation. y′+2y=0y' + 2y = 0 gives
yh(x)=Ce−2x.y_h(x) = Ce^{-2x}.

Particular solution. Try yp=ax2+bx+cy_p = ax^2 + bx + c. Then yp′=2ax+by_p' = 2ax + b, and
yp′+2yp=2ax+b+2ax2+2bx+2c=2ax2+(2a+2b)x+(b+2c).y_p' + 2y_p = 2ax + b + 2ax^2 + 2bx + 2c = 2ax^2 + (2a+2b)x + (b+2c).
Identifying with x2−2x+3x^2 - 2x + 3:
2a=1  ⟹  a=12,2a = 1 \implies a = \frac12,
2a+2b=−2  ⟹  1+2b=−2  ⟹  b=−32,2a + 2b = -2 \implies 1 + 2b = -2 \implies b = -\frac32,
b+2c=3  ⟹  −32+2c=3  ⟹  c=94.b + 2c = 3 \implies -\frac32 + 2c = 3 \implies c = \frac94.
So
yp(x)=12x2−32x+94.y_p(x) = \frac12 x^2 - \frac32 x + \frac94.

General solution.
y(x)=Ce−2x+12x2−32x+94,C∈R.y(x) = Ce^{-2x} + \frac12 x^2 - \frac32 x + \frac94, \qquad C \in \mathbb{R}.