DEtools
ratsols
find rational function solutions of a linear ODE
Calling Sequence
Parameters
Description
Examples
ratsols(lode, v)
ratsols(coeff_list, g, x)
lode

linear differential equation
v
dependent variable of the lode
coeff_list
list of coefficients of a linear ode
g
righthand side of the equation
x
independent variable of the lode
The ratsols command returns a basis of the rational function solutions of a linear differential equation having rational function coefficients.
The first calling sequence has a linear differential equation in diff or D form as the first argument, and the variable in the differential equation as the second argument. A system of differential equations can be given as a list of the equations as the first argument and a list of the variables as the second argument.
A second calling sequence accepts the following.
 For the first argument, the list of coefficients of a linear ode
 For the second, the righthand side of such an equation
 For the third argument, the independent variable of the lode
A system of differential equations can be given as a list of lists of list of coefficients of a linear odes as the first argument, a list of the righthand sides of such equations as the second argument and the independent variable as the third argument. Each equation is represented as the sum of lodes in one variable. Each is given as a list of coefficients, so one equation is given as a list of lists of coefficients and a system as a list of lists of lists. This input sequence is convenient for programming with the ratsols routine.
The list of coefficients is given in order from low differential order to high differential order and does not include the nonhomogeneous term.
In the case of a homogeneous equation, a basis is returned (as a list in the scalar case and as a list of lists in the system case). In the nonhomogeneous case, the return value is a twoelement list, with the first element a basis for the homogeneous case and the second element a particular rational solution (if it exists).
In the system case, the function invokes LinearFunctionalSystems[RationalSolution] to find solutions.
$\mathrm{with}\left(\mathrm{DEtools}\right)\:$
Homogeneous case
${\mathrm{ode}\u2254\left({t}^{2}+t\right)\mathrm{diff}\left(z\left(t\right)\,\mathrm{`\$`}\left(t\,3\right)\right)\left({t}^{2}+3t+1\right)\mathrm{diff}\left(z\left(t\right)\,\mathrm{`\$`}\left(t\,2\right)\right)+\left(t+4+\frac{2}{t}\right)\mathrm{diff}\left(z\left(t\right)\,t\right)\left(1+\frac{4}{t}+\frac{2}{{t}^{2}}\right)z\left(t\right)=0\:}}$
$\mathrm{ratsols}\left(\mathrm{ode}\,z\left(t\right)\right)$
$\left[{t}\right]$
$\mathrm{ode}\u2254{\mathrm{D}}^{\left(2\right)}\left(z\right)\left(t\right)\frac{3}{t}\mathrm{D}\left(z\right)\left(t\right)+\frac{3}{{t}^{2}}z\left(t\right)\:$
$\left[{t}{\,}{{t}}^{{3}}\right]$
$\mathrm{ode}\u2254\left[\frac{3}{{t}^{2}}\,\frac{3}{t}\,1\right]\:$
$\mathrm{ratsols}\left(\mathrm{ode}\,0\,t\right)$
Nonhomogeneous case
${\mathrm{ode}\u2254\mathrm{diff}\left(z\left(t\right)\,\mathrm{`\$`}\left(t\,2\right)\right)+\frac{2}{t}\mathrm{diff}\left(z\left(t\right)\,t\right)+\frac{1}{{t}^{4}}z\left(t\right)=\frac{2{t}^{2}+1}{{t}^{6}}\:}}$
$\left[\left[\right]{\,}\frac{{1}}{{{t}}^{{2}}}\right]$
System case
$\mathrm{sys}\u2254\left[{x}^{3}\mathrm{diff}\left(\mathrm{y1}\left(x\right)\,x\right)+\mathrm{y2}\left(x\right)\,\mathrm{diff}\left(\mathrm{y2}\left(x\right)\,x\right)x\mathrm{y1}\left(x\right)=x\right]\:$
$\mathrm{vars}\u2254\left[\mathrm{y1}\left(x\right)\,\mathrm{y2}\left(x\right)\right]\:$
$\mathrm{ratsols}\left(\mathrm{sys}\,\mathrm{vars}\,\varnothing \right)$
$\left[\left[\left[\frac{{1}}{{x}}\right]{\,}\left[{x}\right]\right]{\,}\left[{\mathrm{1}}{\,}{0}\right]\right]$
$\mathrm{sysp}\u2254\left[\left[\left[0\,{x}^{3}\right]\,\left[1\right]\right]\,\left[\left[x\right]\,\left[0\,1\right]\right]\right]\:$
$\mathrm{ratsols}\left(\mathrm{sysp}\,\left[0\,x\right]\,x\right)$
See Also
dcoeffs
dsolve
LinearFunctionalSystems[RationalSolution]
Download Help Document
What kind of issue would you like to report? (Optional)