Example 1.8
Solve the following first order ODE:
cos x
xu + 3u = , u(π) = 0, x > 0. (1.32)
x
We first divide the equation by x to convert it to the standard form (1.26).
As a result, p (x) = 3 and q(x) = cos x . The integrating factor μ(x) is
2
x x
x 3 dt 3 ln x 3
μ(x) = e t = e = x . (1.33)
Consequently, u(x) is
u(x) = 1 x μ(t)q(t)dt + c = 1 x t cos tdt + c
μ(x) x3
(1.34)
1 1
= 3 (cosx + x sin x + c) = 3 (cosx + x sin x + 1),
x x
obtained upon using the given initial condition.