TOPICS
Search

First-Order Ordinary Differential Equation


Given a first-order ordinary differential equation

 (dy)/(dx)=F(x,y),
(1)

if F(x,y) can be expressed using separation of variables as

 F(x,y)=X(x)Y(y),
(2)

then the equation can be expressed as

 (dy)/(Y(y))=X(x)dx
(3)

and the equation can be solved by integrating both sides to obtain

 int(dy)/(Y(y))=intX(x)dx.
(4)

Any first-order ODE of the form

 (dy)/(dx)+p(x)y=q(x)
(5)

can be solved by finding an integrating factor mu=mu(x) such that

d/(dx)(muy)=mu(dy)/(dx)+y(dmu)/(dx)
(6)
=muq(x).
(7)

Dividing through by muy yields

 1/y(dy)/(dx)+1/mu(dmu)/(dx)=(q(x))/y.
(8)

However, this condition enables us to explicitly determine the appropriate mu for arbitrary p and q. To accomplish this, take

 p(x)=1/mu(dmu)/(dx)
(9)

in the above equation, from which we recover the original equation (◇), as required, in the form

 1/y(dy)/(dx)+p(x)=(q(x))/y.
(10)

But we can integrate both sides of (9) to obtain

 intp(x)dx=int(dmu)/mu=lnmu+c
(11)
 mu=e^(intp(x)dx).
(12)

Now integrating both sides of (◇) gives

 muy=intmuq(x)dx+c
(13)

(with mu now a known function), which can be solved for y to obtain

 y=(intmuq(x)dx+c)/mu=(inte^(int^xp(x^')dx^')q(x)dx+c)/(e^(int^xp(x^')dx^')),
(14)

where c is an arbitrary constant of integration.

Given an nth-order linear ODE with constant coefficients

 (d^ny)/(dx^n)+a_(n-1)(d^(n-1)y)/(dx^(n-1))+...+a_1(dy)/(dx)+a_0y=Q(x),
(15)

first solve the characteristic equation obtained by writing

 y=e^(rx)
(16)

and setting Q(x)=0 to obtain the n complex roots.

 r^ne^(rx)+a_(n-1)r^(n-1)e^(rx)+...+a_1re^(rx)+a_0e^(rx)=0
(17)
 r^n+a_(n-1)r^(n-1)+...+a_1r+a_0=0.
(18)

Factoring gives the roots r_i,

 (r-r_1)(r-r_2)...(r-r_n)=0.
(19)

For a nonrepeated real root r, the corresponding solution is

 y=e^(rx).
(20)

If a real root r is repeated k times, the solutions are degenerate and the linearly independent solutions are

 y=e^(rx),y=xe^(rx),...,y=x^(k-1)e^(rx).
(21)

Complex roots always come in complex conjugate pairs, r_+/-=a+/-ib. For nonrepeated complex roots, the solutions are

 y=e^(ax)cos(bx),y=e^(ax)sin(bx).
(22)

If the complex roots are repeated k times, the linearly independent solutions are

 y=e^(ax)cos(bx),y=e^(ax)sin(bx),...,y=x^(k-1)e^(ax)cos(bx),y=x^(k-1)e^(ax)sin(bx).
(23)

Linearly combining solutions of the appropriate types with arbitrary multiplicative constants then gives the complete solution. If initial conditions are specified, the constants can be explicitly determined. For example, consider the sixth-order linear ODE

 (D^~-1)(D^~-2)^3(D^~^2+D^~+1)y=0,
(24)

which has the characteristic equation

 (r-1)(r-2)^3(r^2+r+1)=0.
(25)

The roots are 1, 2 (three times), and (-1+/-sqrt(3)i)/2, so the solution is

 y=Ae^x+Be^(2x)+Cxe^(2x)+Dx^2e^(2x)+Ee^(-x/2)cos(1/2sqrt(3)x)+Fe^(-x/2)sin(1/2sqrt(3)x).
(26)

If the original equation is nonhomogeneous (Q(x)!=0), now find the particular solution y^* by the method of variation of parameters. The general solution is then

 y(x)=sum_(i=1)^nc_iy_i(x)+y^*(x),
(27)

where the solutions to the linear equations are y_1(x), y_2(x), ..., y_n(x), and y^*(x) is the particular solution.


See also

Exact First-Order Ordinary Differential Equation, Integrating Factor, Ordinary Differential Equation, Second-Order Ordinary Differential Equation, Separation of Variables, Variation of Parameters

Explore with Wolfram|Alpha

References

Arfken, G. Mathematical Methods for Physicists, 3rd ed. Orlando, FL: Academic Press, pp. 440-445, 1985.

Referenced on Wolfram|Alpha

First-Order Ordinary Differential Equation

Cite this as:

Weisstein, Eric W. "First-Order Ordinary Differential Equation." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/First-OrderOrdinaryDifferentialEquation.html

Subject classifications