Artificial Intelligence 🤖
Differential equations
Ordinary differential equations
Standard form linear ODEs

Standard form linear ODEs

The second order, linear differential equation is given in standard form as,

y+P(x)y+Q(x)y=f(x)y^{\prime \prime}+P(x) y^{\prime}+Q(x) y=f(x)

where yy^{\prime} and yy^{\prime \prime} denote the first and second derivatives of yy wrt xx, respectively.

Just like first order LODEs, we note that the LODE given by (13.1), has the following properties:

  • the function y(x)y(x) and its derivatives, y(x),y(x)y^{\prime}(x), y^{\prime \prime}(x) are not present at any power higher than 1 ;
  • there are no products of the function y(x)y(x) and its derivatives, y(x),y(x)y^{\prime}(x), y^{\prime \prime}(x).

The xx-dependent functions P(x),Q(x)P(x), Q(x) and f(x)f(x) are required to be continuous but they can take any form: they can be constants, linear, or nonlinear functions.

Terminology

If f(x)=0f(x)=0 in Eq. (13.1), the ODE reduces to,

y+P(x)y+Q(x)y=0.y^{\prime \prime}+P(x) y^{\prime}+Q(x) y=0 .

Equation (13.2) is known as the homogeneous equation. If f(x)0f(x) \neq 0, the ODE is known as the nonhomogeneous equation.

In Subsecs. 13.1.1 and 13.1.2 of this chapter, we will be concerned with the homogeneous equation given by (13.2) where we will identify some important ideas on the structure of the general solutions to such ODEs. In Subsec. 13.1.3, we briefly talk about existence & uniqueness of solutions to the IVP given by ODE (13.1) and a pair of initial conditons.

Homogeneous equations: general solution

We start this section with an example. Consider the following ODE

y4y=0y^{\prime \prime}-4 y=0

which is equivalent to (13.2) with P(x)=0,Q(x)=4P(x)=0, Q(x)=-4. The differential equation (13.3) gives y=4yy^{\prime \prime}=4 y which tells us that we are looking for a solution y(x)y(x) which, when differentiated twice (to obtain yy^{\prime \prime} ), should be equal to 4 times the original function. An obvious solution is y1=e2xy_{1}=e^{2 x} and so is any constant multiple of it, i.e. y1=c1e2xy_{1}=c_{1} e^{2 x}. Perhaps another obvious solution is y2=e2xy_{2}=e^{-2 x} and, again, so is any constant multiple of it, i.e. y2=c2e2xy_{2}=c_{2} e^{-2 x}. We can check that y1y_{1} and y2y_{2} are in fact solutions to (13.3) by differentiating twice and plugging back into the ODE. Take y1=c1e2xy_{1}=c_{1} e^{2 x} which, upon differentiating twice wrt xx, yields y1=4c1e2xy_{1}^{\prime \prime}=4 c_{1} e^{2 x}. Substituting in Eq. (13.3), we have:

y14y1=4c1e2x4c1e2x=0y_{1}^{\prime \prime}-4 y_{1}=4 c_{1} e^{2 x}-4 c_{1} e^{2 x}=0

thus, y1=c1e2xy_{1}=c_{1} e^{2 x} is a solution. Similarly, we can show that y2=c2e2xy_{2}=c_{2} e^{-2 x} is also a solution.

In fact, any linear combination of y1y_{1} and y2y_{2}, i.e.,

y(x)=c1y1(x)+c2y2(x)y(x)=c_{1} y_{1}(x)+c_{2} y_{2}(x)

can also be shown to satisfy the ODE. This leads us to state the following definition about the structure of the general solution to homogeneous, second order linear differential equations.

Definition 13.1 If y1(x)y_{1}(x) and y2(x)y_{2}(x) are two linearly independent solutions to a linear, homogeneous ODE then

y(x)=c1y1(x)+c2y2(x)y(x)=c_{1} y_{1}(x)+c_{2} y_{2}(x)

is also a solution for any pair of constants c1c_{1} and c2c_{2}.

The pair of solutions y1(x)y_{1}(x) and y2(x)y_{2}(x) are known to be a fundamental set of solutions.

A few things to note about the statement in the box:

  • It is not true for nonhomogeneous ODEs;
  • It is true for a linear homogeneous ODE of any order, say of order NN, but note that we should have a set of NN fundamental solutions appearing in Eq. (13.5), i.e.
y(x)=c1y1(x)+c2y2(x)++cNyN(x).y(x)=c_{1} y_{1}(x)+c_{2} y_{2}(x)+\ldots+c_{N} y_{N}(x) .

So, for an ODE of order 2, we expect to have two linearly independent solutions, for an ODE of order 3 , we expect three and so on.

Initial conditions

We notice that the general solution contains two arbitrary constants c1c_{1} and c2c_{2}. Therefore, a particular solution to a second order differential equation requires two initial conditions (to solve for the 2 constants). These are given by the value of the function yy and its first order derivative yy^{\prime} at a particular point in xx, say x0x_{0}

y(x0)=y0 and y(x0)=y0,y\left(x_{0}\right)=y_{0} \quad \text { and } \quad y^{\prime}\left(x_{0}\right)=y_{0}^{\prime},

where y0y_{0} and y0y_{0}^{\prime} are constants. Note that both conditions in Eq. (13.6) are specified at the same point x0x_{0}. If they are different, then the problem (consisting of the ODE and the initial conditions), is known as a boundary value problem. The mathematical theory for boundary value problems is more complicated than initial value problems and generally less well-known. Boundary value problems are not discussed in this course; these are encountered in the Mathematics course in Year II with applications in fluid flow (flow through pipes, laminar flow in a channel) as well as heat and mass transfer.

Wronskian determinant

Linear independent functions

For the pair of solutions y1(x)y_{1}(x) and y2(x)y_{2}(x) to constitute a fundamental set of solutions we require that the two solutions are linearly independent. When referring to two functions being linearly independent, roughly speaking, it means that the two functions cannot be a constant multiple of each other. Note that we discussed linear independence of vectors in Subsec. 9.6 in Chapter 9.

To check if two functions, y1(x)y_{1}(x) and y2(x)y_{2}(x) are linearly independent/dependent, we use the Wronskian determinant. This is defined as follows:

W(x)=y1y2y1y2=y1y2y2y1;W(x)=\left|\begin{array}{ll} y_{1} & y_{2} \\ y_{1}^{\prime} & y_{2}^{\prime} \end{array}\right|=y_{1} y_{2}^{\prime}-y_{2} y_{1}^{\prime} ;

where, if W(x)0W(x) \neq 0 at any point in xx on I\mathcal{I}, the functions are said to be linearly independent (note it does not need to be nonzero everywhere on the domain). This result is true for any arbitrary pair of (differentiable) functions; i.e. for any two functions, not necessarily solutions to a second order LODE.

For an arbitrary pair of functions, the Wronskian does not provide a test for dependence, i.e. if W(x)=0W(x)=0 at all points in xx, the two functions are not necessarily dependent 24{ }^{24}. However, for two arbitrary functions that are dependent, their Wronskian is zero at all points in the domain. An example using two arbitrary functions is shown below.

24{ }^{24} Try the functions f(x)=xxf(x)=x|x| and g(x)=x2g(x)=x^{2}. Their Wronskian is always zero but the two functions are independent. Example 13.1 Determine whether the functions ex,cosxe^{x}, \cos x are linearly independent on the domain (,)(-\infty, \infty).

Solution The Wronskian of the set {ex,cosx}\left\{e^{x}, \cos x\right\} is given by Eq. (13.8) as

W(x)=excosxexsinx=exsinxexcosx;W(x)=\left|\begin{array}{cc} e^{x} & \cos x \\ e^{x} & -\sin x \end{array}\right|=-e^{x} \sin x-e^{x} \cos x ;

Since the Wronskian is nonzero for at least one point in the interval of interest, it follows that the set is linearly independent.

If the functions y1(x)y_{1}(x) and y2(x)y_{2}(x) are also solutions to the homogeneous, linear second order ODE [i.e. Eq. (13.2)], then we claim the following result with respect to the Wronskian.

If y1(x)y_{1}(x) and y2(x)y_{2}(x) are a linearly independent pair of fundamental solutions to Eq. (13.2), then their Wronskian is never zero on some interval I\mathcal{I}. Then (and only then) their linear combination i.e. y(x)=c1y1(x)+c2y2(x)y(x)=c_{1} y_{1}(x)+c_{2} y_{2}(x) form a general solution of the ODE (13.2). If the two solutions are linearly dependent then their Wronskian is always zero for all xx on I\mathcal{I}.

The proof for the statement in the box, i.e. that the Wronskian of two solutions to ODE (13.2) is either never zero or always zero is given by Abel's theorem and is discussed below.

Abel's theorem

Here we show why the Wronskian determinant of two solutions to a linear ODE is either always zero (if they are linearly dependent) or never zero if they are linearly independent. Let us begin by assuming that y1(x)y_{1}(x) and y2(x)y_{2}(x) are two solutions to the homogeneous ODE (13.2). Their Wronskian is given by Eq. (13.7), i.e.

W(x)=y1y2y2y1.W(x)=y_{1} y_{2}^{\prime}-y_{2} y_{1}^{\prime} .

Now, differentiating W(x)W(x) wrt xx gives,

W(x)=y1y2+y2y1y2y1y2y1=y1y2y2y1\begin{aligned} W^{\prime}(x) & =y_{1} y_{2}^{\prime \prime}+y_{2}^{\prime} y_{1}^{\prime}-y_{2} y_{1}^{\prime \prime}-y_{2}^{\prime} y_{1}^{\prime} \\ & =y_{1} y_{2}^{\prime \prime}-y_{2} y_{1}^{\prime \prime} \end{aligned}

Next, since y1(x)y_{1}(x) and y2(x)y_{2}(x) are solutions to (13.2), we have,

y1+P(x)y1+Q(x)y1=0y_{1}^{\prime \prime}+P(x) y_{1}^{\prime}+Q(x) y_{1}=0

for y1y_{1} and

y2+P(x)y2+Q(x)y2=0y_{2}^{\prime \prime}+P(x) y_{2}^{\prime}+Q(x) y_{2}=0

for y2y_{2}. Now, multiplying Eq. (13.10) by y2y_{2} gives

y2y1+P(x)y2y1+Q(x)y2y1=0y_{2} y_{1}^{\prime \prime}+P(x) y_{2} y_{1}^{\prime}+Q(x) y_{2} y_{1}=0

and Eq. (13.11) by y1y_{1} gives

y1y2+P(x)y1y2+Q(x)y1y2=0.y_{1} y_{2}^{\prime \prime}+P(x) y_{1} y_{2}^{\prime}+Q(x) y_{1} y_{2}=0 .

Subtracting Eq. (13.12) from Eq. (13.13), we obtain:

(y1y2y2y1)+P(x)(y1y2y2y1)=0\left(y_{1} y_{2}^{\prime \prime}-y_{2} y_{1}^{\prime \prime}\right)+P(x)\left(y_{1} y_{2}^{\prime}-y_{2} y_{1}^{\prime}\right)=0

Note that the terms in blue are equivalent to W(x)W^{\prime}(x) given by (13.9) and the terms in red are equivalent to W(x)W(x) given by (13.7). So, Eq. (13.14) may be rewritten as,

W(x)+P(x)W(x)=0.W^{\prime}(x)+P(x) W(x)=0 .

Equation (13.15) is a first order ODE for W(x)W(x) which may be integrated (by separating variables) to give the following general solution,

W(x)=ceP(x)dx.W(x)=c e^{-\int P(x) d x} .

Since the exponential function is never zero, we see from Eq. (13.16), that W(x)W(x) is either identically zero when c=0c=0 and never zero if c0c \neq 0.

Existence & uniqueness of solutions

Here, we simply state the conditions for existence and uniqueness of solutions to second order LODEs. Consider the IVP,

y+P(x)y+Q(x)y=f(x),y(x0)=y0,y(x0)=y0.\begin{array}{r} y^{\prime \prime}+P(x) y^{\prime}+Q(x) y=f(x), \\ y\left(x_{0}\right)=y_{0}, \quad y^{\prime}\left(x_{0}\right)=y_{0}^{\prime} . \end{array}

If P(x),Q(x)P(x), Q(x) and f(x)f(x) are continuous on the interval a<x<ba<x<b, containing the point x=x0x=x_{0} then, there exists a unique solution y=y(x)y=y(x) and this solution exists throughout the entire interval. This result applies to second order LODEs of the form given by (13.1) and guarantees that the given IVP always has a twice-differentiable solution (existence) and this solution is unique (uniqueness) on any interval containing x0x_{0} as long as P(x)P(x), Q(x)Q(x) and f(x)f(x) are continuous on the same interval.

Note that neither existence nor uniqueness of a solution is guaranteed at a discontinuity of P(x),Q(x)P(x), Q(x), or f(x)f(x).