On 6/21/24 00:29, Ralf Hemmecke wrote:
I've pushed yet another update to

https://github.com/hemmecke/fricas/commits/new-ps-book-rhx

The line break problem in connection with parentheses is now gone.

There are still a few places where lines do not break.

One case is too long integers of floats. Maybe that can be solved, but certainly not before the release.

Another case is fractions with numerators of denominators that do not fit on one line. Fortunately, all these cases are just with \frac at the top-level. If I find time, maybe I can transform this case into typesetting the numberator and denominator separately. I guess that is not totally easy to get it right.

I also found cases in connection with GroupRepresentations and Permutations. I'm not sure what to do there. I have to look more closely.

I just realize that a rewriting of section 9.48.1 "Differential operators with series coefficients" differs completely from Chapter 9.35.1 in the Jenks&Sutor book. In particular, I think there are too many "Compiling ..." lines. This does not look nice in a book, in my opinion. Can that perhaps be rewritten with macros instead of functions?
Suggestion attached.

I think after Qian's patch for showing the print output in the book

  fix display issue of "output" in book section 6.19

, it also has an effect on Chapter 13.18.8.

Do we now want the full output of 13.13.8 "Example Queries" (see the long output of function signatures at the end of the chapter)?

Maybe we should change to query into something with less output. The output for the book is rather uninteresting. The idea of *how* one can get this information can also be conveyed by a less verbose output.
Any suggestions?

I think, if Qian does not find problems, I can squash the commits and push them upstream.

Waldek, do you have any preference of what should be kept separate?

Ralf

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/57322dc1-afc6-4263-9f20-78b3017e3898%40hemmecke.org.
From a9797ebb43c923b0653eb1eaeb5a0d4d5e34702c Mon Sep 17 00:00:00 2001
From: Ralf Hemmecke <r...@hemmecke.org>
Date: Sat, 22 Jun 2024 19:48:34 +0200
Subject: rewrite LODO section of the book

---
 src/doc/htex/LODO.htex | 54 ++++++++++--------------------------------
 1 file changed, 13 insertions(+), 41 deletions(-)

diff --git a/src/doc/htex/LODO.htex b/src/doc/htex/LODO.htex
index 3bc92c13..0da6865f 100644
--- a/src/doc/htex/LODO.htex
+++ b/src/doc/htex/LODO.htex
@@ -71,57 +71,29 @@ Now define the differential operator \spad{Dop}.
 \spadcommand{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.
 }{
-\spadcommand{n == 3 \bound{n3}}
+\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}.
 }{
-\spadcommand{phi == reduce(+,[subscript(s,[i])*exp(x)/x^i for i in 0..n]) \bound{phi}}
+\spadcommand{firstCoefficients(3)}
 }
 \xtc{
 }{
-\spadcommand{phi1 ==  Dop(phi) / exp x \bound{phi1}\free{Dop phi}}
+\spadcommand{firstCoefficients(4)}
 }
 \xtc{
 }{
-\spadcommand{phi2 == phi1 *x^(n+3) \bound{phi2}\free{phi1}}
-}
-\xtc{
-}{
-\spadcommand{phi3 == retract(phi2)@(POLY INT) \bound{phi3}\free{phi2}}
-}
-\xtc{
-}{
-\spadcommand{pans == phi3 ::UP(x,POLY INT) \free{phi3}\bound{pans}}
-}
-\xtc{
-}{
-\spadcommand{pans1 == [coefficient(pans, (n+3-i) :: NNI) for i in 2..n+1] \bound{pans1}\free{pans}}
-}
-\xtc{
-}{
-\spadcommand{leq == solve(pans1,[subscript(s,[i]) for i in 1..n]) \bound{leq}\free{pans1}}
-}
-\xtc{
-Evaluate this for several values of \spad{n}.
-}{
-\spadcommand{leq \free{n3 leq}}
-}
-\xtc{
-}{
-\spadcommand{n==4 \bound{n4}}
-}
-\xtc{
-}{
-\spadcommand{leq \free{n4 leq}}
-}
-\xtc{
-}{
-\spadcommand{n==7 \bound{n7}}
-}
-\xtc{
-}{
-\spadcommand{leq \free{n7 leq}}
+\spadcommand{firstCoefficients(7)}
 }
 
 % ----------------------------------------------------------------------
-- 
2.34.1

Reply via email to