Differential equations are important equations both for mathematics and physics. Many process in real world can be described by differential equations, such as that of vibration and wave. Especially waves, they (sound/light) help human to transfer more than 90% of informations. Here we will mainly focus on the Ordinary Differential Equations (ODEs) that can be solved analytically.

Basic concepts of ODEs

Characteristics of ODEs

What is order?

The order of an ODE means the highest differential order of the unknown solution function. eg. F(y,y,y)=0F(y, y'', y')=0 is a 2 order ODE. G(y(n),y,y)G(y^{(n)}, y, y'') is an nthn^{th} order ODE.

Ordinary/Partial?

Ordinary means in this differential equation the unknown function only has one variable eg. F(y,y,x)=0,y=y(x)F(y',y, x) = 0, y=y(x). If the unknown function have more than one variables, it will be called as Partial Differential Equation (PDE). eg. G(fx,ft,x,t)=0,y=y(x,t)G(\frac{\partial f}{\partial x},\frac{\partial f}{\partial t}, x, t) = 0, y = y(x, t).

Homogeneous/inhomogeneous?

A homogeneous equation means the ODE do not contain variable/function residue, like this form [1]: L(y)=0L(y) = 0, where the L=ifididxiL = \sum_i f_i\frac{d^i}{dx^i} is the differential operator. While an inhomogeneous ODE contains variable residue, like this form: L(y)=g(x)L(y) = g(x).

Constant/variable coefficient

Constant coefficient means the coefficient before the unknown function y,y,...,y(n)y,y', ..., y^(n) are constants, eg: 3y+4y+5y=5x3y'' + 4y' + 5y = 5x, while variable coefficient means the coefficient before the unknown function are variables/functions. eg: y+exy+3=0y'' + e^x y' + 3 = 0

Linear/nonlinear?

As the name indicates, linear mean the relation like the function of a line: y,yy, y' terms are the linear terms, higher order and other function relation are nonlinear terms. The linear ODEs are those without nonlinear terms in the unknown function yy and its derivatives y,y,...y', y'', .... In particular the nonlinear terms like: y2,(y)2,yy,sin(y),ln(y),eyy^2, (y')^2, y'*y'', sin(y), ln(y), e^y are not presented in a linear ODE [2]. Otherwise, it is nonlinear ODEs. It must be noted that the variable coefficient for the ODEs are not considered as nonlinear, eg: x2y+sin(x)y=ln(x)x^2 y'' + sin(x)y = ln(x) is a linear equation, it just have function as variable coefficients.

Singular/nonsingular(=regular) point?

Singular or nonsingular refers to the solution of ODE as a particular point x0x_0 with the solution space. Suppose we have a linear variable coefficient ODE as: P(x)y+Q(x)y+R(x)y=F(x), (I)P(x)y'' + Q(x)y' + R(x)y = F(x),\ (I), we rewritten it as: y+Q(x)P(x)y+R(x)P(x)y=F(x)P(x), (II)y'' + \frac{Q(x)}{P(x)}y' + \frac{R(x)}{P(x)}y = \frac{F(x)}{P(x)},\ (II). If P(x0)=0P(x_0) = 0, we say the point x0x_0 is a singular point of equation (II)(II), otherwise we say it is a nonsingular/regular point [3].

Solution to typical ODEs

Here we will discuss several particular ODEs that can be solved analytically. Lets start from the most commonly used 2nd order ODE and then extend it to higher orders.

2nd linear constant coefficient homogeneous ODE

This type of ODE have the general form as: ay+by+cy=0ay'' + by' + cy = 0, we can guess one of its particular solution as: y=erxy=e^{rx}, put this solution in the ODE we can get what we have learned in middle school: ar2+br+c=0ar^2 + br + c = 0, a unitary quadratic equation. Haha, we have turned an ODE to what we have learned long ago as a kid. The solution of this equation depend on the value of Δ=b24ac\Delta = b^2 - 4ac. It has three cases:

2 real roots

When Δ>0\Delta > 0, the 2 real roots are:

r1,2=12a(b±Δ)r_{1,2} = \frac{1}{2a}(-b \pm \sqrt{\Delta})

Then the general solution to the ODE is: y=C1er1x+C2er2xy = C_1 e^{r_1 x} + C_2 e^{r_2 x}, the actual value of the two coefficients can be obtained by considering the particular boundary conditions.

1 real root

When Δ=0\Delta = 0, there is only one real root r, then one of the solution is: y1=erxy_1 = e^{rx}. We can guess the second solution as: y2=u(x)y1(x)=uerxy_2 = u(x)y_1(x) = ue^{rx}, then we put y2y_2 in the ODE. After some calculation we can get: u=0u'' = 0, it is obvious the u(x)=xu(x) = x is a possible solution. (During the derivation, r=b/(2a)r = -b/(2a) should be used). Then the second solution is: y2=xerxy_2 = xe^{rx}, then the general solution is: y=C1erx+C2xerxy = C_1 e^{rx} + C_2xe^{rx}.

2 complex roots

When Δ<0\Delta < 0, there are 2 conjuncture complex solution: z1=A+iB,z2=AiBz_1 = A + iB, z_2 = A - iB (where z1=z2z_1 = z_2*). Then the related 2 solutions are: Z1=e(A+iB)x,Z2=e(AiB)xZ1 = e^{(A+iB)x}, Z2 = e^{(A-iB)x}. However, for the real ODE, its solution should also be real valued functions. With the help of Ruler’s equation, we can construct 2 real roots from the 2 conjecture complex roots.

y1=(Z1+Z2)/2=eAxcos(Bx)y2=(Z1Z2)/(2i)=eAxsin(Bx)\begin{array}{l} y_1 = (Z1 + Z2)/2 = e^{Ax}cos(Bx) y_2 = (Z1 - Z2)/(2i) = e^{Ax}sin(Bx) \end{array}

Thus the general real solution is: y=eAx(C1cos(Bx)+C2sin(Bx))y = e^{Ax}(C_1 cos(Bx) + C_2 sin(Bx)). However, if the solution of the ODE is indeed complex functions, like the case of Schrodinger equation, you can directly use the complex roots format without converting them.

2nd linear constant coefficient inhomogeneous ODE

The general form of the non-homogeneous ODE is: ay+by+cy=f(x)ay'' + by' + cy = f(x)
This is actually an extension to the previous homogeneous 2nd *** ODE by adding some function terms. With the theory of solution composition, the non-homogeneous ODE’s solution is a linear combination of the homogeneous ODE’s general solution plus a particular solution: Y(x)=yhomo(x)+Y0(x)Y(x) = y_{homo}(x) + Y_0(x). For the non-homogeneous ODE, not all type f(x)f(x) in the equation can be solved. Here we just discuss two cases which can be solved.

f(x) is exponential function

Where the ODE has the form:

ay+by+cy=eλxPm(x)=eλx(a0xm+a1xm1+...+am)ay'' + by' + cy = e^{\lambda x}P_m(x)= e^{\lambda x}(a_0 x^m + a_1 x^{m-1} + ... + a_m)

For this kind of equation, we can guess the particular solution as: Y0(x)=xkQm(x)eλxY_0(x) = x^k Q_m(x)e^{\lambda x}, where kk is the root of the related homogeneous equation, and λ=0,1,2\lambda = 0, 1, 2 for the cases: Δ>0,=0,<0\Delta > 0, = 0, < 0. Put this solution into the non-homogeneous ODE and get the related coefficient, we can get this particular solution Y0(x)Y_0(x).

f(x) is trigonometric function

Where the ODE has the form:

ay+by+cy=eλx(Pl(x)cos(ωx)+Pm(x)sin(ωx))ay'' + by' + cy = e^{\lambda x}(P_l(x)cos(\omega x)+P_m(x)sin(\omega x))

For this case, we can guess the particular solution has the form: Y0(x)=xkeλx(Rn(x)cos(ωx)+Sn(x)sin(ωx))Y_0(x) = x^k e^{\lambda x}(R_n(x)cos(\omega x) + S_n(x)sin(\omega x)). Where m=max(l,m)m = max(l, m). Then put this particular solution into the ODE we can solve it.

Higher order linear constant coefficient homogeneous ODE

The higher order here means the order of the ODE n could take values bigger than 2. However, n=1,2n = 1, 2 is also a special case of this general form. The general form of this n th order ODE is: y(n)+p1yn1+...+pn1y+pny=0y^(n) + p_1 y^{n-1} + ... + p_{n-1}y' + p_n y = 0. If we guess a particular solution as: y=erxy = e^{rx}, the ODE is converted to an n th order normal equation, which relates to n roots. Similar to the case of the 2nd ODE, there are 4 kinds of roots, each relates to a type of particular solution. In the end, the general solution is a linear combination of the 4 types of solutions [4].

real root

real root r related solution is: erxe^{rx}

k th order complex root

kthk^{th} order complex root related solution is: erx(C1+C2x+C3x2+...+Ckxk1)e^{rx}(C_1 + C_2 x + C_3 x^2 + ... + C_k x^{k-1})

A pair of single complex root

This pair of complex roots r1,2=a±ibr_{1,2} = a \pm ib related solutions are: eax(C1cos(bx)+C2sin(bx))e^{ax}(C_1cos(bx) + C_2sin(bx))

A pair of k th complex root

This pair of complex roots r1,2=a±ibr_{1,2} = a \pm ib related solutions are: eax(Pk(x)cos(bx)+Qk(x)sin(bx))e^{ax}(P_k(x)cos(bx) + Q_k(x)sin(bx))

High order … inhomogeneous ODE

Similar to the 2D case, its solution is also the combination of the general solution of the related homogeneous ODE and particular solution. The difference is that the number of term for different orders are much massive than the 2nd case [4].

Ruler’s equation

The general form of Ruler’s equation is:

xny(n)+p1xn1y(n1)+...+pn1xy+pny=f(x)x^n y^{(n)} + p_1 x^{n-1}y^{(n-1)} + ... + p_{n-1}xy' + p_n y = f(x)

For the Ruler’s equation, we can make a smart transformation by let: t=ln(x)t = ln(x), thus we can turn the variable coefficient ODE to a constant coefficient ODE. Then the ODE structure is very similar to the inhomogeneous ODE. If we get the solution y(t)y(t), making a reverse transformation we can get the solution of y(x)y(x).

Infinite series solution to general ODEs

There are conditions where the solution of the ODE could not be presented by elementary functions or integration functions. Then we can using a new method, the infinite series solution to solve it. What’s more the infinite series solution is type of general solution that could also solve the normal ODEs that we have discussed previously. Pay attention, because the solution is an infinite series, it may brought errors if we make cut off at finite order [5].

Power series solution

For an ODE, we can guess its solution as a power series function. To solve this equation, we only need to determine the value of the coefficients.

eg. yxy=0y'' -xy = 0, with boundary condition as: y(x=0)=0, y(x=0)=1y(x=0)=0,\ y'(x=0)=1, suppose the solution is: y=n=0n=anxny = \sum_{n=0}^{n=\infty} a_n x^n.

Power series solution to ODE{width=300px}

After some simplification, we can find the solution to this ODE is an infinite series: y(x)=x3n+1(3n+1)!3nn!, n=1,2,3,...y(x) = \sum \frac{x^{3n+1}}{(3n+1)!3^n n!},\ n = 1, 2, 3, ... .

ODE groups

Sometime we will face more than one ODE, for example the MHD equations are a group of equations. The general procedure to solve these equations is this:

  • Reduce the number of unknown functions to 1.
  • Solve this reduced ODE get y1.
  • Put y1 into original equation and solve y2.

For a simple case, see this ODE group:

{dydx=3y2z (1)dzdx=2yz (2)\left\{ \begin{array}{l} \frac{dy}{dx} = 3y -2z\ (1)\\ \frac{dz}{dx} = 2y -z\ (2) \end{array} \right.

If we take the derivation of x for eq(1) we can get d2ydx2=3dydx3y2dzdx\frac{d^2y}{dx^2} = 3\frac{dy}{dx} -3y -2\frac{dz}{dx}, then use eq(2) we can remove the term dzdx\frac{dz}{dx} and get: d2ydx22dydx+5y=0\frac{d^2 y}{dx^2} - 2\frac{dy}{dx} + 5y = 0, solve this equation and get y(x)y(x), then put it into (1) we can get z(x)z(x).

Reference

[1] https://en.wikipedia.org/wiki/Homogeneous_differential_equation

[2] https://www.differencebetween.com/difference-between-linear-and-vs-nonlinear-differential-equations/

[3] A.C. King, J. Billingham and S.R. Otto, Differential Equations Linear, Nonlinear, Ordinary, Partial, Cambridge university press. 2003.

[4]同济大学应用数学系,高等数学,第五版,高等教育出版社

[5]中科大高数教研室,高等数学导论,第三版,中科大出版社