Thanks Simon, How do I write symbolic expressions like that. Regards
On 8 February 2013 00:12, Simon King <simon.k...@uni-jena.de> wrote: > Hi! > > On 2013-02-07, Olajumoke Yetunde Fashomi <yetu...@aims.ac.za> wrote: > > Thanks for your concern, F is a function of y which are the non-linear > > terms in the second order initial value problem. The purpose of the y[n] > is > > to generate a recursive relation for the polynomials > > I think John was not asking how F is defined mathematically, but how F > was defined in your Sage session. Namely, the code snippet you provided > does not contain a definition of F and would thus simple yield a > NameError. > > > On 7 February 2013 21:16, john_perry_usm <john.pe...@usm.edu> wrote: > >> Out of curiosity, how is F defined? > >> > >> I don't know if this is the cause, but when I try something similar, I > > get a > >> problem with y[n]: 'sage.symbolic.expression.Expression' does not > support > >> indexing. Since it's a different error, you're probably encountering > >> something else. > > I suppose John tested something like the following. > sage: var('y') > y > sage: y[1] > > --------------------------------------------------------------------------- > TypeError Traceback (most recent call > last) > <ipython-input-3-c3672a1efa28> in <module>() > ----> 1 y[Integer(1)] > > TypeError: 'sage.symbolic.expression.Expression' object does not > support indexing > > Hence, as you see, one gets an error message that differs from what you > reported. > That said, it is rather likely that y[n] is the problematic spot in your > code, > because symbolic expressions simply don't support that syntax. > > Best regards, > Simon > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-support+unsubscr...@googlegroups.com. > To post to this group, send email to sage-support@googlegroups.com. > Visit this group at http://groups.google.com/group/sage-support?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- *Fashomi, Olajumoke Yetunde African Institute for Mathematical Sciences (AIMS), 6 Melrose Road, Muizenberg, 7945, Cape Town, South Africa email:feuniceyetu...@yahoo.com. +27 784846917 ***** * * -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.