FunctionSpaceToUnivariatePowerSeries(R, FE, Expon, UPS, TRAN, UTS, TEXP, x)ΒΆ
fs2ups.spad line 1457 [edit on github]
R: Join(GcdDomain, Comparable, RetractableTo Integer, LinearlyExplicitOver Integer)
FE: Join(AlgebraicallyClosedField, TranscendentalFunctionCategory, Algebra Fraction Integer, FunctionSpace R) with
coerce: Expon -> %
Expon: Join(OrderedAbelianMonoid, OrderedRing)
UPS: Join(UnivariatePowerSeriesCategory(FE, Expon), Field, PowerSeriesCategory(FE, Expon, SingletonAsOrderedSet), TranscendentalFunctionCategory)
TRAN: PartialTranscendentalFunctions UPS
UTS: UnivariateTaylorSeriesCategory FE
TEXP: TaylorSeriesExpansion(FE, Expon, SingletonAsOrderedSet, UPS, UTS)
x: Symbol
This package converts expressions in some function space to power series in a variable x
with coefficients in that function space. The function exprToUPS converts expressions to power series whose coefficients do not contain the variable x
. The function exprToGenUPS converts functional expressions to power series whose coefficients may involve functions of log(x)
.
- exprToGenUPS: (FE, Boolean, Union(complex, real: two sides, real: left side, real: right side, just do it)) -> Union(%series: UPS, %problem: Record(func: String, prob: String))
exprToGenUPS(fcn, posCheck?, atanFlag)
converts the expressionfcn
to a generalized power series. IfposCheck?
istrue
, log's
of negative numbers are not allowed nor aren
th roots of negative numbers withn
even. IfposCheck?
isfalse
, these are allowed.atanFlag
determines how the caseatan(f(x))
, wheref(x)
has a pole, will be treated. The possible values ofatanFlag
are"complex"
,"real: two sides"
,"real: left side"
,"real: right side"
, and"just do it"
. IfatanFlag
is"complex"
, then no series expansion will be computed because, viewed as a function of a complex variable,atan(f(x))
has an essential singularity. Otherwise, the sign of the leading coefficient of the series expansion off(x)
determines the constant coefficient in the series expansion ofatan(f(x))
. If this sign cannot be determined, a series expansion is computed only whenatanFlag
is"just do it"
. When the leading term in the series expansion off(x)
is of odd degree (or is a rational degree with odd numerator), then the constant coefficient in the series expansion ofatan(f(x))
for values to the left differs from that for values to the right. IfatanFlag
is"real: two sides"
, no series expansion will be computed. IfatanFlag
is"real: left side"
the constant coefficient for values to the left will be used and ifatanFlag
"real: right side"
the constant coefficient for values to the right will be used. If there is a problem in converting the function to a power series, we return a record containing the name of the function that caused the problem and a brief description of the problem. When expanding the expression into a series it is assumed that the series is centered at 0. For a series centered at a, the user should perform the substitutionx -> x + a
before calling this function.
- exprToPS: (FE, Boolean, Union(complex, real: two sides, real: left side, real: right side, just do it), Boolean, FE) -> Union(%series: UPS, %problem: Record(func: String, prob: String))
exprToPS(fcn, posCheck?, atanFlag, log_flag, log_val)
is like exprToUPS, but iflog_flag
istrue
it replaces logarithms of expansion variable bylog_val
- exprToPS: (FE, Boolean, Union(complex, real: two sides, real: left side, real: right side, just do it), Boolean, FE, FE -> Boolean, FE -> Boolean, FE -> Boolean) -> Union(%series: UPS, %problem: Record(func: String, prob: String))
exprToPS(
fcn
, posCheck?, atanFlag, log_flag, log_val, coef_chk, inv_chk, zero_chk) is like exprToPS(fcn
, posCheck?, atanFlag, log_flag, log_val), but fails ifcoef_chk
isfalse
for some coefficient offcn
or if expansion process needs to invert element ofFE
for whichinv_chk
isfalse
- exprToUPS: (FE, Boolean, Union(complex, real: two sides, real: left side, real: right side, just do it)) -> Union(%series: UPS, %problem: Record(func: String, prob: String))
exprToUPS(fcn, posCheck?, atanFlag)
converts the expressionfcn
to a power series. IfposCheck?
istrue
, log's
of negative numbers are not allowed nor aren
th roots of negative numbers withn
even. IfposCheck?
isfalse
, these are allowed.atanFlag
determines how the caseatan(f(x))
, wheref(x)
has a pole, will be treated. The possible values ofatanFlag
are"complex"
,"real: two sides"
,"real: left side"
,"real: right side"
, and"just do it"
. IfatanFlag
is"complex"
, then no series expansion will be computed because, viewed as a function of a complex variable,atan(f(x))
has an essential singularity. Otherwise, the sign of the leading coefficient of the series expansion off(x)
determines the constant coefficient in the series expansion ofatan(f(x))
. If this sign cannot be determined, a series expansion is computed only whenatanFlag
is"just do it"
. When the leading term in the series expansion off(x)
is of odd degree (or is a rational degree with odd numerator), then the constant coefficient in the series expansion ofatan(f(x))
for values to the left differs from that for values to the right. IfatanFlag
is"real: two sides"
, no series expansion will be computed. IfatanFlag
is"real: left side"
the constant coefficient for values to the left will be used and ifatanFlag
"real: right side"
the constant coefficient for values to the right will be used. If there is a problem in converting the function to a power series, a record containing the name of the function that caused the problem and a brief description of the problem is returned. When expanding the expression into a series it is assumed that the series is centered at 0. For a series centered at a, the user should perform the substitutionx -> x + a
before calling this function.