Special solution of inhomogeneous linear differential equations

The general solution of an inhomogeneous linear differential equation can be obtained as the sum of a special solution and the general solution of the corresponding homogeneous differential equation. We study the method of variation of parameters in particular.



Consider the linear differential equation of the form

F(D)y=q(x)

where F(t) is a polynomial and q(x) is a function. When q(x)=0, this is a homogeneous linear differential equation. Here, we assume q(x)0.

Suppose we can factorize F(t) as F(t)=G(t)H(t). If y=y(x) is a solution of F(D)y=q, then z=H(D)y is a solution of G(D)z=q. Thus, the given differential equation F(D)y=q is decomposed into two parts:

  • G(D)z=q (a linear differential equation of z, given q),
  • H(D)y=z (a linear differential equation of y, given z),
and we can process one after the other. Thus, by factorizing the polynomial F(D), we only need to consider the case where F(t)=tα (αC). That is, yαy=q. This ODE can be readily solved by using the method of variation of parameters. The general solution of this ODE is obtained as
y=eαx{eαxq(x)dx+C}
where C is a constant.


Example. Let us solve y+y6y=cosx.
Note that F(t)=t2+t6=(t2)(t+3) so the given ODE is (D2)(D+3)y=cosx. Solving the homogeneous ODE (D2)(D+3)y=0, we have
  y=Ae2x+Be3x where A,B are constants. Let z=(D+3)y, then we have (D2)z=cosx and its special solution is given by
z=e2xe2xcosxdx=25cosx+15sinx.
Similarly, solving (D+3)y=25cosx+15sinx, we have a special solution
y=e3xe3x(25cosx+15sinx)dx=750cosx+150sinx.
Thus, the general solution is
y=750cosx+150sinx+Ae2x+Be3x
where A,B are constants. □

Let's consider the more general case where F(t)=t2+at+b=(tα)(tβ) with αβ. In particular, when a24b<0, we have β=α¯. We want to solve the following second-order ODE:
(Dα)(Dβ)y=q.
Let z=(Dβ)y, and we have
(eq:odea)(Dα)z=q.
We first solve the homogeneous case (Dα)z=0 which yields
z=Aeαx.
Now, regarding A as a function of x, substitute it into (eq:odea), we have
A(x)=eαxq(x).
Thus, we have the special solution
z=eαxA(x)(eq:odez)=eαxeαxq(x)dx.
Next, we solve
(eq:odeb)(Dβ)y=z.
Solving the homogeneous case (Dβ)y=0, we have
y=Beβx.
Regarding B as a function of x and substituting it into (eq:odeb), we have
B(x)=eβxz(x).
Integrating this using (eq:odea), 
B(x)=eβxeαxA(x)dx=e(αβ)xαβA(x)e(αβ)xαβA(x)dx (integration by parts)=e(αβ)xαβA(x)+e(αβ)xβαeαxq(x)dx=e(αβ)xαβeαxq(x)dx+1βαeβxq(x)dx.
Thus, we have the special solution
y=eβxB(x)=eαxαβeαxq(x)dx+eβxβαeβxq(x)dx.
Note the symmetry between the two terms on the right-hand side. This means that swapping α and β does not change the result. This is expected as the differential operators are commutative: (Dα)(Dβ)=(Dβ)(Dα).

Example. Let us solve
y+y=1cosx.
The corresponding homogeneous equation is y+y=0. Noting D2+1=(Di)(D+i), its solution is
(eg:hom)y=Aeix+Beix
where A,BC are constants. Now, we use the method of variation of parameters by regarding A and B as functions of x. According to the above result, we have
A(x)=eix2icosxdx=12i(1isinxcosx)dx=12i(x+ilog|cosx|)+C1
where C1 is a constant. Similarly,
B(x)=12i(xilog|cosx|)+C2
where C2 is a constant. Thus, the general solution is
y=[12i(x+ilog|cosx|)+C1]eix+[12i(xilog|cosx|)+C2]eix.
Using Euler's formula (e±ix=cosx±isinx), this can be further "simplified" (exercise!) as
y=(log|cosx|+C)cosx+(x+D)sinx
where C and D are constants. Note that this is a real-valued function if C and D are real. □

Next, let's consider (Dα)2y=q. Of course, (tα)2=(tα)(tα) so that we can apply the technique above. Let y1=(Dα)y, and we solve (Dα)y1=q. As we have seen above, 
y1=eαxeαxq(x)dx.
Next, we solve (Dα)y2=y1. This gives
y2=eαxeαxy1(x)dx.
We can continue the same process to solve (Dα)my=q for any m=3,4,. Let the solution of (Dα)my=q be ym for m=0,1,2,. We can see that
ym=eαxeαxym1(x)dx
and
y0(x)=q(x).

Example. Solve y4y+4y=cosx. It is an exercise to show that the general solution is
y=325cosx425sinx+Ae2x+Bxe2x
where A and B are constants. □


Comments

Popular posts from this blog

Birth process

Branching processes: Mean and variance

Informal introduction to formal logic