/usr/share/axiom-20170501/src/algebra/UTSSOL.spad is in axiom-source 20170501-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | )abbrev package UTSSOL TaylorSolve
++ Description:
++ This package has no description
TaylorSolve(F, UTSF, UTSSUPF) : SIG == CODE where
F : Field
SUP ==> SparseUnivariatePolynomialExpressions
UTSF : UnivariateTaylorSeriesCategory F
UTSSUPF : UnivariateTaylorSeriesCategory SUP F
NNI ==> NonNegativeInteger
SIG ==> with
seriesSolve : (UTSSUPF -> UTSSUPF, List F) -> UTSF
CODE ==> add
seriesSolve(f, l) ==
c1 :=
map((x:F):SUP F +-> x::(SUP F), l)
$ListFunctions2(F, SUP F)::(Stream SUP F)
coeffs: Stream SUP F := concat(c1, generate(monomial(1$F,1$NNI)))
st: List Stream SUP F := [coeffs, coeffs]
next: () -> F :=
nr := st.1
res: F
if ground?(coeff: SUP F := nr.1)$(SUP F)
then
res := ground coeff
st.1 := rest nr
else
ns := st.2
eqs: Stream SUP F := coefficients f series ns
while zero? first eqs repeat eqs := rest eqs
eq: SUP F := first eqs
if degree eq > 1 then
if monomial? eq then res := 0
else
output(hconcat("The equation is: ",eq::OutputForm))
$OutputPackage
error _
"seriesSolve: equation for coefficient not linear"
else res := (-coefficient(eq, 0$NNI)$(SUP F)
/coefficient(eq, 1$NNI)$(SUP F))
nr.1 := res::SUP F
st.1 := rest nr
res
series generate next
|