SME
Differential Equations
Series solutions
Use this for “Find the series solution of y″ + y = 0 with y(0) = 1, y′(0) = 0. How close is S₆(1) to the exact value?”
Chart
Starting from y(0) = 1, y′(0) = 0; solid: worked out numerically
Dashed: the degree-6 Taylor polynomial about x = 0
At x = 1: P = 0.54028, y = 0.5403, error |y − P| = 2.453 × 10⁻⁵
This is an example. Type your own values to start a new problem.
y″
+
ω
2
y
=
0
y(0)
=
a₀
,
y′(0)
=
a₁
S
(
x
)
=
S
y(x)
Exact solution at x
worked out (not typed)
E
Error |y(x) − S|
worked out (not typed)
Formulas
S
=
the
series
of
y″
+
ω
2
y
=
0
from
y(0)
=
a₀
,
y′(0)
=
a₁
,
to
degree
N
,
at
x
0.5403
=
the
series
of
y″
+
1
2
y
=
0
from
y(0)
=
1,
y′(0)
=
0,
to
degree
6,
at
1
y(
x
)
=
a₀
×
cos(
ω
×
x
)
+
(
a₁
ω
)
×
sin(
ω
×
x
)
0.5403
=
1
×
cos(1
×
1)
+
(
0
1
)
×
sin(1
×
1)
E
=
|y(
x
)
−
S
|
2.4528 ×
10
-5
=
|0.5403
−
0.5403|
Assumptions
•
Try y = Σ aₙxⁿ. Then y″ = Σ (n + 2)(n + 1)aₙ₊₂xⁿ, and matching each power of x gives aₙ₊₂ = −ω²aₙ ÷ ((n + 2)(n + 1)).
•
a₀ = y(0) and a₁ = y′(0) start two chains: the even terms build a₀ cos ωx and the odd ones (a₁ ÷ ω) sin ωx.
•
The partial sum S adds the terms up to xᴺ. The series converges for every x, so more terms close the gap.
Step-by-step
WE KNOW
ω = 1, a₀ = 1, a₁ = 0, N = 6, x = 1
FIND
partial sum up to xᴺ (S), exact solution at x (y(x)), error |y(x) − S| (E)
Step 1 · Find partial sum up to xᴺ (S)
Use S = the series of y″ + ω²y = 0 from y(0) = a₀, y′(0) = a₁, to degree N, at x
aₙ₊₂
=
−
ω
2
aₙ
(n + 2)(n + 1)
from
a₀
and
a₁
:
a₂
=
−0.5,
a₃
=
0,
a₄
=
0.04167,
a₅
=
0,
and
so
on
to
a₆.
Each
coefficient
times
its
power
of
x
,
added
up.
S
=
1
+
(−0.5)
×
x
2
+
0.04167
×
x
4
+
(−0.001389)
×
x
6
S
=
1
+
(−0.5)
×
1
2
+
0.04167
×
1
4
+
(−0.001389)
×
1
6
S
=
1
−
0.5
+
0.04166667
−
0.001388889
=
0.5403
S
=
0.5403
Step 2 · Find exact solution at x (y(x))
Use y(x) = a₀ × cos(ω × x) + (a₁ ÷ ω) × sin(ω × x)
The two chains are the Maclaurin series of cos ωx and sin ωx, so the exact solution is known: compare the partial sum with it.
y(
x
)
=
1
×
cos(1
×
1)
+
(
0
1
)
×
sin(1
×
1)
y(
x
)
=
0.5403
+
0
×
0.8415
y(
x
)
=
0.5403
Step 3 · Find error |y(x) − S| (E)
Use E = |y(x) − S|
How far the partial sum is from the solution: the terms after xᴺ, left out.
E
=
|0.54030231
−
0.54027778|
E
=
2.4528 ×
10
-5
Check
Put the numbers back in. Both sides should match.
0.5403
=
1
+
(−0.5)
×
1
2
+
0.04167
×
1
4
+
(−0.001389)
×
1
6
✓
0.5403
=
1
×
cos(1
×
1)
+
(
0
1
)
×
sin(1
×
1)
✓
2.4528 ×
10
-5
=
|0.5403
−
0.54028|
✓
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.