From: Eduardo O. <edu...@gm...> - 2022-08-29 02:07:27
|
Hi Jerry, Here's a beginner's approach to building a Maxima object corresponding to your figure at the bottom left of the page: texput(ldots, "\\ldots"); o : lambda([], b[0]+a[1]/(b[1]+a[2]/(b[2]+ldots))); simp : false; o(); tex(o())$ The last two lines yield this: (%i4) o(); a 1 (%o4) b + --------------- 0 a 2 b + ---------- 1 b + ldots 2 (%i5) tex(o())$ $$b_{0}+{{a_{1}}\over{b_{1}+{{a_{2}}\over{b_{2}+\ldots}}}}$$ (%i6) When I was asking for help to write this - http://angg.twu.net/eev-maxima.html#luatree Robert Dodier sent this idea, https://sourceforge.net/p/maxima/mailman/message/37690570/ that should be easy to adapt to your case, but I haven't tried that... Cheers, Eduardo Ochs http://angg.twu.net/eev-maxima.html On Fri, 26 Aug 2022 at 05:17, Jerry <wj...@gm...> wrote: > I have worked on continued fractions for over 40 years and have many > unpublished works. It would be of great help to put an option in funmake > so that it does not simplify the representation into a mess. The Macsyma > company that is now defunct did this so that continued fractions could be > easily displayed in the traditional form. > [image: image.png] > They produced funmake_no_simp which does not simplify so that one can take > numerators and denominators to produce a continued fraction rather than a > strictly Regular continued fraction. In this simple example for e^x, the > numerators are the same, but suppose I have a symbolic list such as > [b[0], b[1], b[2],...] that I want to put in the numerators, I cannot seem > to display it. > > eg > makecf(nums,dens,%,[last]):=block([],negsumdispflag:false, > last:if last=[] then "."["."["."]] else first(last), > for i:1 thru % do > last:funmake_no_simp("+",[apply(nums,[%-i+1])/last,apply(dens,[%-i])]), > last); > > then > makeit(nn):= makecf(lambda([n],x-x0),lambda([n],(a[n])),nn) > Where all the numerators are x-x0 for an expansion around x0 and a[n] are > the denominators with a[0] the separate additive term. > > Maxima produces for e^x a rather non-satisfying representation: > > > --------------------------------------- + 1 > > x > > ----------------------------------- + 1 > > x > > ------------------------------- - 2 > > x > > --------------------------- - 3 > > x > > ----------------------- + 2 > > x > > ------------------- + 5 > > x > > --------------- - 2 > > x > > ----------- - 7 > > x > > ------- + 2 > > x > > --- + 9 > > . > > . > > . > It is a great deal of difficulty to take arrays or lists and put them into > an equation editor than to just paste the result as previously. > > To pique your interest, I attach one of my whiz bang results > (unpublished). I have hundreds of cf programs for Macsyma that I could > share. The bottom left corner is what I need in Maxima. > > Thank you. > WJ Lentz > mar...@gm... > 831 601 2120 > > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > |