Reducing third-order linear ODEs to
v'''+Zv=F
with a change of variables
A general third-order linear ODE can be written in the form
v'''+Zv=F
, so that the coefficients before
v'
and
v''
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
ψ''[t]=
2
p
[t]ψ[t]
, as well as a couple of integrals. The essay presents a Wolfram Language function to automate the process.

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
v,A,ϕ
, such that
u[t]=A[t]v[ϕ[t]]
(
2
)
Substituting this into (1) yields
A
3
(ϕ')
3
d
v
3
dϕ
+(aA
2
(ϕ')
+3A'
2
(ϕ')
+3Aϕ'ϕ'')
2
d
v
2
dϕ
​​+(Abϕ'+2aA'ϕ'+3ϕ'A''+aAϕ''+3A'ϕ''+Aϕ''')
dv
dϕ
+(Ac+bA'+aA''+A''')v=F[t]
(
3
)
Let us try to find such
A[t]
and
ϕ[t]
that the coefficients before
2
d
v
2
dϕ
and
dv
dϕ
are zero.
aA
2
k
+3A'
2
k
+3Akk'=0​​Abk+2aA'k+3kA''+aAk'+3A'k'+Ak''=0
(
4
)
Dividing the first equation by
A
2
k
yields
a+3
A'
A
+3
k'
k
=0
Integrating this with respect to time, we get
t
∫
a[
t
1
]
dt
1
+3Log[A]+3Log[k]=
∼

Or, solving for
A[t]
,
A=

1
Exp-
1
3
t
∫
a[
t
1
]
dt
1

1
k
(
5
)
Plugging this in to the second equation in (4), we get
3
2
k'
k
-2
k''
k
=
1
3
2
a
+a'-b
In terms of the variable
ψ[t]≡
1
k[t]
(
6
)
The equation becomes
ψ''=
2
p
ψ
(
7
)
Where
2
p
[t]≡
2
a[t]
12
+
a'[t]-b
4
. From (6),
k=
1
2
ψ
. The functions
A
and
ϕ
are then given by
A[t]=Exp-
1
3
t
∫
a[
t
1
]
dt
1

2
ψ[t]
​​ϕ[t]=
t
∫
dt
1
2
ψ[
t
1
]
(
8
)
Here

in the formula for
A
(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
u[t]=A[t]v[ϕ[t]]
, where
v[ϕ]
satisfies the equation
3
d
v
3
dϕ
+Zv=F
(
9
)
Where
Z
is given by the formula
Z[ϕ]≡
1
54
6
ψ[t]
(4
3
a[t]
-18a[t](b[t]-
′
a
[t])+9(6c[t]-3
′
b
[t]+
′′
a
[t]))
where
t[ϕ]
is determined by inverting (8).
ϕ
is the integral of
1
2
ψ
, and if
ψ
is real, there will always be a one-to-one correspondence between
ϕ
and
t
. And if
a
and
b
are real, then
2
p
is real as well. So, if the coefficients
a
and
b
are real, it is always possible to find a real
ψ[t]
and achieve a one-to-one correspondence between
ϕ
and
t
. Because (7) is a linear ODE, its solution will remain finite for finite
2
p
. In addition, linearity makes it comparatively easy to solve numerically or with a power or Frobenius series.

Code used to do the calculations

In[]:=
Column[{Coefficient[u'''[t]+a[t]u''[t]+b[t]u'[t]+c[t]u[t]/.uFunction[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
[ϕ[t]]
{a[t]A[t]
2
k[t]
+3
2
k[t]
′
A
[t]+3A[t]k[t]
′
k
[t],
′′
v
[ϕ[t]]}
{A[t]b[t]k[t]+2a[t]k[t]
′
A
[t]+a[t]A[t]
′
k
[t]+3
′
A
[t]
′
k
[t]+3k[t]
′′
A
[t]+A[t]
′′
k
[t],
′
v
[ϕ[t]]}
A[t]c[t]+b[t]
′
A
[t]+a[t]
′′
A
[t]+
(3)
A
[t],v[ϕ[t]]
In[]:=
Column[{Coefficient[u'''[t]+a[t]u''[t]+b[t]u'[t]+c[t]u[t]/.uFunction[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
+3
2
k
′
A
+3Ak
′
k
,
′′
v
[ϕ]}
{Abk+2ak
′
A
+aA
′
k
+3
′
A
′
k
+3k
′′
A
+A
′′
k
,
′
v
[ϕ]}
Ac+b
′
A
+a
′′
A
+
(3)
A
,v[ϕ]
Expand[A[t]b[t]k[t]+2a[t]k[t]
′
A
[t]+a[t]A[t]
′
k
[t]+3
′
A
[t]
′
k
[t]+3k[t]
′′
A
[t]+A[t]
′′
k
[t]/.{AFunction[t,P[t]/k[t]]}]/.{f_[t]f}(*P≡Exp-
1
3
t
∫
a[
t
1
]
dt
1
*)
Out[]=
bP-
aP
′
k
k
+
3P
2
(
′
k
)
2
k
+2a
′
P
-
3
′
k
′
P
k
-
2P
′′
k
k
+3
′′
P
In[]:=
Simplify
A[t]c[t]+b[t]A'[t]+a[t]A''[t]+A'''[t]
A[t]
3
k[t]
/.AFunctiont,Exp-
1
3
Integrate[a[t],t]
2
ψ[t]
,kFunctiont,
1
2
ψ[t]
/.ψ''[t]
2
a[t]
12
+
a'[t]-b[t]
4
ψ[t],ψ'''[t]D
2
a[t]
12
+
a'[t]-b[t]
4
ψ[t],t
Out[]=
1
54
6
ψ[t]
(4
3
a[t]
-18a[t](b[t]-
′
a
[t])+9(6c[t]-3
′
b
[t]+
′′
a
[t]))

A Wolfram Language function to automate the process

The function below executes the algorithm described above. It first computes
2
p
and tries to find
ψ[t]
. If no solutions were found, it just returns the general formulas for
A,ϕ,Z
. If one solution was found, it substitutes the formula for
ψ
into (8) and (9) and outputs concrete formulas for
A,ϕ,Z
. If multiple solutions were found, it outputs the general formulas for
A,ϕ,Z
and gives the user the list of possible
ψ
.
In[]:=
ClearAll[thirdOrderODEreduce];​​thirdOrderODEreduce[a_Function, b_Function, c_Function] := Block​​ ​​ t, pSquared, ψ, possibleψ​​ ,​​ pSquared =
2
a[t]
12
+
a'[t] - b[t]
4
;​​ 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-
1
3
Integrate[a[t], t]
2
ψ[t]
,​​ ϕ  Integrate
1
2
ψ[t]
, t,​​ Z 
1
54
6
ψ[t]
(4
3
a[t]
-18 a[t] (b[t]-
′
a
[t])+9 (6 c[t]-3
′
b
[t]+
′′
a
[t]))​​ ​​;

Example:
u'''+u''+u'+u=0

This is what the function outputs for
a=b=c=1
:
In[]:=
thirdOrderODEreduce[1&,1&,1&]
Out[]=
A
-t/3


2

1
Cos
t
6
+

2
Sin
t
6

,ϕ
6
Sin
t
6

2

1
Cos
t
6
+

1

2
Sin
t
6

,Z
20
27
6

1
Cos
t
6
+

2
Sin
t
6

