diff --git a/books/bookvol10.4.pamphlet b/books/bookvol10.4.pamphlet index e3e48a6..c7c5d30 100644 --- a/books/bookvol10.4.pamphlet +++ b/books/bookvol10.4.pamphlet @@ -144535,7 +144535,8 @@ TranscendentalManipulations(R, F): Exports == Implementation where ++ removeSinhSq(f) converts every \spad{sinh(u)**2} appearing in f into ++ \spad{1 - cosh(x)**2}, and also reduces higher powers ++ of \spad{sinh(u)} with that formula. - if R has PatternMatchable(R) and R has ConvertibleTo(Pattern(R)) and F has ConvertibleTo(Pattern(R)) and F has PatternMatchable R then + if R has PatternMatchable(R) and R has ConvertibleTo(Pattern(R)) + and F has ConvertibleTo(Pattern(R)) and F has PatternMatchable R then expandTrigProducts : F -> F ++ expandTrigProducts(e) replaces \axiom{sin(x)*sin(y)} by ++ \spad{(cos(x-y)-cos(x+y))/2}, \axiom{cos(x)*cos(y)} by @@ -144582,7 +144583,8 @@ TranscendentalManipulations(R, F): Exports == Implementation where import F import List F - if R has PatternMatchable R and R has ConvertibleTo Pattern R and F has ConvertibleTo(Pattern(R)) and F has PatternMatchable R then + if R has PatternMatchable R and R has ConvertibleTo Pattern R + and F has ConvertibleTo(Pattern(R)) and F has PatternMatchable R then XX : F := coerce new()$Symbol YY : F := coerce new()$Symbol sinCosRule : RewriteRule(R,R,F) := @@ -144681,7 +144683,7 @@ TranscendentalManipulations(R, F): Exports == Implementation where termexp p == exponent:F := 0 coef := (leadingCoefficient p)::P - lpow := select(is?(#1, POWER)$K, lk := variables p)$List(K) + lpow := select((z:K):Boolean+->is?(z,POWER)$K, lk := variables p)$List(K) for k in lk repeat d := degree(p, k) if is?(k, "exp"::Symbol) then @@ -144689,11 +144691,14 @@ TranscendentalManipulations(R, F): Exports == Implementation where else if not is?(k, POWER) then -- Expand arguments to functions as well ... MCD 23/1/97 --coef := coef * monomial(1, k, d) - coef := coef * monomial(1, kernel(operator k,[simplifyExp u for u in argument k], height k), d) + coef := coef * + monomial(1, + kernel(operator k, + [simplifyExp u for u in argument k], height k), d) coef::F * exp exponent * powersimp(p, lpow) expandPower f == - l := select(is?(#1, POWER)$K, kernels f)$List(K) + l := select((z:K):Boolean +-> is?(z, POWER)$K, kernels f)$List(K) eval(f, l, [expandpow k for k in l]) -- l is a list of pure powers appearing as kernels in p @@ -144702,7 +144707,7 @@ TranscendentalManipulations(R, F): Exports == Implementation where k := first l -- k = a**b a := first(arg := argument k) exponent := degree(p, k) * second arg - empty?(lk := select(a = first argument #1, rest l)) => + empty?(lk := select((z:K):Boolean +-> a = first argument z, rest l)) => (a ** exponent) * powersimp(p, rest l) for k0 in lk repeat exponent := exponent + degree(p, k0) * second argument k0 @@ -144720,32 +144725,32 @@ TranscendentalManipulations(R, F): Exports == Implementation where sh2ch2 x == cosh(x)**2 - 1 ueval(x, s,f) == eval(x, s::Symbol, f) ueval2(x,s,f) == eval(x, s::Symbol, 2, f) - cos2sec x == ueval(x, "cos", inv sec #1) - sin2csc x == ueval(x, "sin", inv csc #1) + cos2sec x == ueval(x, "cos", (z1:F):F +-> inv sec z1) + sin2csc x == ueval(x, "sin", (z1:F):F +-> inv csc z1) csc2sin x == ueval(x, "csc", c2s) sec2cos x == ueval(x, "sec", s2c) - tan2cot x == ueval(x, "tan", inv cot #1) - cot2tan x == ueval(x, "cot", inv tan #1) + tan2cot x == ueval(x, "tan", (z1:F):F +-> inv cot z1) + cot2tan x == ueval(x, "cot", (z1:F):F +-> inv tan z1) tan2trig x == ueval(x, "tan", t2t) cot2trig x == ueval(x, "cot", c2t) - cosh2sech x == ueval(x, "cosh", inv sech #1) - sinh2csch x == ueval(x, "sinh", inv csch #1) + cosh2sech x == ueval(x, "cosh", (z1:F):F +-> inv sech z1) + sinh2csch x == ueval(x, "sinh", (z1:F):F +-> inv csch z1) csch2sinh x == ueval(x, "csch", ch2sh) sech2cosh x == ueval(x, "sech", sh2ch) - tanh2coth x == ueval(x, "tanh", inv coth #1) - coth2tanh x == ueval(x, "coth", inv tanh #1) + tanh2coth x == ueval(x, "tanh", (z1:F):F +-> inv coth z1) + coth2tanh x == ueval(x, "coth", (z1:F):F +-> inv tanh z1) tanh2trigh x == ueval(x, "tanh", th2th) coth2trigh x == ueval(x, "coth", ch2th) - removeCosSq x == ueval2(x, "cos", 1 - (sin #1)**2) + removeCosSq x == ueval2(x, "cos", (z1:F):F +-> 1 - (sin z1)**2) removeSinSq x == ueval2(x, "sin", s2c2) - removeCoshSq x== ueval2(x, "cosh", 1 + (sinh #1)**2) + removeCoshSq x== ueval2(x, "cosh", (z1:F):F +-> 1 + (sinh z1)**2) removeSinhSq x== ueval2(x, "sinh", sh2ch2) expandLog x == smplog(numer x) / smplog(denom x) simplifyExp x == (smpexp numer x) / (smpexp denom x) expand x == (smpexpand numer x) / (smpexpand denom x) - smpexpand p == map(kerexpand, #1::F, p) - smplog p == map(logexpand, #1::F, p) - smp2htrigs p == map(htrigs(#1::F), #1::F, p) + smpexpand p == map(kerexpand, (r1:R):F +-> r1::F, p) + smplog p == map(logexpand, (r1:R):F +-> r1::F, p) + smp2htrigs p == map((k1:K):F +-> htrigs(k1::F), (r1:R):F +-> r1::F, p) htrigs f == (m := mainKernel f) case "failed" => f diff --git a/changelog b/changelog index 1c2b8eb..d650c36 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,5 @@ +20090623 tpd src/axiom-website/patches.html 20090623.03.tpd.patch +20090623 tpd books/bookvol10.4 TRMANIP +-> conversion 20090623 tpd src/axiom-website/patches.html 20090623.02.tpd.patch 20090623 tpd books/bookvol10.4 INTTR +-> conversion 20090623 tpd src/axiom-website/patches.html 20090623.01.tpd.patch diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 31318f1..27db783 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -1649,5 +1649,7 @@ bookvol10.4 DRAWCURV +-> conversion
bookvol10.4 DRAWCFUN +-> conversion
20090623.02.tpd.patch bookvol10.4 INTTR +-> conversion
+20090623.03.tpd.patch +bookvol10.4 TRMANIP +-> conversion