% !! DO NOT MODIFY THIS FILE BY HAND !! Created by ht.awk.
\newcommand{\LinearOrdinaryDifferentialOperatorXmpTitle}{LinearOrdinaryDifferentialOperator}
\newcommand{\LinearOrdinaryDifferentialOperatorXmpNumber}{9.48}
%
% =====================================================================
\begin{page}{LinearOrdinaryDifferentialOperatorXmpPage}{9.48 LinearOrdinaryDifferentialOperator}
% =====================================================================
\beginscroll

%
%
%
%
%



\spadtype{LinearOrdinaryDifferentialOperator(A, diff)} is the domain of linear
%-% \HDindex{operator!linear ordinary differential}{LinearOrdinaryDifferentialOperatorXmpPage}{9.48}{LinearOrdinaryDifferentialOperator}
ordinary differential operators with coefficients in a ring
\spad{A} with a given derivation.
%This includes the cases of operators which are polynomials in \spad{D}
%acting upon scalar or vector expressions of a single variable.
%The coefficients of the operator polynomials can be integers, rational
%functions, matrices or elements of other domains.
\showBlurb{LinearOrdinaryDifferentialOperator}

\beginmenu
    \menudownlink{{9.48.1. Differential Operators with Series Coefficients}}{ugxLinearOrdinaryDifferentialOperatorSeriesPage}
\endmenu
\endscroll
\autobuttons
\end{page}
%
%
\newcommand{\ugxLinearOrdinaryDifferentialOperatorSeriesTitle}{Differential Operators with Series Coefficients}
\newcommand{\ugxLinearOrdinaryDifferentialOperatorSeriesNumber}{9.48.1.}
%
% =====================================================================
\begin{page}{ugxLinearOrdinaryDifferentialOperatorSeriesPage}{9.48.1. Differential Operators with Series Coefficients}
% =====================================================================
\beginscroll

\noindent
{\bf Problem:}
Find the first few coefficients of \spad{exp(x)/x^i} of \spad{Dop(phi)} where
\begin{verbatim}
Dop := D^3 + G/x^2 * D + H/x^3 - 1
phi := sum(s[i]*exp(x)/x^i, i = 0..)
\end{verbatim}

\noindent
{\bf Solution:}
\xtc{
Define the differential.
}{
\spadpaste{Dx: LODO(EXPR INT, f +-> D(f, x)) \bound{Dxd}}
}
\xtc{
}{
\spadpaste{Dx := D() \free{Dxd}\bound{Dx}}
}
\xtc{
Now define the differential operator \spad{Dop}.
}{
\spadpaste{Dop:= Dx^3 + G/x^2*Dx + H/x^3 - 1 \free{Dx}\bound{Dop}}
}
\xtc{
The first $n$ coefficients can be obtained in the following way.
}{
\begin{spadsrc}
firstCoefficients(n) ==
  phi := reduce(+, [subscript(s,[i])*exp(x)/x^i for i in 0..n])
  phi1 := retract((Dop(phi) * x^(n+3) / exp x))@Polynomial(Integer)
  phi2 := phi1 :: UnivariatePolynomial(x, Polynomial Integer)
  sys := [coefficient(phi2, (n+3-i)::NNI) for i in 2..n+1]
  solve(sys, [subscript(s,[i]) for i in 1..n])
\end{spadsrc}
}
\xtc{
Evaluate this function for several values of \spad{n}.
}{
\spadpaste{firstCoefficients(3)}
}
\xtc{
}{
\spadpaste{firstCoefficients(4)}
}
\xtc{
}{
\spadpaste{firstCoefficients(7)}
}

\endscroll
\autobuttons
\end{page}
%
