Hi John Perry,

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 in the form of:

$  A_0 = F(y_0) $


$ A_1= y_1 F'(y_0) $

$ A_2= y_2 F'(y_0)+(y_(1))^2/2! F''(y_0) $

$ A_2= y_3 F'(y_0)+y_1y_2F''(y_0)+(y_(1))^3/3! F'''(y_0) $

These polynomials are called the Adomian polynomials.

Thanks


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.
>
> john perry
>
>
> On Thursday, February 7, 2013 8:29:03 AM UTC-6, Olajumoke Yetunde Fashomi
> wrote:
>>
>> Am trying to generate adomian polynomials using sage.This is what i have
>> done:
>>
>> var('y')
>> from numpy import *
>> from sympy import *
>> m=10
>> for n in range (m):
>>     if n==0:
>>       A(n)=F(y[n])
>>     else:
>>         a=(1/factorial(n))*(F(sum(l^n*y[n]))for n in range(m)).diff(n)
>>         A(n)=subs(l ==0,a)
>> And it is giving me 'symbol getitem error'.
>> Please help.
>
> --
> 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.


Reply via email to