dx(t)
To solve the ordinary differential equation (ODE) dt = x(t)2 + t with the initial
condition x(0) = 0 using the Homotopy Perturbation Method (HPM), we proceed as
follows. HPM is a semi-analytical technique that combines perturbation methods with
homotopy to construct approximate solutions to nonlinear problems.
Step 1: Construct the Homotopy
In HPM, we embed the problem in a homotopy parameterized by p ∈ [0, 1]. When p = 0
, the equation simplifies to a solvable linear problem, and when p = 1, we recover the
original nonlinear ODE. For the given ODE, we rewrite it as:
dx(t)
− x(t)2 − t = 0.
dt
A general homotopy for an equation F (x) = 0 is:
H(x, p) = (1 − p)[L(x) − L(x0 )] + pF (x) = 0,
where L(x) is a linear operator, x0 is an initial approximation satisfying the initial
condition, and F (x) is the original equation. Here, we choose the linear operator L(x) =
dx
dt , as it simplifies the equation at p = 0. The initial approximation x0 (t) = 0 satisfies
x(0) = 0. Thus, the homotopy is:
dx dx0 dx
H(x, p) = (1 − p) ( − ) + p( − x2 − t) = 0.
dt dt dt
dx0
Since x0 = 0, dt
= 0, so the homotopy simplifies to:
dx dx
(1 − p) + p( − x2 − t) = 0.
dt dt
Expanding and simplifying:
dx dx
(1 − p) +p − px2 − pt = 0,
dt dt
dx
[(1 − p) + p] − px2 − pt = 0,
dt
dx
− px2 − pt = 0.
dt
Thus, the homotopy equation is:
dx
= p(x2 + t).
dt
When p = 0, we get dx
dt
= 0, implying x(t) = c, and using x(0) = 0, we have x(t) = 0.
When p = 1, we recover the original ODE dx 2
dt = x + t.
Step 2: Assume a Series Solution
In HPM, we assume the solution as a power series in p:
∞
x(t) = x0 (t) + px1 (t) + p2 x2 (t) + ⋯ = ∑ pn xn (t).
n=0
The nonlinear term x2 is expanded as:
∞ 2 ∞ n
2 n n
x = ( ∑ p xn ) = ∑ p ∑ xk xn−k .
n=0 n=0 k=0
For the first few terms:
p0 : x20 ,
p1 : 2x0 x1 ,
p2 : x21 + 2x0 x2 ,
and so on.
Substitute the series into the homotopy equation:
∞ ∞ 2
d
( ∑ p n xn ) = p ( ∑ p n xn ) + t .
dt n=0
n=0
The left-hand side is:
∞
dxn
∑ pn .
dt
n=0
The right-hand side is:
∞ n ∞ n
n n+1
p ( ∑ p ∑ xk xn−k + t) = ∑ p
∑ xk xn−k + pt.
n=0 k=0 n=0 k=0
Adjust indices for alignment. Let m = n + 1 in the first term:
∞ n ∞ m−1
n+1 m
∑p ∑ xk xn−k = ∑ p ∑ xk xm−1−k .
n=0 k=0 m=1 k=0
The right-hand side becomes:
∞ m−1 ∞ m−1
m m
∑ p ∑ xk xm−1−k + pt = pt + ∑ p ∑ xk xm−1−k .
m=1 k=0 m=1 k=0
Equate both sides:
∞ ∞ n−1
dxn n
∑p = pt + ∑ pn ∑ xk xn−1−k .
dt
n=0 n=1 k=0
Step 3: Collect Terms by Powers of p
Equate coefficients of each power of p:
Coefficient of p0 :
dx0
= 0.
dt
Integrate: x0 (t)
= c. Apply initial condition x(0) = 0: x0 (0) = c = 0. Thus:
x0 (t) = 0.
Coefficient of p1 :
1−1
dx1
= t + ∑ xk x0−k = t + x0 x0 = t + 0 = t.
dt
k=0
Integrate:
t
t2
x1 (t) = ∫ s ds = + c.
2
Apply initial condition x1 (0) = 0 (since the initial condition is satisfied by the sum, and
higher terms typically contribute zero at t = 0):
x1 (0) = 0 + c = 0 ⟹ c = 0.
Thus:
t2
x1 (t) = .
2
Coefficient of p2 :
2−1
dx2 t2 t2
= ∑ xk x1−k = x0 x1 + x1 x0 = 0 ⋅ + ⋅ 0 = 0.
dt 2 2
k=0
Integrate:
x2 (t) = c.
Apply x2 (0)
= 0: c = 0. Thus:
x2 (t) = 0.
Coefficient of p3 :
3−1 2
dx3 t2 t4
= ∑ xk x2−k = x0 x2 + x1 x1 + x2 x0 = 0 ⋅ 0 + ( ) + 0 ⋅ 0 = .
dt 2 4
k=0
Integrate:
t
s4 1 t5 t5
x3 (t) = ∫ ds = ⋅ + c = + c.
4 4 5 20
Apply x3 (0)
= 0:
x3 (0) = 0 + c = 0 ⟹ c = 0.
Thus:
t5
x3 (t) = .
20
Step 4: Construct the Approximate Solution
The solution is:
x(t) = x0 + px1 + p2 x2 + p3 x3 + ⋯ .
Set p = 1 to obtain the approximate solution:
t2 t5 t2 t5
x(t) = 0 + + 0 + + ⋯ = + + O(t7 ).
2 20 2 20
Step 5: Verification
t2 t5
To verify, substitute x(t) ≈ 2
+ 20 into the ODE:
Left-hand side:
dx d t2 t5 5t4 t4
= ( + )=t+ =t+ .
dt dt 2 20 20 4
Right-hand side:
2 2
2 t2 t5 t4 t2 t5 t5
x +t=( + ) +t= +2⋅ ⋅ + ( ) + t.
2 20 4 2 20 20
t4 t7 t10
= + + + t.
4 20 400
Compare:
t4 t4 t7 t10
t+ ≈ + + + t.
4 4 20 400
4
t7
The terms t and t4 match exactly. The right-hand side includes higher-order terms ( 20
,
10
t
400
), which are small for small t, indicating the approximation is reasonable near t
= 0.
Final Answer
dx(t)
The approximate solution to the ODE dt
= x(t)2 + t with x(0) = 0 using HPM up to
the third term is:
t2 t5
x(t) = + .
2 20
This solution is valid for small t, and additional terms can be computed for higher accuracy
if needed.
t2 t5
x(t) = +
2 20