Reducing third-order linear ODEs to with a change of variables
v'''+Zv=F
A general third-order linear ODE can be written in the form , so that the coefficients before and were zero, by a suitable change of variables, a general formula for which is given in this essay. The process is often non-trivial, as it involves solving the equation , as well as a couple of integrals. The essay presents a Wolfram Language function to automate the process.
v'''+Zv=F
v'
v''
ψ''[t]=[t]ψ[t]
2
p
The algorithm
The algorithm
A general third-order linear ordinary differential equation has the form
u'''[t]+a[t]u''[t]+b[t]u'[t]+c[t]u[t]=F[t]
(
1
) Let us introduce new functions , such that
v,A,ϕ
u[t]=A[t]v[ϕ[t]]
(
2
) Substituting this into (1) yields
Av+(aA+3A'+3Aϕ'ϕ'')v+(Abϕ'+2aA'ϕ'+3ϕ'A''+aAϕ''+3A'ϕ''+Aϕ''')+(Ac+bA'+aA''+A''')v=F[t]
3
(ϕ')
3
d
3
dϕ
2
(ϕ')
2
(ϕ')
2
d
2
dϕ
dv
dϕ
(
3
) Let us try to find such and that the coefficients before v and are zero.
A[t]
ϕ[t]
2
d
2
dϕ
dv
dϕ
aA+3A'+3Akk'=0Abk+2aA'k+3kA''+aAk'+3A'k'+Ak''=0
2
k
2
k
(
4
) Dividing the first equation by yields
A
2
k
a+3+3=0
A'
A
k'
k
Integrating this with respect to time, we get
t
∫
t
1
dt
1
∼
Or, solving for ,
A[t]
A=Exp-a[]
1
1
3
t
∫
t
1
dt
1
1
k
(
5
) Plugging this in to the second equation in (4), we get
3-2=+a'-b
2
k'
k
k''
k
1
3
2
a
In terms of the variable
ψ[t]≡
1
k[t]
(
6
) The equation becomes
ψ''=ψ
2
p
(
7
) Where [t]≡+. From (6), . The functions and are then given by
2
p
2
a[t]
12
a'[t]-b
4
k=
1
2
ψ
A
ϕ
A[t]=Exp-a[]ϕ[t]=
1
3
t
∫
t
1
dt
1
2
ψ[t]
t
∫
dt
1
2
ψ[]
t
1
(
8
) Here in the formula for (5) was set to 1 for convenience; the choice is, of course, arbitrary, as it’s just rescaling by a constant factor. The equation (1) is then solved by , where satisfies the equation
A
u[t]=A[t]v[ϕ[t]]
v[ϕ]
3
d
3
dϕ
(
9
) Where is given by the formula
Z
Z[ϕ]≡(4-18a[t](b[t]-[t])+9(6c[t]-3[t]+[t]))
1
54
6
ψ[t]
3
a[t]
′
a
′
b
′′
a
where is determined by inverting (8). is the integral of , and if is real, there will always be a one-to-one correspondence between and . And if and are real, then is real as well. So, if the coefficients and are real, it is always possible to find a real and achieve a one-to-one correspondence between and . Because (7) is a linear ODE, its solution will remain finite for finite . In addition, linearity makes it comparatively easy to solve numerically or with a power or Frobenius series.
t[ϕ]
ϕ
1
2
ψ
ψ
ϕ
t
a
b
2
p
a
b
ψ[t]
ϕ
t
2
p
Code used to do the calculations
Code used to do the calculations
In[]:=
Column[{Coefficient[u'''[t]+a[t]u''[t]+b[t]u'[t]+c[t]u[t]/.uFunction[t,A[t]v[ϕ[t]]],#],#}&/@{v'''[ϕ[t]],v''[ϕ[t]],v'[ϕ[t]],v[ϕ[t]]}]/.{Derivative[p_][ϕ][t]Derivative[p-1][k][t]}
Out[]=
A[t] 3 k[t] (3) v |
{a[t]A[t] 2 k[t] 2 k[t] ′ A ′ k ′′ v |
{A[t]b[t]k[t]+2a[t]k[t] ′ A ′ k ′ A ′ k ′′ A ′′ k ′ v |
A[t]c[t]+b[t] ′ A ′′ A (3) A |
In[]:=
Column[{Coefficient[u'''[t]+a[t]u''[t]+b[t]u'[t]+c[t]u[t]/.uFunction[t,A[t]v[ϕ[t]]],#],#}&/@{v'''[ϕ[t]],v''[ϕ[t]],v'[ϕ[t]],v[ϕ[t]]}]/.{Derivative[p_][ϕ][t]Derivative[p-1][k][t]}/.{f_[t]f}
Out[]=
A 3 k (3) v |
{aA 2 k 2 k ′ A ′ k ′′ v |
{Abk+2ak ′ A ′ k ′ A ′ k ′′ A ′′ k ′ v |
Ac+b ′ A ′′ A (3) A |
Expand[A[t]b[t]k[t]+2a[t]k[t][t]+a[t]A[t][t]+3[t][t]+3k[t][t]+A[t][t]/.{AFunction[t,P[t]/k[t]]}]/.{f_[t]f}(*P≡Exp-a[]*)
′
A
′
k
′
A
′
k
′′
A
′′
k
1
3
t
∫
t
1
dt
1
Out[]=
bP-++2a--+3
aP
′
k
k
3P
2
()
′
k
2
k
′
P
3
′
k
′
P
k
2P
′′
k
k
′′
P
In[]:=
Simplify/.AFunctiont,Exp-Integrate[a[t],t],kFunctiont,/.ψ''[t]+ψ[t],ψ'''[t]D+ψ[t],t
A[t]c[t]+b[t]A'[t]+a[t]A''[t]+A'''[t]
A[t]
3
k[t]
1
3
2
ψ[t]
1
2
ψ[t]
2
a[t]
12
a'[t]-b[t]
4
2
a[t]
12
a'[t]-b[t]
4
Out[]=
1
54
6
ψ[t]
3
a[t]
′
a
′
b
′′
a
A Wolfram Language function to automate the process
A Wolfram Language function to automate the process
The function below executes the algorithm described above. It first computes and tries to find . If no solutions were found, it just returns the general formulas for . If one solution was found, it substitutes the formula for into (8) and (9) and outputs concrete formulas for . If multiple solutions were found, it outputs the general formulas for and gives the user the list of possible .
2
p
ψ[t]
A,ϕ,Z
ψ
A,ϕ,Z
A,ϕ,Z
ψ
In[]:=
ClearAll[thirdOrderODEreduce];thirdOrderODEreduce[a_Function, b_Function, c_Function] := Block t, pSquared, ψ, possibleψ , pSquared = + ; possibleψ = DSolve[ψ''[t] pSquared ψ[t], ψ, t]; Simplify /@ Which[ SameQ[Head[possibleψ], DSolve], Evaluate[ψ''[t] pSquared ψ[t]], Length[possibleψ] 1, ψ = possibleψ[[1, 1, 2]]; Nothing, Length[possibleψ] > 1, ψ ∈ possibleψ[[All, 1, 2]] ], A Exp-Integrate[a[t], t] , ϕ Integrate, t, Z (4 -18 a[t] (b[t]-[t])+9 (6 c[t]-3 [t]+[t])) ;
2
a[t]
12
a'[t] - b[t]
4
1
3
2
ψ[t]
1
2
ψ[t]
1
54
6
ψ[t]
3
a[t]
′
a
′
b
′′
a
Example: u'''+u''+u'+u=0
Example:
u'''+u''+u'+u=0
This is what the function outputs for :
a=b=c=1
In[]:=
thirdOrderODEreduce[1&,1&,1&]
Out[]=
ACos+Sin,ϕCos+Sin,ZCos+Sin
-t/3
2
1
t
6
2
t
6
6
Sint
6
2
1
t
6
1
2
t
6
20
27
6
1
t
6
2
t
6