Ordinary Differential Equations/One-dimensional first-order linear equations

From testwiki
Jump to navigation Jump to search

Definition

One-dimensional first-order inhomogenous linear ODEs are ODEs of the form

x(t)+f(t)x(t)=g(t)

for suitable (that is, mostly, continuous) functions f,g:; note that when g0, we have a homogenous equation instead.

General solution

First we note that we have the following superposition principle: If we have a solution xh ("h" standing for "homogenous") of the problem

xh(t)+f(t)xh(t)=0

(which is nothing but the homogenous problem associated to the above ODE) and a solution to the actual problem xp; that is a function xp such that

xp(t)+f(t)xp(t)=g(t)

("p" standing for "particular solution", indicating that this is only one of the many possible solutions), then the function

x(t):=axh(t)+xp(t) (a arbitrary)

still solves x(t)+f(t)x(t)=g(t), just like the particular solution xp does. This is proved by computing the derivative of x directly.

In order to obtain the solutions to the ODE under consideration, we first solve the related homogenous problem; that is, first we look for xh such that

xh(t)+f(t)xh(t)=0xh=f(t)xh.

It may seem surprising, but this gives actually a very quick path to the general solution, which goes as follows. Separation of variables (and using ln1=exp) gives

xh(t)=exp(t0tf(s)ds),

since the function

G(t):=t0tf(s)ds

is an antiderivative of tf(t). Thus we have found the solution to the related homogenous problem.

For the determination of a solution xp to the actual equation, we now use an Ansatz: Namely we assume

xp(t)=c(t)xh(t),

where c: is a function. This Ansatz is called variation of the constant and is due to Leonhard Euler. If this equation holds for xp, let's see what condition on c we get for xp to be a solution. We want

xp(t)+f(t)xp(t)=g(t), that is (by the product rule and inserting xh):
c(t)exp(t0tf(s)ds)=c(t)exp(t0tf(s)ds)+c(t)(1)exp(t0tf(s)ds)f(t)+f(t)c(t)exp(t0tf(s)ds)=g(t).

Putting the exponential on the other side, that is

c(t)=g(t)exp(t0tf(s)ds)

or

c(t)=t0tg(r)exp(t0rf(s)ds)dr+C1.

Since all the manipulations we did are reversible, all functions of the form

C2exp(t0tf(s)ds)+(t0tg(r)exp(t0rf(s)ds)dr+C1)exp(t0tf(s)ds) (C1,C2 arbitrary)

are solutions. If we set C:=C2+C1, we get the general solution form

Cexp(t0tf(s)ds)+(t0tg(r)exp(t0rf(s)ds)dr)exp(t0tf(s)ds).

We want now to prove that these constitute all the solutions to the equation under consideration. Thus, set

xC(t):=Cexp(t0tf(s)ds)+(t0tg(r)exp(t0rf(s)ds)dr)exp(t0tf(s)ds)

and let x2(t) be any other solution to the inhomogenous problem under consideration. Then xCx2 solves the homogenous problem, for

xC(t)x2(t)f(t)(xC(t)x2(t))=xC(t)f(t)xC(t)(x2(t)f(t)x2(t))=g(t)g(t)=0.

Thus, if we prove that all the homogenous solutions (and in particular the difference xCx2) are of the form

Cexp(t0tf(s)ds),

then we may subtract

Dexp(t0tf(s)ds)

from xCx2 for an appropriate D to obtain zero, which is why x2 is then of the desired form.

Thus, let xh be any solution to the homogenous problem. Consider the function

txh(t)exp(t0tf(s)ds).

We differentiate this function and obtain by the product rule

xh(t)exp(t0tf(s)ds)+f(t)exp(t0tf(s)ds)xh(t)=f(t)xh(t)exp(t0tf(s)ds)+f(t)exp(t0tf(s)ds)xh(t)=0

since xh is a solution to the homogenous problem. Hence, the function is constant (that is, equal to a constant C), and solving

xh(t)exp(t0tf(s)ds)=C

for xh gives the claim.

We have thus arrived at:

Template:TextBox

Note that imposing a condition x(t0)=x0 for some x0 enforces C=x0, whence we got a unique solution for each initial condition.

Exercises

  • Exercise 3.2.1: First prove that ddtln(t2)=2t. Then solve the ODE x(t)+2tx(t)=1t2 for a function existent on [1,) such that x(1)=c for c arbitrary. Use that a similar version of theorem 3.1 holds when f,g are only defined on a proper part of ; this is because the proof carries over.

Clever Ansatz for polynomial RHS

First note that RHS means "Right Hand Side". Let's consider the special case of a 1-dim. first-order linear ODE

x(t)+cx(t)=aiti (c arbitrary),

where we used Einstein summation convention; that is, aixi stands for i=0maiti for some m. In the notation of above, we have f(t)c and g(t)=aiti.

Using separation of variables, the solution to the corresponding homogenous problem g0 is easily seen to equal xh(t)=Cexp(ct) for some capital C.

To find a particular solution xp, we proceed as follows. We pick the Ansatz to assume that xp is simply a polynomial; that is

xp(t)=biti

for certain coefficients bi.

Exercises

  • Exercise 3.3.1: Find all solutions to the ODE x(t)+2x(t)=2t2+4t+3. (Hint: What does theorem 3.1 say about the number of solutions to that problem with a given fixed initial condition?)

Examples

Template:TextBox

Template:BookCat