SME
Differential Equations · Problem type

A linear equation by an integrating factor

Use this for “Solve y′ + 3y = 6x + 1 with y(0) = 2, and find y(0.5).”

Chart

y(x) = 2x − 1 + 2e−2x−101234500.511.522.533.544.5xy(1, 1.271)
y(1) ≈ 1.271
This is an example. Type your own values to start a new problem.
y′
+
k
y
=
m
x
+
b
y(0)
=
y₀
y(
x
)
=
y
C
Constant in the solution
worked out (not typed)

Formulas

C
=
y₀
−
b
k
+
m
k
2
2
=
1
−
0
2
+
4
2
2
y
=
m
k
×
x
+
b
k
−
m
k
2
+
C
×
e
−
k
×
x
1.2707
=
4
2
×
1
+
0
2
−
4
2
2
+
2
×
e
−2 × 1

Assumptions

•
Multiplying y′ + ky by the integrating factor ekx makes it one derivative: (yekx)′ = (mx + b)ekx.
•
Integrating the right side by parts and dividing by ekx gives y = (m ÷ k)x + (b ÷ k − m ÷ k²) + Ce−kx.
•
k ≠ 0 and the start is at x = 0. With k > 0 the term Ce−kx dies away and y settles onto the line.

Step-by-step

WE KNOW
k = 2, m = 4, b = 0, y₀ = 1, x = 1
FIND
constant in the solution (C), solution at x (y)
Step 1 · Find constant in the solution (C)
Use C = y₀ − b ÷ k + m ÷ k²
Put
x
=
0
into
the
solution:
y₀
=
b
k
−
m
k
2
+
C
,
so
C
is
what
is
left
of
y₀
.
C
=
1
−
0
2
+
4
2
2
C
=
1
−
0
2
+
4
4
C
=
1
+
1
C
=
2
Step 2 · Find solution at x (y)
Use y = m ÷ k × x + b ÷ k − m ÷ k² + C × e−k × x
The
line
(
m
k
)
x
+
b
k
−
m
k
2
solves
the
equation
by
itself;
C
e
−
kx
solves
y
′
+
ky
=
0
and
fits
the
start.
y
′
+
2
y
=
4
x
μ(
x
)
=
e
2
x
y
(
x
)
=
2
x
−
1
+
2
e
−2
x
y
(1)
=
1
+
2e⁻²
=
1
+
2
×
0.135335
=
1.2707
y
=
1.2707
Check
Put the numbers back in. Both sides should match.
2
=
1
−
0
2
+
4
2
2
✓
1.2707
=
4
2
×
1
+
0
2
−
4
2
2
+
2
×
e
−2 × 1
✓
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.

Related lessons

© 2026 SME. All rights reserved.