TranscendentalManipulations(R, F)ΒΆ
manip.spad line 507 [edit on github]
R: Join(Comparable, GcdDomain)
F: Join(FunctionSpace R, TranscendentalFunctionCategory)
TranscendentalManipulations provides functions to simplify and expand expressions involving transcendental operators.
- cos2sec: F -> F
cos2sec(f)
converts everycos(u)
appearing inf
into1/sec(u)
.
- cosh2sech: F -> F
cosh2sech(f)
converts everycosh(u)
appearing inf
into1/sech(u)
.
- cot2tan: F -> F
cot2tan(f)
converts everycot(u)
appearing inf
into1/tan(u)
.
- cot2trig: F -> F
cot2trig(f)
converts everycot(u)
appearing inf
intocos(u)/sin(u)
.
- coth2tanh: F -> F
coth2tanh(f)
converts everycoth(u)
appearing inf
into1/tanh(u)
.
- coth2trigh: F -> F
coth2trigh(f)
converts everycoth(u)
appearing inf
intocosh(u)/sinh(u)
.
- csc2sin: F -> F
csc2sin(f)
converts everycsc(u)
appearing inf
into1/sin(u)
.
- csch2sinh: F -> F
csch2sinh(f)
converts everycsch(u)
appearing inf
into1/sinh(u)
.
- expand: F -> F
expand(f)
performs the following expansions onf:
begin{items} item 1. logs of products are expanded into sums of logs. item 2. trigonometric and hyperbolic trigonometric functions of sums are expanded into sums of products of trigonometric and hyperbolic trigonometric functions. item 3. formal powers of the form(a/b)^c
are expanded intoa^c * b^(-c)
. end{items}
- expandLog: F -> F
expandLog(f)
converts everylog(a/b)
appearing inf
intolog(a) - log(b)
, and everylog(a*b)
intolog(a) + log(b)
.
- expandPower: F -> F
expandPower(f)
converts every power(a/b)^c
appearing inf
intoa^c * b^(-c)
.
- expandTrigProducts: F -> F if F has PatternMatchable R and R has ConvertibleTo Pattern R and R has PatternMatchable R and F has ConvertibleTo Pattern R
expandTrigProducts(e)
replacessin(x)*sin(y)
by(cos(x-y)-cos(x+y))/2
,cos(x)*cos(y)
by(cos(x-y)+cos(x+y))/2
, andsin(x)*cos(y)
by(sin(x-y)+sin(x+y))/2
. Note: this operation uses pattern matcher, so it is relatively expensive. To avoid getting into an infinite loop the transformations are applied at most ten times.
- htrigs: F -> F
htrigs(f)
converts all the exponentials inf
into hyperbolic sines and cosines.
- removeCoshSq: F -> F
removeCoshSq(f)
converts everycosh(u)^2
appearing inf
into1 - sinh(u)^2
, and also reduces higher powers ofcosh(u)
with that formula.
- removeCosSq: F -> F
removeCosSq(f)
converts everycos(u)^2
appearing inf
into1 - sin(u)^2
, and also reduces higher powers ofcos(u)
with that formula.
- removeSinhSq: F -> F
removeSinhSq(f)
converts everysinh(u)^2
appearing inf
into1 - cosh(u)^2
, and also reduces higher powers ofsinh(u)
with that formula.
- removeSinSq: F -> F
removeSinSq(f)
converts everysin(u)^2
appearing inf
into1 - cos(u)^2
, and also reduces higher powers ofsin(u)
with that formula.
- sec2cos: F -> F
sec2cos(f)
converts everysec(u)
appearing inf
into1/cos(u)
.
- sech2cosh: F -> F
sech2cosh(f)
converts everysech(u)
appearing inf
into1/cosh(u)
.
- simplify: F -> F
simplify(f)
performs the following simplifications onf:
begin{items} item 1. rewrites trigs and hyperbolic trigs in terms ofsin
,cos
,sinh
,cosh
. item 2. rewritessin^2
andsinh^2
in terms ofcos
andcosh
, item 3. rewritesexp(a)*exp(b)
asexp(a+b)
. item 4. rewrites(a^(1/n))^m * (a^(1/s))^t
as a single power of a single radical ofa
. end{items}
- simplifyExp: F -> F
simplifyExp(f)
performs the following simplifications onf:
begin{items} item 1. rewritesexp(a)*exp(b)
asexp(a+b)
. item 2. rewritesa^b*a^c
asa^(b+c)
. item 3. rewritesexp(a)/exp(b)
asexp(a-b)
. item 4. rewritesa^b/a^c
asa^(b-c)
. end{items}
- simplifyLog: F -> F
simplifyLog(f)
converts everylog(a) - log(b)
appearing inf
intolog(a/b)
, everylog(a) + log(b)
intolog(a*b)
and everyn*log(a)
intolog(a^n)
.
- sin2csc: F -> F
sin2csc(f)
converts everysin(u)
appearing inf
into1/csc(u)
.
- sinh2csch: F -> F
sinh2csch(f)
converts everysinh(u)
appearing inf
into1/csch(u)
.
- tan2cot: F -> F
tan2cot(f)
converts everytan(u)
appearing inf
into1/cot(u)
.
- tan2trig: F -> F
tan2trig(f)
converts everytan(u)
appearing inf
intosin(u)/cos(u)
.
- tanh2coth: F -> F
tanh2coth(f)
converts everytanh(u)
appearing inf
into1/coth(u)
.
- tanh2trigh: F -> F
tanh2trigh(f)
converts everytanh(u)
appearing inf
intosinh(u)/cosh(u)
.