kovacicsols uses Kovacic’s algorithm to find a Liouvillian solution of an ordinary linear homogeneous second-order differential equation
| a y″+b y′+c y=0, (6) |
where a, b and c are rational functions of the independent variable. The command takes from one to three arguments :
The dependent variable should not be specified if the equation (6) is entered as a list of coefficients.
The return value can be a list or an expression. An empty list means that there are no Liouvillian solutions to the input equation. If a non-empty list is returned, it contains one or two independent solution(s) y1 (and y2) to the equation (6). The general solution to (6) is then
| y=C1 y1+C2 y2, |
where C1,C2∈ℝ are arbitrary constants. However, for some equations only y1 is returned, in which case y2 can be obtained as (using reduction of order) :
| y2=y1 | ∫ | y1−2. (7) |
If kovacicsols returns an expression, it means that the solution to (6) is given implicitly. In that case the return value is a polynomial P of order n∈{4,6,12} in the variable omega_ (denoted here by ω) with rational coefficients rk, k=0,1,2,…,n. If P(ω0)=0 for some ω0, then y=exp(∫ω0) is a solution to the equation (6).
In the first example we find the general solution to the equation
| y″= | ⎛ ⎜ ⎜ ⎝ |
| − |
| ⎞ ⎟ ⎟ ⎠ | y. |
Input :
''=y*(1/x-3/16x^2))
Output :
^(1/4)*exp(2*sqrt(x)),x^(1/4)*exp(-2*sqrt(x))]
Therefore, y=C1 x1/4 e2 √x+C2 x1/4 e−2 √x is the general solution.
In the following example we solve the equation
| x″(t)+ |
| x(t)=0. |
Input :
''+3*(t^2-t+1)/(16*(t-1)^2*t^2)*x,t,x)
Output :
^2-t)-1))^(1/4), (t*(t-1)*(-2*t+2*sqrt(t^2-t)+1))^(1/4)]
Now for arbitrary C1,C2∈ℝ we have
|
In the next example we find a particular solution to the equation
| y″= |
| y. |
Input :
^6-8x^5+12x^4+4x^3+7x^2-20x+4)/(4x^4):; kovacicsols(y''=r*y)
Output :
^2-1)/(x*sqrt(x))*exp((x^3-2*x^2-2)/(2*x))]
Hence y=(x2−1) x−3/2 ex3−2 x2−2/2 x is a solution to the given equation.
A similar output is obtained when solving the equation
| y″+y′= |
| . |
Input :
''+y'=6y/x^2)
Output :
^2+6*x+12)*exp(-x)/x^2]
To solve Titchmarsh equation
| y″+(19−x2) y=0, |
input :
''+(19-x^2)*y=0,x,y)
We obtain a particular solution
| y= | ⎛ ⎜ ⎜ ⎝ | x9−18 x7+ |
| − |
| + |
| ⎞ ⎟ ⎟ ⎠ | exp | ⎛ ⎜ ⎜ ⎝ | − |
| ⎞ ⎟ ⎟ ⎠ | . |
To find the general solution of Halm’s equation
| (1+x2)2 y″(x)+3 y(x)=0, |
input :
^2)^2*y''+3y=0,x,y)
Output :
^2-1)/(sqrt(x^2+1))]
The other basic solution is obtained by using (7). Input :
^-2,x))
Output :
^2-1)/(sqrt(x^2+1)),-x/(sqrt(x^2+1))
Therefore, y=C1 x2−1/√x2+1+C2 x/√x2+1, where C1,C2∈ℝ.
In the following example we find the general solution of the non-homogeneous equation
| y″− |
| =x+4. |
First we need to find the general solution to the corresponding homogeneous equation yh″−27 yh/36 (x−1)2=0. Input :
''-y*27/(36*(x-1)^2),x,y)
Output :
^2-2*x)/(sqrt(x-1))]
We call the obtained solution y1 and find the other basic independent solution by using (7). Input :
^2,x)
Output :
Now the general solution of the homogeneous equation is
| yh=C1 y1+C2 y2= |
| , C1,C2∈ℝ. |
A particular solution yp of the non-homogeneous equation can be obtained by variation of parameters as
| yp=−y1 | ∫ |
| dx+y2 | ∫ |
| dx, |
where f(x)=x+4 and W is the Wronskian of y1 and y2, i.e.
| W=y1 y2′−y2 y1′≠ 0. |
Input :
Output :
^3+72*x^2-156*x+80)/21
Hence yp=1/21 (4 x3+72 x2−156 x+80). Now y=yp+yh. We proceed by checking that it is indeed the general solution of the given equation. Input :
^2)*ysol)==f
Output :
In the next example we attempt to solve the equation from the original Kovacic’s paper :
| y″= | ⎛ ⎜ ⎜ ⎝ |
| − |
| − |
| ⎞ ⎟ ⎟ ⎠ | y. |
Input :
^2)-2/(9*(x-1)^2)+3/(16x*(x-1)):; kovacicsols(y''=r*y)
Output :
^4*x^4*(x-1)^4+ omega_^3*x^3*(x-1)^3*(7*x-3)/3- omega_^2*x^2*(x-1)^2*(48*x^2-41*x+9)/24+ omega_*x*(x-1)*(320*x^3-409*x^2+180*x-27)/432+ (-2048*x^4+3484*x^3-2313*x^2+702*x-81)/20736
The solution is y=exp(∫ω0), where ω0 is a zero of the above expression, thus being a root of a fourth-order polynomial in ω. In similar cases one can try the Ferrari method to obtain ω0.
We get similar output while trying to solve the equation
| 48 t (t+1) (5 t−4) y″+8 (25 t+16) (t−2) y′−(5 t+68) y=0. |
Input :
Output :
^4*(135*t^4-616*t^3-144*t^2+3072*t-4096)/20736- omega_^2*t^2*(t+1)*(15*t^3-80*t^2+80*t+256)/24- t^4*(t+1)^2*(t+4)*(5*t+4)+ 2*omega_*t^3*(t+1)^2*(t-4)*(5*t+8)/3- omega_^3*t*(t+1)*(23*t^2-92*t+128)/54