(Ordinary) Differential...

34
(Ordinary) Differential Equations aszl ´ o Losonczi University of Debrecen, Faculty of Economics and Business Administration aszl ´ o Losonczi (DE) (Ordinary) Differential Equations 1 / 34

Transcript of (Ordinary) Differential...

Page 1: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

(Ordinary) Differential Equations

Laszlo Losonczi

University of Debrecen, Faculty of Economics and Business Administration

Laszlo Losonczi (DE) (Ordinary) Differential Equations 1 / 34

Page 2: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.1 Notion of differential equation

Problem. Let f : D ⊂ R2 → R be a given function. Find an interval Iand a function ϕ : I → R on I for which

(x , ϕ(x)) ∈ D, if x ∈ I,ϕ is differentiable on the interval I,ϕ′(x) = f (x , ϕ(x)), if x ∈ I.

This problem is called an ordinary first order explicit differentialequation denoted by

y ′(x) = f (x , y(x)) or y ′ = f (x , y) (1)

The function ϕ is called a solution of equation (1) on the interval I.

Example. The solution of y ′ = 2x + 3, is by integrationy(x) = x2 + 3x + C where C is an arbitrary constant, hence ourequation has infinitely many solutions.

Laszlo Losonczi (DE) (Ordinary) Differential Equations 2 / 34

Page 3: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.2 Initial value problem

Problem. Let (x0, y0) ∈ D be a given point, find a solution ϕ : I → R ofthe differential equation (1) which satisfies the conditions

x0 ∈ I,ϕ(x0) = y0.

This problem is called an initial value problem (abbreviated as IVP)for the equation (1) and denoted by

y ′(x) = f (x , y(x)), y(x0) = y0 ill. y ′ = f (x , y), y(x0) = y0. (2)

x0, y0 are called initial data, and the function ϕ : I → R above is calledthe solution of the initial value problem on the interval I.

Example. From the IVP y ′ = 2x + 3, y(1) = 2 we get by integrationthat y(x) = x2 + 3x + C where C is a constant, from the initialcondition 2 = y(1) = 4 + C, C = −2, thus the unique solution of ourIVP is y(x) = x2 + 3x − 2.

Laszlo Losonczi (DE) (Ordinary) Differential Equations 3 / 34

Page 4: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.3 Geometrical meaning: field of directions

Given the function f : D ⊂ R2 → R consider the differential equationy ′ = f (x , y). In each point (x , y) ∈ D we can calculate f (x , y) whichequals to y ′(x) the slope of the tangent line of the solution through thepoint (x , y) ∈ D. At each point of D we can draw a small line segmentpassing through the point and having slope f (x , y). The collection ofthese line segments is called the field of directions of thedifferential equation. A solution of the equation is such a functionwhose tangent line at each point is exactly the element of the field ofdirection belonging to that point. By the help of the field of directionswe can obtain an approximate solution of the IVP:starting from theinitial point we move a little along the elements of the field of direction,then again move a little along the new element of the field, and so on.Finally we get broken line (a piecewise linear, continuous function)which is ”near to the solution” of the IVP, the smaller pieces of thedirection field is taken the better approximations are obtained.

Laszlo Losonczi (DE) (Ordinary) Differential Equations 4 / 34

Page 5: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

Laszlo Losonczi (DE) (Ordinary) Differential Equations 5 / 34

Page 6: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.4 Existence and uniqueness of the solution

Picard-Lindelof existence and uniqueness theoremSuppose that f : Q → R is continuous on the rectangle

Q := { (x , y) ∈ R2 : |x − x0| ≤ a, |y − y0| ≤ b }

(with center (x0, y0) and sides 2a,2b, where x0, y0 ∈ R, a,b > 0 aregiven), further it satisfies the so called Lipschitz condition

|f (x , y1)− f (x , y2)| ≤ k |y1 − y2| ((x , y1), (x , y2) ∈ Q)

k being a constant. Then the IPVy ′(x) = f (x , y(x)), y(x0) = y0

has a unique solution on the interval I = [x0 − h, x0 + h] where

h = min{

a,bM

}, M = max

(x ,y)∈Q|f (x , y)|.

Laszlo Losonczi (DE) (Ordinary) Differential Equations 6 / 34

Page 7: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.4 Existence and uniqueness of the solution

The Picard-Lindelof theorem above is of local character, as it statesthe existence and uniqueness of the solution in a neighborhood of theinitial point. It can be proved that the continuity of f guarantees theexistence of solutions, the Lipschitz condition ensures the uniqueness.The theorem has a global version too.Picard-Lindelof existence and uniqueness theorem (globalversion)Suppose that f : D → R is continuous on the open connected (i.e. anytwo points of D can be connected by a broken line lying in D) setD ⊂ R2 and satisfies the Lipschitz condition

|f (x , y1)− f (x , y2)| ≤ k |y1 − y2| ((x , y1), (x , y2) ∈ D)

where k is a constant. Then for all points (x0, y0) ∈ D the IPVy ′(x) = f (x , y(x)), y(x0) = y0

has a unique solution, which goes ”from boundary to boundary”(this means that the graph of the solution ”goes out” from any closedbounded subset of D on both sides of the point x0).

Laszlo Losonczi (DE) (Ordinary) Differential Equations 7 / 34

Page 8: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.5 Integrable equations

3.5.1 Separable equations

The general form of a separable differential equation isy ′ = g(x)h(y) (3)

where g : [a,b]→ R,h : [c,d ]→ R are given continuous functions andh(y) 6= 0 on the interval [c,d ],

(i.e. the function f on the right hand side of the explicit equation can bewritten in the product form f (x , y) = g(x)h(y), one factor depends on xonly, the other factor depends on y only). If ϕ : I → R is the solution ofour equation on the interval I ⊂ [a,b] then by rearranging the equationwe get

ϕ′(x)h(ϕ(x))

= g(x) x ∈ I.

Integrating both sides (and on the left side applying the substitutionϕ(x) = y ) we get that(∫

ϕ′(x)h(ϕ(x))

dx =

)∫dy

h(y)

∣∣∣y=ϕ(x)

=

∫g(x)dx + C.

Laszlo Losonczi (DE) (Ordinary) Differential Equations 8 / 34

Page 9: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.5.1 Separable equations

With the notation H(y) =∫ dy

h(y) we get that

H(y) =∫

g(x)dx + C

and

y = H−1(∫

g(x)dx + C)

C ∈ R. (4)

Here C is an arbitrary constant, the inverse function H−1 exists asH ′(y) = 1

h(y) 6= 0, y ∈ [c,d ] hence by the continuity of h,H ′ is eithereverywhere positive or everywhere negative, thus H is invertible. Thesolution formula (4) is valid at those points x ∈ [a,b] where it hassense (this may depend also on the choice of C). If h(y0) = 0 at somepoint y0 ∈]c,d [ then one can see that the constant function y(x) = y0is also a solution of our equation. In this case the solution (4) is validon suitable subintervals of [c, y0[, ]y0,d ].

Laszlo Losonczi (DE) (Ordinary) Differential Equations 9 / 34

Page 10: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.5.1 Separable equations

The previous calculations justify the following method of solution. Writethe equation in the form

dydx

= g(x)h(y)

then formally separate the variables (dx and g(x) go to one side, dyand h(y) go to the other side):

dyh(y)

= g(x)dx , or, after integration∫

dyh(y)

=

∫g(x)dx + C,

and got the general solution in implicit form. The IVP fory ′ = g(x)h(y), y(x0) = y0

(3) can be solved either by determining the constant C from the initialcondition or by using definite integrals in the solution formula:

y∫y0

dyh(y)

=

x∫x0

g(x)dx .

Laszlo Losonczi (DE) (Ordinary) Differential Equations 10 / 34

Page 11: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.5.2 Equations with homogeneous f of degree zero

Homogeneous functionsA function F : R+ × R+ → R is called a homogeneous function ofdegree k if F (tx , ty) = tkF (x , y) holds for all t , x , y ∈ R+ = [0,∞[.

If F is homogeneous of degree zero then with t = 1x we get that

F (x , y) = F (1, yx ) = h

(yx

).

The general form of the homogeneous equations is

y ′ = h(y

x

)(5)

where h : [a,b]→ R is a given continuous function.

Substitute in (5) u(x) = y(x)x , then y(x) = xu(x), y ′(x) = u(x) + xu′(x)

henceu + xu′ = h(u) or u′ =

h(u)− ux

,

which is a separable equation for the unknown function u. Solving ity(x) = xu(x) gives the solution of the original equation.

Laszlo Losonczi (DE) (Ordinary) Differential Equations 11 / 34

Page 12: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.5.3 Linear equations

The general form of a first order linear differential equation is

y ′ + p(x)y = f (x) (6)

where p, f : [a,b]→ R are given continuous functions. p is called thecoefficient of y , f is called the free term of the equation.

(6) is called homogeneous, if f (x) = 0, x ∈ [a,b], otherwise it is calledinhomogeneous.Consider first the homogeneous equation

y ′ + p(x)y = 0 (7)

associated with (6). This is a separable equation, thus dydx = −p(x)y ,

separating the variables and integrating we get that∫dyy

= −∫

p(x)dx , or ln |y | = −∫

p(x)dx + ln C1

where C1 > 0 is a positive constant. The constant function y = 0 isalso a solution.

Laszlo Losonczi (DE) (Ordinary) Differential Equations 12 / 34

Page 13: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.5.3 Linear equations

Omitting the logarithm

|y | = C1e−∫

p(x)dx or y = ±C1e−∫

p(x)dx .

Taking to this the zero solution we see that all solutions of thehomogeneous equation (7) (its general solution) are

y = Ce−∫

p(x)dx

where C ∈ R is an arbitrary constant.The inhomogeneous equation (6) has a solution of the formy = C(x)yh(x) where C(x) is a suitable function andyh(x) = e−

∫p(x)dx is a (particular) solution of the associated

homogeneous equation. This is the method of variations ofconstants. Substituting the derivative y ′ = C′(x)yh(x) + C(x)y ′h(x)into (6) we get, after rearrangement that

C′yh + C(y ′h + pyh) = f or C′yh = f ,

C(x) =∫

f (x)yh(x)

dx =

∫ (f (x)e

∫p(x)dx

)dx .

Laszlo Losonczi (DE) (Ordinary) Differential Equations 13 / 34

Page 14: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.5.4 Bernoulli equation

If in the last integral we take up a constant of integration then theformula y = C(x)e−

∫p(x)dx supplies the general solution of (6),

otherwise we get only a particular solution of the inhomogeneousequation.

The general form of the Bernoulli equation is

y ′ + p(x)y = f (x)y(x)α (8)

where p, f : [a,b]→ R are given continuous functions, α ∈ R is a givenconstant. We remark that for certain values of α ∈ R only positivesolutions have sense, since the right hand side power function y(x)α isdefined only for positive functions.

Laszlo Losonczi (DE) (Ordinary) Differential Equations 14 / 34

Page 15: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.5.4 Bernoulli equation

For α = 1 (8) is linear inhomogeneous, thus we may assume thatα 6= 1. Introduce a new unknown function u by

y(x) = u(x)n

where the value of n will be determined later. Substituting thederivative y ′ = nun−1u′ into (8) we get

nun−1u′ + pun = funα vagy u′ +pn

u =fn

unα−n+1.

This becomes linear inhomogeneous if nα− n + 1 = 0. Since α 6= 1,we obtain that with the choice of n = 1

1−α we get a linearinhomogeneous equation for u. Solving this we get the solution of (8)by the formula

y(x) = u(x)n = u(x)1

1−α .

Laszlo Losonczi (DE) (Ordinary) Differential Equations 15 / 34

Page 16: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.6 Equations of second order

In this section we deal with equations of second order. Our results arehowever valid for equations of higher order (with suitable smallchanges).

Problem. Let f : D ⊂ R3 → R be a given function. Find a functionϕ : I → R on an interval I such that

ϕ twice differentiable on I,(x , ϕ(x), ϕ′(x)) ∈ D, if x ∈ I,ϕ′′(x) = f (x , ϕ(x), ϕ′(x)), if x ∈ I.

This problem is called an ordinary explicit differential equation ofsecond order and denote by

y ′′(x) = f (x , y(x), y ′(x)) or y ′′ = f (x , y , y ′). (9)

The function ϕ is called the solution of (9) on the interval I.

Laszlo Losonczi (DE) (Ordinary) Differential Equations 16 / 34

Page 17: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.6 Equations of second order

Problem. Let (x0, y0, y1) ∈ D be a given point. Find a solutionϕ : I → R of equation (9) for which the conditions

x0 ∈ I,ϕ(x0) = y0, ϕ

′(x0) = y1.

are satisfied. This problem is called an initial value problem(abbreviated as IVP) for the equation (9) and denote by

y ′′(x) = f (x , y(x), y ′(x)), y(x0) = y0, y ′(x0) = y1 ory ′′ = f (x , y , y ′), y(x0) = y0, y ′(x0) = y1.

(10)

x0, y0, y1 are called initial data, the function ϕ : I → R is called thesolution of the IPV (10) on the interval I.

Laszlo Losonczi (DE) (Ordinary) Differential Equations 17 / 34

Page 18: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.6 Equations of second order: existence and uniqueness

For equations of second order an existence and uniqueness theoremsimilar to that of first order equations.

Existence and uniqueness theorem for second order equations

If f : D ⊂ R3 → R is continuous on the open connected set D andsatisfies the Lipschitz condition

|f (x , y1, z1)−f (x , y2, z2)|≤k(|y1−y2|+|z1−z2|), ((x , y1, z1), (x , y2, z2)∈D)

(where k is a constant), then for every (x0, y0, y1) ∈ D the IVP

y ′′ = f (x , y , y ′), y(x0) = y0, y ′(x0) = y1

has a unique solution in a neighborhood of the point x0.

Laszlo Losonczi (DE) (Ordinary) Differential Equations 18 / 34

Page 19: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.6 Equations where one variable of f is missing

Here we discuss equations of the form y ′′ = f (x , y , y ′) where the righthand side function f does not depend on one of its variables.

f does not depend on x : y ′′ = f (y , y ′). In this case we can findinvertible solutions by help of the substitution y ′ = p(y). We havey ′′ = p′(y)y ′ = p′(y)p(y), therefore we get for p the first orderequation p′p = f (y ,p). We solve it for p then we solve theseparable equation y ′ = p(y) for the unknown function y .f does not depend on y : y ′′ = f (x , y ′). Now applying thesubstitution y ′ = p(x) we get y ′′ = p′(x), hence our equationtransforms to the first order equation p′ = f (x ,p). We solve it forp then we this p we solve the equation y ′ = p(x) simply byintegration: y =

∫p(x)dx .

f does not depend on y ′: y ′′ = f (x , y). For this equation there isno general method of solution, we have to consider eachequation individually.

Laszlo Losonczi (DE) (Ordinary) Differential Equations 19 / 34

Page 20: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.7 Linear equation of second order, existence and uniqueness

The general form of a linear equation of second order is

y ′′ + p(x)y ′ + q(x)y = f (x) (11)

where p,q, f : [a,b]→ R are given continuous functions. p,q arecalled the coefficients of y ′, y respectively, f is called the free term ofthe equation. (11) is called homogeneous if, ha f (x) = 0, x ∈ [a,b],otherwise it is called inhomogeneous.

The equation y ′′ + p(x)y ′ + q(x)y = 0 is called the associatedhomogeneous equation with (11).Existence and uniqueness theorem for linear equationsSuppose that p,q, f : [a,b]→ R continuous functions. Then forarbitrary x0 ∈ [a,b], and y0, y1 ∈ R the IVP

y ′′ + p(x)y ′ + q(x)y = f (x), y(x0) = y0, y ′(x0) = y1 (12)

has exactly one solution, which is defined on the whole interval[a,b].

Laszlo Losonczi (DE) (Ordinary) Differential Equations 20 / 34

Page 21: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.7 Linear homogeneous equations of second order

The structure of solutionIf y1(x), y2(x) are solutions of the homogeneous equation

y ′′ + p(x)y ′ + q(x)y = 0 (x ∈ [a,b])

then their linear combination y(x) = C1y1(x) + C2y2(x) is also asolution where C1,C2 ∈ R are arbitrary constants.

Wronski determinantThe Wronski determinant of two functions y1(x), y2(x) differentiableon the interval [a,b] is defined by

Wy1,y2(x) =∣∣∣∣ y1(x) y2(x)

y ′1(x) y ′2(x)

∣∣∣∣ (x ∈ [a,b]).

Laszlo Losonczi (DE) (Ordinary) Differential Equations 21 / 34

Page 22: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.7 Linear homogeneous equations of second order

Liouville theoremIf y1(x), y2(x) are solutions of the homogeneous equation

y ′′ + p(x)y ′ + q(x)y = 0 (x ∈ [a,b])

then their Wronski determinant Wy1,y2 has the form

Wy1,y2(x) = Wy1,y2(x0)e−

x∫x0

p(x)dx(x0, x ∈ [a,b]).

This is Liouville’s formula. (Hence Wy1,y2 is either everywhere zero ornowhere zero).

Linear independence and dependence of functionThe functions y1, y2 : [a,b]→ R are said to be linearly independenton [a,b], if c1y1(x) + c2y2(x) = 0 (x ∈ [a,b]) is satisfied only ifc1 = c2 = 0. The functions y1, y2 are said to be linearly dependent ifthey are not linearly independent (in the latter case one function is aconstant multiple of the other).

Laszlo Losonczi (DE) (Ordinary) Differential Equations 22 / 34

Page 23: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.7 Linear homogeneous equations of second order

Linear independence and the Wronski determinantIf Wy1,y2(x0) 6= 0 in some point x0 ∈ [a,b], then y1, y2 are linearlyindependent.If Wy1,y2(x0) = 0 in some point x0 ∈ [a,b], and y1, y2 are thesolutions of a linear homogeneous equation, then y1, y2 arelinearly dependent.

Thus, if y1, y2 are solutions of a linear homogeneous equation,then y1, y2 are linearly independent if and only if Wy1,y2(x0) 6= 0 insome point x0 ∈ [a,b].

The general solution of the homogeneous equationIf y1(x), y2(x) are linearly independent solutions of the linearhomogeneous equation y ′′+ p(x)y ′+ q(x)y = 0 (x ∈ [a,b]) then eachsolution y (general solution) can be written as

y(x) = C1y1(x) + C2y2(x) (x ∈ [a,b]) (13)

where C1,C2 ∈ R are constants.Laszlo Losonczi (DE) (Ordinary) Differential Equations 23 / 34

Page 24: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.7 Linear homogeneous equations of second order with constant

coefficientsConsider the homogeneous equation

y ′′ + py ′ + qy = 0 (x ∈ [a,b]) (14)

where p,q are constants. (14) always has a solution of the formy(x) = eλx with suitable constant λ. Namely substituting thederivatives y ′(x) = λeλx , y ′′(x) = λ2eλx into (14) we geteλx (λ2 + pλ+ q

)= 0, or

λ2 + pλ+ q = 0. (15)

This means that the function y(x) = eλx , (λ ∈ R) is a solution of thehomogeneous equation (14) if and only if λ satisfies the algebraicequation of second degree (15), which is called the characteristicequation of (14).To find the general solution of the homogeneous equation we need twolinearly independent solutions. Next we show how to find them.Denote by D = p2 − 4q the discriminant of (15).

Laszlo Losonczi (DE) (Ordinary) Differential Equations 24 / 34

Page 25: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.7 Linear homogeneous equations of second order with constant

coefficients

If D > 0, then (15) has two distinct real roots λ1 6= λ2. Thesolutions y1(x) = eλ1x , y2(x) = eλ2x of (14) are linearlyindependent as their Wronski determinant

Wy1,y2(x) =∣∣∣∣ eλ1x eλ2x

λ1eλ1x λ2eλ2x

∣∣∣∣ = (λ2−λ1)e(λ1+λ2)x 6= 0 (x ∈ [a,b]).

The general solution of (14) isy(x) = C1eλ1x + C2eλ2x , (C1,C2 ∈ R).If D = 0, then (15) has one double real root λ1 = λ2. Then, inaddition to the solution y1(x) = eλ1x of (14) the functiony2(x) = xeλ1x is also a solution (we can easily check this bysubstituting it to the equation). These two solutions are linearlyindependent since their Wronski determinant is not zero.Therefore the general solution of (14) isy(x) = C1eλ1x + C2xeλ1x , where C1,C2 ∈ R.

Laszlo Losonczi (DE) (Ordinary) Differential Equations 25 / 34

Page 26: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.7 Linear inhomogeneous equations of second order

If D < 0, then (15) has two conjugate complex roots λ1,2 = α± iβ.By Euler’s formula eλ1,2x = eαx (cos(βx)± i sin(βx)) and the realand imaginary parts of this y1(x) = eαx cos(βx) andy2(x) = eαx sin(βx) are real solutions of (14) which are linearlyindependent as their Wronski determinant is not zero. Thegeneral solution of (14) isy(x) = C1eαx cos(βx) + C2eαx sin(βx), where C1,C2 ∈ R.

The structure of solutionEvery solution (the general solution) of the inhomogeneous equation

y ′′ + p(x)y ′ + q(x)y = f (x) (x ∈ [a,b]) (16)can be written as y(x) = y(x) + yh(x) where y is a (particular) solutionof the inhomogeneous equation (16), yh(x) = C1y1(x) + C2y2(x) is thegeneral solution of the associated homogeneous equation (i.e.y1(x), y2(x) are linearly independent solutions of the equationy ′′ + p(x)y ′ + q(x)y = 0 and C1,C2 ∈ R are constants).

Laszlo Losonczi (DE) (Ordinary) Differential Equations 26 / 34

Page 27: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.7 Linear inhomogeneous equations of second order

If y1(x), y2(x) are two linearly independent solutions of the (with (16))associated homogeneous equation, then the inhomogeneous equation(16) has a solution of the form

y(x) = C1(x)y1(x) + C2(x)y2(x) (17)with suitable functions C1(x),C2(x). This is called the method ofvariation of the constants.From (17) we gety ′(x) = C1(x)y ′1(x) + C2(x)y ′2(x) + C′1(x)y1(x) + C′2(x)y2(x), chooseC1(x),C2(x) such that

C′1(x)y1(x) + C′2(x)y2(x) = 0. (18)Then y ′′(x) = C′1(x)y

′1(x) + C′2(x)y

′2(x) + C1(x)y ′′1 (x) + C2(x)y ′′2 (x).

Substituting these derivatives into (16) we get after a rearrangementthat

C′1(x)y′1(x) + C′2(x)y

′2(x) + C1(x)[y ′′1 (x) + p(x)y ′1(x) + q(x)y1(x)]+

C2(x)[y ′′2 (x) + p(x)y ′2(x) + q(x)y2(x)] = f (x).The sums in the two brackets are zero, thus

C′1(x)y′1(x) + C′2(x)y

′2(x) = f (x). (19)

Laszlo Losonczi (DE) (Ordinary) Differential Equations 27 / 34

Page 28: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.7 Linear inhomogeneous equations of second order

Theorem on variation of the constantsLet y1(x), y2(x) be two linearly independent solutions of thehomogeneous equation y ′′ + p(x)y ′ + q(x)y = 0 then

y(x) = C1(x)y1(x) + C2(x)y2(x)

is a solution of the inhomogeneous equationy ′′ + p(x)y ′ + q(x)y = f (x) if the functions C1(x),C2(x) satisfyequations (18),(19):

C′1(x)y1(x) + C′2(x)y2(x) = 0C′1(x)y

′1(x) + C′2(x)y

′2(x) = f (x).

At each point x ∈ [a,b] this is a linear inhomogeneous algebraicsystem of (two) equations, which can be solved uniquely for theunknown functions C′1(x),C

′2(x), as the determinant of the system is

the Wronski determinant Wy1,y2(x) which is nowhere zero due to thelinear independence of the solutions y1(x), y2(x).

Laszlo Losonczi (DE) (Ordinary) Differential Equations 28 / 34

Page 29: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.7 Linear inhomogeneous equations of second order

By Cramer’s rule the solutions of the system (18),(19) are

C′1(x) =−y2(x)f (x)Wy1,y2(x)

, C′2(x) =y1(x)f (x)Wy1,y2(x)

,

hence

C1(x) =∫−y2(x)f (x)Wy1,y2(x)

dx + c1, C2(x) =∫

y1(x)f (x)Wy1,y2(x)

dx + c2

where c1, c2 are arbitrary constants. With these functions (17) givesthe general solution of the inhomogeneous equation, while if we omitthe constants of integration then (17) supplies only a particular solutionof the inhomogeneous equation.

Laszlo Losonczi (DE) (Ordinary) Differential Equations 29 / 34

Page 30: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.7 Linear inhomogeneous equations of second order with constant

coefficients

Suppose now that in (12) the coefficients p,q are given constants,f : [a,b]→ R is a given continuous function:

y ′′ + py ′ + qy = f (x) (x ∈ [a,b]). (20)

We have seen that the general solution of the associatedhomogeneous equation can easily be found.To solve the inhomogeneous equation we have two possibilities.

We can apply the method of variation of the constants for anycontinuous free term f (x) to find a particular solution or thegeneral solution of the inhomogeneous equation.If the free term f (x) has a special form

f (x) = eαx (P(x) cos(βx) + Q(x) sin(βx)) , (21)

where α, β ∈ R are real constants P,Q polynomials then we canapply the method of undetermined coefficients (see thefollowing theorems).

Laszlo Losonczi (DE) (Ordinary) Differential Equations 30 / 34

Page 31: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.7 Linear inhomogeneous equations of second order with constant

coefficients

Decomposition of the solution of the inhomogeneous equationIf y i(x) are solutions of the equations

y ′′ + py ′ + qy = fi(x) (x ∈ [a,b]).for i = 1,2, . . . ,n then the function y i(x) = y1(x) + y2(x) + · · ·+ yn(x)is a solution of the equation

y ′′ + py ′ + qy = f1(x) + f2(x) + · · ·+ fn(x) (x ∈ [a,b]).The form of the solution of the inhomogeneous equation (20)If λ := α± iβ is an r -fold r = 0,1, . . . solution of the characteristicequation λ2 + pλ+ q = 0 of the associated homogeneous equationthen (20) (with free term of the form (21)) has a particular solutionof the form

y(x) = x r eαx(

P(x) cos(βx) + Q(x) sin(βx)), (22)

where P(x),Q(x) are polynomials whose degrees are the greater ofthe degrees of the polynomials P(x),Q(x).

Laszlo Losonczi (DE) (Ordinary) Differential Equations 31 / 34

Page 32: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.8 Examples for the method of undetermined coefficients

First example is the equation y ′′ − 6y ′ + 9y = f (x). The solutions ofcharacteristic equation λ2 − 6λ+ 9 = 0, are λ1,2 = 3.

If f (x) = (x + 3)e5x , then in (21) α = 5, β = 0,P(x) = x + 3 ofdegree one, Q can be taken to be zero Q(x) = 0, as its factorsin 0x = 0. In this case λ = α± iβ = 5 is not a solution of thecharacteristic equation, therefore r = 0, there is a solution of theform y(x) = (Ax + B)e5x where A,B the ”undetermined”constants. These constants can be determined by substituting thefunction y(x) = (Ax + B)e5x into the equation and comparing thecoefficients (on both sides) of the linearly independent functions.If f (x) = (x2 + 3)e3x , then in (21) α = 3, β = 0,P(x) = x2 + 3 is ofdegree two, Q(x) = 0 again as its factor sin 0x = 0.λ = α± iβ = 3 is a double/twofold root of the characteristicequation, hence r = 2, the inhomogeneous equation has asolution of the form y(x) = x2(Ax2 + Bx + C)e3x where A,B,Care constants. These constants can easily be determined bysubstituting y(x) into the equation.

Laszlo Losonczi (DE) (Ordinary) Differential Equations 32 / 34

Page 33: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.8 Examples for the method of undetermined coefficients

Second example is the equation y ′′ − 6y ′ + 13y = f (x). The solutionsof the characteristic equation λ2 − 6λ+ 13 = 0, are λ1,2 = 2± 3i .

If f (x) = e2x(x + 3) sin 3x , then in (21) α = 2, β = 3,P(x) = 0 is ofdegree zero, Q(x) = x + 3 is of degree one. λ = α± iβ = 2± 3i isa simple (onefold) zero of the characteristic equation, hencer = 1, the inhomogeneous equation has a solution of the formy(x) = xe2x((Ax + B) sin 3x + (Cx + D) cos 3x) where A,B,C,Dare constants. These constants can easily be determined bysubstituting y(x) into the equation.If f (x) = (2x + 3) sin 3x , then in (21) α = 0, β = 3,P(x) = 0 is ofdegree zero Q(x) = 2x + 3 of degree one. λ = α± iβ = ±3i is nota solution of the characteristic equation, hence r = 0, there is asolution of the form y(x) = (Ax + B) sin 3x + (Cx + D)) cos 3x)where A,B,C,D are constants. These constants can easily bedetermined by substituting y(x) into the equation.

Laszlo Losonczi (DE) (Ordinary) Differential Equations 33 / 34

Page 34: (Ordinary) Differential Equationsriemann.math.klte.hu/~losi/jegyzet/eco/adv_math_differential_equ... · This problem is called an ordinary first order explicit differential equation

3.8 Examples for the method of undetermined coefficients

Third example is the equation y ′′ + y ′ − 2y = f (x). The solutions ofthe characteristic equation λ2 + λ− 2 = 0, are λ1 = 1, λ2 = −2.

If f (x) = (x + 3)e2x + 2 sin 3x , then the solution corresponding tothe function f1(x) = (x + 3)e2x is y1(x) = (Ax + B)e2x , while thesolution corresponding to f2(x) = 2 sin 3x isy2(x) = C sin 3x + D cos 3x . First we find A,B then C,D finallywith these values y(x) = (Ax + B)e2x + C sin 3x + D cos 3x is asolution of the inhomogeneous equation.If f (x) = (x + 3)e−2x + 5 cos 3x , then the solution correspondingto the function f1(x) = (x + 3)e−2x is y1(x) = x(Ax + B)e−2x ,while the solution corresponding to f2(x) = 5 cos 3x isy2(x) = C sin 3x + D cos 3x . First we determine A,B then C,Dfinally with these valuesy(x) = x(Ax + B)e−2x + C sin 3x + D cos 3x is a solution of theinhomogeneous equation.

Laszlo Losonczi (DE) (Ordinary) Differential Equations 34 / 34