4) First&Second-Order ODES
4) First&Second-Order ODES
KMM 511E
y’ = -p(x)y
dy/y = -p(x)dx
lny = -p(x)dx + c*
y = c exp(-p(x)dx)
First Order ODEs
Non-homogeneous linear equations
(py – r)dx + dy = 0
Pdx + Qdy = 0
P=py-r Q=1
If we search for an integrating factor dependent on x
(1/F)dF/dx = p(x)
F(x) = exp(pdx)
exp(pdx)y = exp(pdx)rdx + c
Dividing by exp(pdx) and pdx = h
One solution of a second-order ODE in the range a<x<b is the function h(x) for which
derivatives y’=h’(x) and y’’=h’’(x) exist and may satisfy the differential equation for all x’s
in this range.
Second-order ODEs have many applications and their solutions are sometimes easy and
sometimes complex.
This rule does not apply for non-homogeneous and non-linear ODEs
For y’’ + y = 1 1+cosx and 1+sinx are solutions but 2(1+cosx) and (1+cosx + 1+sinx) are not solutions
For y’’y – xy’ = 0 x2 and 1 are solutions but –x2 and x2 + 1 are not solutions
y1 = x y2 = ?
y’ = 1 y’’ = 0
We should find p in the general form
Dividing by x2
y’’ – y’/x + y/x2 = 0
p = -1/x -pdx = lnx y1 = x
U = (1/x2)exp(lnx) = 1/x
y2 = y1 Udx
y2 = x dx/x = xlnx
y = c1x + c2xlnx
Second Order ODEs
Second-order ODEs with constant coefficients
Ex.: y’’ – y = 0
2 – 1 = 0 = 1
y = c1exp(x) + c2exp(-x) general solution
y = (c1 + c2x)exp(-ax/2)
If we add them
cosx = ½(exp(ix) + exp(-ix))
If we subtract them
sinx = (1/2i)(exp(ix) - exp(-ix))