Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer


 

restart

with(student)

NULL

G := S(t)*L(t)

S(t)*L(t)

(1)

m := 10

S[lambda] := sum(S[b]*lambda^b, b = 0 .. m); L[lambda] := sum(L[b]*lambda^b, b = 0 .. m); G[lambda] := subs(S(t) = S[lambda], G); G[lambda] := subs(L(t) = L[lambda], G[lambda]); G := G[lambda]; s := expand(G, lambda); ft := unapply(s, lambda); for i from 0 while i <= m do A1[i] := ((D@@i)(ft))(0)/factorial(i); print(A[i] = A1[i]) end do

A[0] = S[0]*L[0]

 

A[1] = L[0]*S[1]+L[1]*S[0]

 

A[2] = L[0]*S[2]+L[1]*S[1]+L[2]*S[0]

 

A[3] = L[0]*S[3]+L[1]*S[2]+L[2]*S[1]+L[3]*S[0]

 

A[4] = L[0]*S[4]+L[1]*S[3]+L[2]*S[2]+L[3]*S[1]+L[4]*S[0]

 

A[5] = L[0]*S[5]+L[1]*S[4]+L[2]*S[3]+L[3]*S[2]+L[4]*S[1]+L[5]*S[0]

 

A[6] = L[0]*S[6]+L[1]*S[5]+L[2]*S[4]+L[3]*S[3]+L[4]*S[2]+L[5]*S[1]+L[6]*S[0]

 

A[7] = S[5]*L[2]+S[2]*L[5]+S[1]*L[6]+S[0]*L[7]+S[4]*L[3]+S[3]*L[4]+S[6]*L[1]+S[7]*L[0]

 

A[8] = S[2]*L[6]+S[0]*L[8]+S[8]*L[0]+S[4]*L[4]+S[1]*L[7]+S[3]*L[5]+S[6]*L[2]+S[5]*L[3]+S[7]*L[1]

 

A[9] = S[6]*L[3]+S[9]*L[0]+S[4]*L[5]+S[2]*L[7]+S[3]*L[6]+S[8]*L[1]+S[0]*L[9]+S[1]*L[8]+S[7]*L[2]+S[5]*L[4]

 

A[10] = S[0]*L[10]+S[10]*L[0]+S[1]*L[9]+S[6]*L[4]+S[7]*L[3]+S[3]*L[7]+S[2]*L[8]+S[4]*L[6]+S[9]*L[1]+S[5]*L[5]+S[8]*L[2]

(2)

s[n+1] := (1-f)*alpha*(int(v__n, t = 0 .. t))-beta*c*(int(A__n, t = 0 .. t))-(`&theta;__1`+a+Pi)*(int(s__n, t = 0 .. t))

v[n+1] := `&theta;__1`*(int(s__n, t = 0 .. t))-((1-f)*alpha+f*`&theta;__2`+a+Pi)*(int(v__n, t = 0 .. t))

e[n+1] := `&beta;c`*(int(A__n, t = 0 .. t))-(delta+a+Pi)*(int(e__n, t = 0 .. t))

i[n+1] := delta*(int(e__n, t = 0 .. t))-(eta+a+Pi)*(int(i__n, t = 0 .. t))

r[n+1] := eta*(int(i__n, t = 0 .. t))+`f&theta;__2`*(int(v__n, t = 0 .. t))-(a+Pi)*(int(r__n, t = 0 .. t))

for n from 0 to 4 do  end do

NULL

(1-f)*alpha*v__n*t-beta*c*s__0*i__0*t-(`&theta;__1`+a+Pi)*s__n*t

(3)

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ``s__2__`, `s__3, ``s__4`,  `i__1`, `i__2, ``i__3`, `i__4`,   `r__1`, `r__2`, `r__3, ``r__4`:"

Error, unterminated for loop

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ` `s__2__`, `s__3, __3__, s__4`, `i__1__`, `i__2, ` `i__3`, `i__4`, `r__1`, `r__2`, `r__3, ` `r__4`:"

 

"and s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

i(t) = i__1+`i__2, `+i__3+i__4, r(t) = r__1+r__2+r__3_+r__4

"but A[n]:=(1)/(n!) [((&DifferentialD;)^(n))/(&DifferentialD; lambda^(n)) ((&sum;)`s__k`lambda^(k))((&sum;)`i__k`lambda^(k)) ]() ? ()|() ? (lambda=0)"

Error, missing numerator

Typesetting:-mambiguous(Typesetting:-mrow(Typesetting:-mi("but", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msub(Typesetting:-mi("A", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mi("n", fontstyle = "italic", mathcolor = "#c800c8", mathvariant = "italic", placeholder = "true"), subscriptshift = "0"), Typesetting:-mo("&Assign;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfrac(Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&excl;", accent = "false", fence = "false", largeop = "false", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "false", rspace = "0.1111111em", separator = "false", stretchy = "false", symmetric = "false")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-msup(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`s__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`i__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false")), open = "&lsqb;", close = "&rsqb;", mathvariant = "normal"), Typesetting:-mfrac(Typesetting:-mambiguous(Typesetting:-merror("?"), Typesetting:-merror("missing numerator")), Typesetting:-mphantom(Typesetting:-mrow(Typesetting:-mi("x", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "unset", rspace = "0.2777778em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("a", fontstyle = "italic", mathvariant = "italic")), constraints = "height-only"), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center"), Typesetting:-mo("&verbar;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "unset", rspace = "0.1111111em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mfrac(Typesetting:-mphantom(Typesetting:-mi("f(x)", fontstyle = "italic", mathvariant = "italic"), constraints = "height-only"), Typesetting:-mrow(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center")))

 

``

"Pls how can I write this Maple code to help me generate `s__1` ,`s__2__ _` ` ___` `s__3 `,`s__4` ; `i__1 `, `i__2__` ,`i__3 `, `i__4`  and `r__1 `, `r__2` , `r__3 `,`r__4`  and finally generate                       "

"s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

"i(t)=`i__1`+ `i__2, `+`i__3`+ `i__4`,   r(t)= `r__1`+ `r__2`+ `r__3_`+`r__4`:  "?""

``

NULL

NULL


 

Download Adomian.Elisha2.mw
 

restart

with(student)

NULL

G := S(t)*L(t)

S(t)*L(t)

(1)

m := 10

S[lambda] := sum(S[b]*lambda^b, b = 0 .. m); L[lambda] := sum(L[b]*lambda^b, b = 0 .. m); G[lambda] := subs(S(t) = S[lambda], G); G[lambda] := subs(L(t) = L[lambda], G[lambda]); G := G[lambda]; s := expand(G, lambda); ft := unapply(s, lambda); for i from 0 while i <= m do A1[i] := ((D@@i)(ft))(0)/factorial(i); print(A[i] = A1[i]) end do

A[0] = S[0]*L[0]

 

A[1] = L[0]*S[1]+L[1]*S[0]

 

A[2] = L[0]*S[2]+L[1]*S[1]+L[2]*S[0]

 

A[3] = L[0]*S[3]+L[1]*S[2]+L[2]*S[1]+L[3]*S[0]

 

A[4] = L[0]*S[4]+L[1]*S[3]+L[2]*S[2]+L[3]*S[1]+L[4]*S[0]

 

A[5] = L[0]*S[5]+L[1]*S[4]+L[2]*S[3]+L[3]*S[2]+L[4]*S[1]+L[5]*S[0]

 

A[6] = L[0]*S[6]+L[1]*S[5]+L[2]*S[4]+L[3]*S[3]+L[4]*S[2]+L[5]*S[1]+L[6]*S[0]

 

A[7] = S[5]*L[2]+S[2]*L[5]+S[1]*L[6]+S[0]*L[7]+S[4]*L[3]+S[3]*L[4]+S[6]*L[1]+S[7]*L[0]

 

A[8] = S[2]*L[6]+S[0]*L[8]+S[8]*L[0]+S[4]*L[4]+S[1]*L[7]+S[3]*L[5]+S[6]*L[2]+S[5]*L[3]+S[7]*L[1]

 

A[9] = S[6]*L[3]+S[9]*L[0]+S[4]*L[5]+S[2]*L[7]+S[3]*L[6]+S[8]*L[1]+S[0]*L[9]+S[1]*L[8]+S[7]*L[2]+S[5]*L[4]

 

A[10] = S[0]*L[10]+S[10]*L[0]+S[1]*L[9]+S[6]*L[4]+S[7]*L[3]+S[3]*L[7]+S[2]*L[8]+S[4]*L[6]+S[9]*L[1]+S[5]*L[5]+S[8]*L[2]

(2)

s[n+1] := (1-f)*alpha*(int(v__n, t = 0 .. t))-beta*c*(int(A__n, t = 0 .. t))-(`&theta;__1`+a+Pi)*(int(s__n, t = 0 .. t))

v[n+1] := `&theta;__1`*(int(s__n, t = 0 .. t))-((1-f)*alpha+f*`&theta;__2`+a+Pi)*(int(v__n, t = 0 .. t))

e[n+1] := `&beta;c`*(int(A__n, t = 0 .. t))-(delta+a+Pi)*(int(e__n, t = 0 .. t))

i[n+1] := delta*(int(e__n, t = 0 .. t))-(eta+a+Pi)*(int(i__n, t = 0 .. t))

r[n+1] := eta*(int(i__n, t = 0 .. t))+`f&theta;__2`*(int(v__n, t = 0 .. t))-(a+Pi)*(int(r__n, t = 0 .. t))

for n from 0 to 4 do  end do

NULL

(1-f)*alpha*v__n*t-beta*c*s__0*i__0*t-(`&theta;__1`+a+Pi)*s__n*t

(3)

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ``s__2__`, `s__3, ``s__4`,  `i__1`, `i__2, ``i__3`, `i__4`,   `r__1`, `r__2`, `r__3, ``r__4`:"

Error, unterminated for loop

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ` `s__2__`, `s__3, __3__, s__4`, `i__1__`, `i__2, ` `i__3`, `i__4`, `r__1`, `r__2`, `r__3, ` `r__4`:"

 

"and s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

i(t) = i__1+`i__2, `+i__3+i__4, r(t) = r__1+r__2+r__3_+r__4

"but A[n]:=(1)/(n!) [((&DifferentialD;)^(n))/(&DifferentialD; lambda^(n)) ((&sum;)`s__k`lambda^(k))((&sum;)`i__k`lambda^(k)) ]() ? ()|() ? (lambda=0)"

Error, missing numerator

Typesetting:-mambiguous(Typesetting:-mrow(Typesetting:-mi("but", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msub(Typesetting:-mi("A", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mi("n", fontstyle = "italic", mathcolor = "#c800c8", mathvariant = "italic", placeholder = "true"), subscriptshift = "0"), Typesetting:-mo("&Assign;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfrac(Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&excl;", accent = "false", fence = "false", largeop = "false", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "false", rspace = "0.1111111em", separator = "false", stretchy = "false", symmetric = "false")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-msup(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`s__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`i__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false")), open = "&lsqb;", close = "&rsqb;", mathvariant = "normal"), Typesetting:-mfrac(Typesetting:-mambiguous(Typesetting:-merror("?"), Typesetting:-merror("missing numerator")), Typesetting:-mphantom(Typesetting:-mrow(Typesetting:-mi("x", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "unset", rspace = "0.2777778em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("a", fontstyle = "italic", mathvariant = "italic")), constraints = "height-only"), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center"), Typesetting:-mo("&verbar;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "unset", rspace = "0.1111111em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mfrac(Typesetting:-mphantom(Typesetting:-mi("f(x)", fontstyle = "italic", mathvariant = "italic"), constraints = "height-only"), Typesetting:-mrow(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center")))

 

``

"Pls how can I write this Maple code to help me generate `s__1` ,`s__2__ _` ` ___` `s__3 `,`s__4` ; `i__1 `, `i__2__` ,`i__3 `, `i__4`  and `r__1 `, `r__2` , `r__3 `,`r__4`  and finally generate                       "

"s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

"i(t)=`i__1`+ `i__2, `+`i__3`+ `i__4`,   r(t)= `r__1`+ `r__2`+ `r__3_`+`r__4`:  "?""

``

NULL

NULL


 

Download Adomian.Elisha2.mw
 

restart

with(student)

NULL

G := S(t)*L(t)

S(t)*L(t)

(1)

m := 10

S[lambda] := sum(S[b]*lambda^b, b = 0 .. m); L[lambda] := sum(L[b]*lambda^b, b = 0 .. m); G[lambda] := subs(S(t) = S[lambda], G); G[lambda] := subs(L(t) = L[lambda], G[lambda]); G := G[lambda]; s := expand(G, lambda); ft := unapply(s, lambda); for i from 0 while i <= m do A1[i] := ((D@@i)(ft))(0)/factorial(i); print(A[i] = A1[i]) end do

A[0] = S[0]*L[0]

 

A[1] = L[0]*S[1]+L[1]*S[0]

 

A[2] = L[0]*S[2]+L[1]*S[1]+L[2]*S[0]

 

A[3] = L[0]*S[3]+L[1]*S[2]+L[2]*S[1]+L[3]*S[0]

 

A[4] = L[0]*S[4]+L[1]*S[3]+L[2]*S[2]+L[3]*S[1]+L[4]*S[0]

 

A[5] = L[0]*S[5]+L[1]*S[4]+L[2]*S[3]+L[3]*S[2]+L[4]*S[1]+L[5]*S[0]

 

A[6] = L[0]*S[6]+L[1]*S[5]+L[2]*S[4]+L[3]*S[3]+L[4]*S[2]+L[5]*S[1]+L[6]*S[0]

 

A[7] = S[5]*L[2]+S[2]*L[5]+S[1]*L[6]+S[0]*L[7]+S[4]*L[3]+S[3]*L[4]+S[6]*L[1]+S[7]*L[0]

 

A[8] = S[2]*L[6]+S[0]*L[8]+S[8]*L[0]+S[4]*L[4]+S[1]*L[7]+S[3]*L[5]+S[6]*L[2]+S[5]*L[3]+S[7]*L[1]

 

A[9] = S[6]*L[3]+S[9]*L[0]+S[4]*L[5]+S[2]*L[7]+S[3]*L[6]+S[8]*L[1]+S[0]*L[9]+S[1]*L[8]+S[7]*L[2]+S[5]*L[4]

 

A[10] = S[0]*L[10]+S[10]*L[0]+S[1]*L[9]+S[6]*L[4]+S[7]*L[3]+S[3]*L[7]+S[2]*L[8]+S[4]*L[6]+S[9]*L[1]+S[5]*L[5]+S[8]*L[2]

(2)

s[n+1] := (1-f)*alpha*(int(v__n, t = 0 .. t))-beta*c*(int(A__n, t = 0 .. t))-(`&theta;__1`+a+Pi)*(int(s__n, t = 0 .. t))

v[n+1] := `&theta;__1`*(int(s__n, t = 0 .. t))-((1-f)*alpha+f*`&theta;__2`+a+Pi)*(int(v__n, t = 0 .. t))

e[n+1] := `&beta;c`*(int(A__n, t = 0 .. t))-(delta+a+Pi)*(int(e__n, t = 0 .. t))

i[n+1] := delta*(int(e__n, t = 0 .. t))-(eta+a+Pi)*(int(i__n, t = 0 .. t))

r[n+1] := eta*(int(i__n, t = 0 .. t))+`f&theta;__2`*(int(v__n, t = 0 .. t))-(a+Pi)*(int(r__n, t = 0 .. t))

for n from 0 to 4 do  end do

NULL

(1-f)*alpha*v__n*t-beta*c*s__0*i__0*t-(`&theta;__1`+a+Pi)*s__n*t

(3)

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ``s__2__`, `s__3, ``s__4`,  `i__1`, `i__2, ``i__3`, `i__4`,   `r__1`, `r__2`, `r__3, ``r__4`:"

Error, unterminated for loop

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ` `s__2__`, `s__3, __3__, s__4`, `i__1__`, `i__2, ` `i__3`, `i__4`, `r__1`, `r__2`, `r__3, ` `r__4`:"

 

"and s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

i(t) = i__1+`i__2, `+i__3+i__4, r(t) = r__1+r__2+r__3_+r__4

"but A[n]:=(1)/(n!) [((&DifferentialD;)^(n))/(&DifferentialD; lambda^(n)) ((&sum;)`s__k`lambda^(k))((&sum;)`i__k`lambda^(k)) ]() ? ()|() ? (lambda=0)"

Error, missing numerator

Typesetting:-mambiguous(Typesetting:-mrow(Typesetting:-mi("but", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msub(Typesetting:-mi("A", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mi("n", fontstyle = "italic", mathcolor = "#c800c8", mathvariant = "italic", placeholder = "true"), subscriptshift = "0"), Typesetting:-mo("&Assign;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfrac(Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&excl;", accent = "false", fence = "false", largeop = "false", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "false", rspace = "0.1111111em", separator = "false", stretchy = "false", symmetric = "false")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-msup(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`s__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`i__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false")), open = "&lsqb;", close = "&rsqb;", mathvariant = "normal"), Typesetting:-mfrac(Typesetting:-mambiguous(Typesetting:-merror("?"), Typesetting:-merror("missing numerator")), Typesetting:-mphantom(Typesetting:-mrow(Typesetting:-mi("x", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "unset", rspace = "0.2777778em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("a", fontstyle = "italic", mathvariant = "italic")), constraints = "height-only"), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center"), Typesetting:-mo("&verbar;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "unset", rspace = "0.1111111em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mfrac(Typesetting:-mphantom(Typesetting:-mi("f(x)", fontstyle = "italic", mathvariant = "italic"), constraints = "height-only"), Typesetting:-mrow(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center")))

 

``

"Pls how can I write this Maple code to help me generate `s__1` ,`s__2__ _` ` ___` `s__3 `,`s__4` ; `i__1 `, `i__2__` ,`i__3 `, `i__4`  and `r__1 `, `r__2` , `r__3 `,`r__4`  and finally generate                       "

"s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

"i(t)=`i__1`+ `i__2, `+`i__3`+ `i__4`,   r(t)= `r__1`+ `r__2`+ `r__3_`+`r__4`:  "?""

``

NULL

NULL


 

Download Adomian.Elisha2.mw
 

restart

with(student)

NULL

G := S(t)*L(t)

S(t)*L(t)

(1)

m := 10

S[lambda] := sum(S[b]*lambda^b, b = 0 .. m); L[lambda] := sum(L[b]*lambda^b, b = 0 .. m); G[lambda] := subs(S(t) = S[lambda], G); G[lambda] := subs(L(t) = L[lambda], G[lambda]); G := G[lambda]; s := expand(G, lambda); ft := unapply(s, lambda); for i from 0 while i <= m do A1[i] := ((D@@i)(ft))(0)/factorial(i); print(A[i] = A1[i]) end do

A[0] = S[0]*L[0]

 

A[1] = L[0]*S[1]+L[1]*S[0]

 

A[2] = L[0]*S[2]+L[1]*S[1]+L[2]*S[0]

 

A[3] = L[0]*S[3]+L[1]*S[2]+L[2]*S[1]+L[3]*S[0]

 

A[4] = L[0]*S[4]+L[1]*S[3]+L[2]*S[2]+L[3]*S[1]+L[4]*S[0]

 

A[5] = L[0]*S[5]+L[1]*S[4]+L[2]*S[3]+L[3]*S[2]+L[4]*S[1]+L[5]*S[0]

 

A[6] = L[0]*S[6]+L[1]*S[5]+L[2]*S[4]+L[3]*S[3]+L[4]*S[2]+L[5]*S[1]+L[6]*S[0]

 

A[7] = S[5]*L[2]+S[2]*L[5]+S[1]*L[6]+S[0]*L[7]+S[4]*L[3]+S[3]*L[4]+S[6]*L[1]+S[7]*L[0]

 

A[8] = S[2]*L[6]+S[0]*L[8]+S[8]*L[0]+S[4]*L[4]+S[1]*L[7]+S[3]*L[5]+S[6]*L[2]+S[5]*L[3]+S[7]*L[1]

 

A[9] = S[6]*L[3]+S[9]*L[0]+S[4]*L[5]+S[2]*L[7]+S[3]*L[6]+S[8]*L[1]+S[0]*L[9]+S[1]*L[8]+S[7]*L[2]+S[5]*L[4]

 

A[10] = S[0]*L[10]+S[10]*L[0]+S[1]*L[9]+S[6]*L[4]+S[7]*L[3]+S[3]*L[7]+S[2]*L[8]+S[4]*L[6]+S[9]*L[1]+S[5]*L[5]+S[8]*L[2]

(2)

s[n+1] := (1-f)*alpha*(int(v__n, t = 0 .. t))-beta*c*(int(A__n, t = 0 .. t))-(`&theta;__1`+a+Pi)*(int(s__n, t = 0 .. t))

v[n+1] := `&theta;__1`*(int(s__n, t = 0 .. t))-((1-f)*alpha+f*`&theta;__2`+a+Pi)*(int(v__n, t = 0 .. t))

e[n+1] := `&beta;c`*(int(A__n, t = 0 .. t))-(delta+a+Pi)*(int(e__n, t = 0 .. t))

i[n+1] := delta*(int(e__n, t = 0 .. t))-(eta+a+Pi)*(int(i__n, t = 0 .. t))

r[n+1] := eta*(int(i__n, t = 0 .. t))+`f&theta;__2`*(int(v__n, t = 0 .. t))-(a+Pi)*(int(r__n, t = 0 .. t))

for n from 0 to 4 do  end do

NULL

(1-f)*alpha*v__n*t-beta*c*s__0*i__0*t-(`&theta;__1`+a+Pi)*s__n*t

(3)

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ``s__2__`, `s__3, ``s__4`,  `i__1`, `i__2, ``i__3`, `i__4`,   `r__1`, `r__2`, `r__3, ``r__4`:"

Error, unterminated for loop

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ` `s__2__`, `s__3, __3__, s__4`, `i__1__`, `i__2, ` `i__3`, `i__4`, `r__1`, `r__2`, `r__3, ` `r__4`:"

 

"and s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

i(t) = i__1+`i__2, `+i__3+i__4, r(t) = r__1+r__2+r__3_+r__4

"but A[n]:=(1)/(n!) [((&DifferentialD;)^(n))/(&DifferentialD; lambda^(n)) ((&sum;)`s__k`lambda^(k))((&sum;)`i__k`lambda^(k)) ]() ? ()|() ? (lambda=0)"

Error, missing numerator

Typesetting:-mambiguous(Typesetting:-mrow(Typesetting:-mi("but", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msub(Typesetting:-mi("A", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mi("n", fontstyle = "italic", mathcolor = "#c800c8", mathvariant = "italic", placeholder = "true"), subscriptshift = "0"), Typesetting:-mo("&Assign;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfrac(Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&excl;", accent = "false", fence = "false", largeop = "false", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "false", rspace = "0.1111111em", separator = "false", stretchy = "false", symmetric = "false")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-msup(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`s__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`i__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false")), open = "&lsqb;", close = "&rsqb;", mathvariant = "normal"), Typesetting:-mfrac(Typesetting:-mambiguous(Typesetting:-merror("?"), Typesetting:-merror("missing numerator")), Typesetting:-mphantom(Typesetting:-mrow(Typesetting:-mi("x", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "unset", rspace = "0.2777778em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("a", fontstyle = "italic", mathvariant = "italic")), constraints = "height-only"), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center"), Typesetting:-mo("&verbar;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "unset", rspace = "0.1111111em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mfrac(Typesetting:-mphantom(Typesetting:-mi("f(x)", fontstyle = "italic", mathvariant = "italic"), constraints = "height-only"), Typesetting:-mrow(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center")))

 

``

"Pls how can I write this Maple code to help me generate `s__1` ,`s__2__ _` ` ___` `s__3 `,`s__4` ; `i__1 `, `i__2__` ,`i__3 `, `i__4`  and `r__1 `, `r__2` , `r__3 `,`r__4`  and finally generate                       "

"s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

"i(t)=`i__1`+ `i__2, `+`i__3`+ `i__4`,   r(t)= `r__1`+ `r__2`+ `r__3_`+`r__4`:  "?""

``

NULL

NULL


 

Download Adomian.Elisha2.mw
 

restart

with(student)

NULL

G := S(t)*L(t)

S(t)*L(t)

(1)

m := 10

S[lambda] := sum(S[b]*lambda^b, b = 0 .. m); L[lambda] := sum(L[b]*lambda^b, b = 0 .. m); G[lambda] := subs(S(t) = S[lambda], G); G[lambda] := subs(L(t) = L[lambda], G[lambda]); G := G[lambda]; s := expand(G, lambda); ft := unapply(s, lambda); for i from 0 while i <= m do A1[i] := ((D@@i)(ft))(0)/factorial(i); print(A[i] = A1[i]) end do

A[0] = S[0]*L[0]

 

A[1] = L[0]*S[1]+L[1]*S[0]

 

A[2] = L[0]*S[2]+L[1]*S[1]+L[2]*S[0]

 

A[3] = L[0]*S[3]+L[1]*S[2]+L[2]*S[1]+L[3]*S[0]

 

A[4] = L[0]*S[4]+L[1]*S[3]+L[2]*S[2]+L[3]*S[1]+L[4]*S[0]

 

A[5] = L[0]*S[5]+L[1]*S[4]+L[2]*S[3]+L[3]*S[2]+L[4]*S[1]+L[5]*S[0]

 

A[6] = L[0]*S[6]+L[1]*S[5]+L[2]*S[4]+L[3]*S[3]+L[4]*S[2]+L[5]*S[1]+L[6]*S[0]

 

A[7] = S[5]*L[2]+S[2]*L[5]+S[1]*L[6]+S[0]*L[7]+S[4]*L[3]+S[3]*L[4]+S[6]*L[1]+S[7]*L[0]

 

A[8] = S[2]*L[6]+S[0]*L[8]+S[8]*L[0]+S[4]*L[4]+S[1]*L[7]+S[3]*L[5]+S[6]*L[2]+S[5]*L[3]+S[7]*L[1]

 

A[9] = S[6]*L[3]+S[9]*L[0]+S[4]*L[5]+S[2]*L[7]+S[3]*L[6]+S[8]*L[1]+S[0]*L[9]+S[1]*L[8]+S[7]*L[2]+S[5]*L[4]

 

A[10] = S[0]*L[10]+S[10]*L[0]+S[1]*L[9]+S[6]*L[4]+S[7]*L[3]+S[3]*L[7]+S[2]*L[8]+S[4]*L[6]+S[9]*L[1]+S[5]*L[5]+S[8]*L[2]

(2)

s[n+1] := (1-f)*alpha*(int(v__n, t = 0 .. t))-beta*c*(int(A__n, t = 0 .. t))-(`&theta;__1`+a+Pi)*(int(s__n, t = 0 .. t))

v[n+1] := `&theta;__1`*(int(s__n, t = 0 .. t))-((1-f)*alpha+f*`&theta;__2`+a+Pi)*(int(v__n, t = 0 .. t))

e[n+1] := `&beta;c`*(int(A__n, t = 0 .. t))-(delta+a+Pi)*(int(e__n, t = 0 .. t))

i[n+1] := delta*(int(e__n, t = 0 .. t))-(eta+a+Pi)*(int(i__n, t = 0 .. t))

r[n+1] := eta*(int(i__n, t = 0 .. t))+`f&theta;__2`*(int(v__n, t = 0 .. t))-(a+Pi)*(int(r__n, t = 0 .. t))

for n from 0 to 4 do  end do

NULL

(1-f)*alpha*v__n*t-beta*c*s__0*i__0*t-(`&theta;__1`+a+Pi)*s__n*t

(3)

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ``s__2__`, `s__3, ``s__4`,  `i__1`, `i__2, ``i__3`, `i__4`,   `r__1`, `r__2`, `r__3, ``r__4`:"

Error, unterminated for loop

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ` `s__2__`, `s__3, __3__, s__4`, `i__1__`, `i__2, ` `i__3`, `i__4`, `r__1`, `r__2`, `r__3, ` `r__4`:"

 

"and s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

i(t) = i__1+`i__2, `+i__3+i__4, r(t) = r__1+r__2+r__3_+r__4

"but A[n]:=(1)/(n!) [((&DifferentialD;)^(n))/(&DifferentialD; lambda^(n)) ((&sum;)`s__k`lambda^(k))((&sum;)`i__k`lambda^(k)) ]() ? ()|() ? (lambda=0)"

Error, missing numerator

Typesetting:-mambiguous(Typesetting:-mrow(Typesetting:-mi("but", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msub(Typesetting:-mi("A", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mi("n", fontstyle = "italic", mathcolor = "#c800c8", mathvariant = "italic", placeholder = "true"), subscriptshift = "0"), Typesetting:-mo("&Assign;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfrac(Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&excl;", accent = "false", fence = "false", largeop = "false", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "false", rspace = "0.1111111em", separator = "false", stretchy = "false", symmetric = "false")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-msup(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`s__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`i__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false")), open = "&lsqb;", close = "&rsqb;", mathvariant = "normal"), Typesetting:-mfrac(Typesetting:-mambiguous(Typesetting:-merror("?"), Typesetting:-merror("missing numerator")), Typesetting:-mphantom(Typesetting:-mrow(Typesetting:-mi("x", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "unset", rspace = "0.2777778em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("a", fontstyle = "italic", mathvariant = "italic")), constraints = "height-only"), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center"), Typesetting:-mo("&verbar;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "unset", rspace = "0.1111111em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mfrac(Typesetting:-mphantom(Typesetting:-mi("f(x)", fontstyle = "italic", mathvariant = "italic"), constraints = "height-only"), Typesetting:-mrow(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center")))

 

``

"Pls how can I write this Maple code to help me generate `s__1` ,`s__2__ _` ` ___` `s__3 `,`s__4` ; `i__1 `, `i__2__` ,`i__3 `, `i__4`  and `r__1 `, `r__2` , `r__3 `,`r__4`  and finally generate                       "

"s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

"i(t)=`i__1`+ `i__2, `+`i__3`+ `i__4`,   r(t)= `r__1`+ `r__2`+ `r__3_`+`r__4`:  "?""

``

NULL

NULL


 

Download Adomian.Elisha2.mw
 

restart

with(student)

NULL

G := S(t)*L(t)

S(t)*L(t)

(1)

m := 10

S[lambda] := sum(S[b]*lambda^b, b = 0 .. m); L[lambda] := sum(L[b]*lambda^b, b = 0 .. m); G[lambda] := subs(S(t) = S[lambda], G); G[lambda] := subs(L(t) = L[lambda], G[lambda]); G := G[lambda]; s := expand(G, lambda); ft := unapply(s, lambda); for i from 0 while i <= m do A1[i] := ((D@@i)(ft))(0)/factorial(i); print(A[i] = A1[i]) end do

A[0] = S[0]*L[0]

 

A[1] = L[0]*S[1]+L[1]*S[0]

 

A[2] = L[0]*S[2]+L[1]*S[1]+L[2]*S[0]

 

A[3] = L[0]*S[3]+L[1]*S[2]+L[2]*S[1]+L[3]*S[0]

 

A[4] = L[0]*S[4]+L[1]*S[3]+L[2]*S[2]+L[3]*S[1]+L[4]*S[0]

 

A[5] = L[0]*S[5]+L[1]*S[4]+L[2]*S[3]+L[3]*S[2]+L[4]*S[1]+L[5]*S[0]

 

A[6] = L[0]*S[6]+L[1]*S[5]+L[2]*S[4]+L[3]*S[3]+L[4]*S[2]+L[5]*S[1]+L[6]*S[0]

 

A[7] = S[5]*L[2]+S[2]*L[5]+S[1]*L[6]+S[0]*L[7]+S[4]*L[3]+S[3]*L[4]+S[6]*L[1]+S[7]*L[0]

 

A[8] = S[2]*L[6]+S[0]*L[8]+S[8]*L[0]+S[4]*L[4]+S[1]*L[7]+S[3]*L[5]+S[6]*L[2]+S[5]*L[3]+S[7]*L[1]

 

A[9] = S[6]*L[3]+S[9]*L[0]+S[4]*L[5]+S[2]*L[7]+S[3]*L[6]+S[8]*L[1]+S[0]*L[9]+S[1]*L[8]+S[7]*L[2]+S[5]*L[4]

 

A[10] = S[0]*L[10]+S[10]*L[0]+S[1]*L[9]+S[6]*L[4]+S[7]*L[3]+S[3]*L[7]+S[2]*L[8]+S[4]*L[6]+S[9]*L[1]+S[5]*L[5]+S[8]*L[2]

(2)

s[n+1] := (1-f)*alpha*(int(v__n, t = 0 .. t))-beta*c*(int(A__n, t = 0 .. t))-(`&theta;__1`+a+Pi)*(int(s__n, t = 0 .. t))

v[n+1] := `&theta;__1`*(int(s__n, t = 0 .. t))-((1-f)*alpha+f*`&theta;__2`+a+Pi)*(int(v__n, t = 0 .. t))

e[n+1] := `&beta;c`*(int(A__n, t = 0 .. t))-(delta+a+Pi)*(int(e__n, t = 0 .. t))

i[n+1] := delta*(int(e__n, t = 0 .. t))-(eta+a+Pi)*(int(i__n, t = 0 .. t))

r[n+1] := eta*(int(i__n, t = 0 .. t))+`f&theta;__2`*(int(v__n, t = 0 .. t))-(a+Pi)*(int(r__n, t = 0 .. t))

for n from 0 to 4 do  end do

NULL

(1-f)*alpha*v__n*t-beta*c*s__0*i__0*t-(`&theta;__1`+a+Pi)*s__n*t

(3)

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ``s__2__`, `s__3, ``s__4`,  `i__1`, `i__2, ``i__3`, `i__4`,   `r__1`, `r__2`, `r__3, ``r__4`:"

Error, unterminated for loop

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ` `s__2__`, `s__3, __3__, s__4`, `i__1__`, `i__2, ` `i__3`, `i__4`, `r__1`, `r__2`, `r__3, ` `r__4`:"

 

"and s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

i(t) = i__1+`i__2, `+i__3+i__4, r(t) = r__1+r__2+r__3_+r__4

"but A[n]:=(1)/(n!) [((&DifferentialD;)^(n))/(&DifferentialD; lambda^(n)) ((&sum;)`s__k`lambda^(k))((&sum;)`i__k`lambda^(k)) ]() ? ()|() ? (lambda=0)"

Error, missing numerator

Typesetting:-mambiguous(Typesetting:-mrow(Typesetting:-mi("but", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msub(Typesetting:-mi("A", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mi("n", fontstyle = "italic", mathcolor = "#c800c8", mathvariant = "italic", placeholder = "true"), subscriptshift = "0"), Typesetting:-mo("&Assign;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfrac(Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&excl;", accent = "false", fence = "false", largeop = "false", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "false", rspace = "0.1111111em", separator = "false", stretchy = "false", symmetric = "false")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-msup(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`s__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`i__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false")), open = "&lsqb;", close = "&rsqb;", mathvariant = "normal"), Typesetting:-mfrac(Typesetting:-mambiguous(Typesetting:-merror("?"), Typesetting:-merror("missing numerator")), Typesetting:-mphantom(Typesetting:-mrow(Typesetting:-mi("x", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "unset", rspace = "0.2777778em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("a", fontstyle = "italic", mathvariant = "italic")), constraints = "height-only"), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center"), Typesetting:-mo("&verbar;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "unset", rspace = "0.1111111em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mfrac(Typesetting:-mphantom(Typesetting:-mi("f(x)", fontstyle = "italic", mathvariant = "italic"), constraints = "height-only"), Typesetting:-mrow(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center")))

 

``

"Pls how can I write this Maple code to help me generate `s__1` ,`s__2__ _` ` ___` `s__3 `,`s__4` ; `i__1 `, `i__2__` ,`i__3 `, `i__4`  and `r__1 `, `r__2` , `r__3 `,`r__4`  and finally generate                       "

"s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

"i(t)=`i__1`+ `i__2, `+`i__3`+ `i__4`,   r(t)= `r__1`+ `r__2`+ `r__3_`+`r__4`:  "?""

``

NULL

NULL


 

Download Adomian.Elisha2.mw
 

restart

with(student)

NULL

G := S(t)*L(t)

S(t)*L(t)

(1)

m := 10

S[lambda] := sum(S[b]*lambda^b, b = 0 .. m); L[lambda] := sum(L[b]*lambda^b, b = 0 .. m); G[lambda] := subs(S(t) = S[lambda], G); G[lambda] := subs(L(t) = L[lambda], G[lambda]); G := G[lambda]; s := expand(G, lambda); ft := unapply(s, lambda); for i from 0 while i <= m do A1[i] := ((D@@i)(ft))(0)/factorial(i); print(A[i] = A1[i]) end do

A[0] = S[0]*L[0]

 

A[1] = L[0]*S[1]+L[1]*S[0]

 

A[2] = L[0]*S[2]+L[1]*S[1]+L[2]*S[0]

 

A[3] = L[0]*S[3]+L[1]*S[2]+L[2]*S[1]+L[3]*S[0]

 

A[4] = L[0]*S[4]+L[1]*S[3]+L[2]*S[2]+L[3]*S[1]+L[4]*S[0]

 

A[5] = L[0]*S[5]+L[1]*S[4]+L[2]*S[3]+L[3]*S[2]+L[4]*S[1]+L[5]*S[0]

 

A[6] = L[0]*S[6]+L[1]*S[5]+L[2]*S[4]+L[3]*S[3]+L[4]*S[2]+L[5]*S[1]+L[6]*S[0]

 

A[7] = S[5]*L[2]+S[2]*L[5]+S[1]*L[6]+S[0]*L[7]+S[4]*L[3]+S[3]*L[4]+S[6]*L[1]+S[7]*L[0]

 

A[8] = S[2]*L[6]+S[0]*L[8]+S[8]*L[0]+S[4]*L[4]+S[1]*L[7]+S[3]*L[5]+S[6]*L[2]+S[5]*L[3]+S[7]*L[1]

 

A[9] = S[6]*L[3]+S[9]*L[0]+S[4]*L[5]+S[2]*L[7]+S[3]*L[6]+S[8]*L[1]+S[0]*L[9]+S[1]*L[8]+S[7]*L[2]+S[5]*L[4]

 

A[10] = S[0]*L[10]+S[10]*L[0]+S[1]*L[9]+S[6]*L[4]+S[7]*L[3]+S[3]*L[7]+S[2]*L[8]+S[4]*L[6]+S[9]*L[1]+S[5]*L[5]+S[8]*L[2]

(2)

s[n+1] := (1-f)*alpha*(int(v__n, t = 0 .. t))-beta*c*(int(A__n, t = 0 .. t))-(`&theta;__1`+a+Pi)*(int(s__n, t = 0 .. t))

v[n+1] := `&theta;__1`*(int(s__n, t = 0 .. t))-((1-f)*alpha+f*`&theta;__2`+a+Pi)*(int(v__n, t = 0 .. t))

e[n+1] := `&beta;c`*(int(A__n, t = 0 .. t))-(delta+a+Pi)*(int(e__n, t = 0 .. t))

i[n+1] := delta*(int(e__n, t = 0 .. t))-(eta+a+Pi)*(int(i__n, t = 0 .. t))

r[n+1] := eta*(int(i__n, t = 0 .. t))+`f&theta;__2`*(int(v__n, t = 0 .. t))-(a+Pi)*(int(r__n, t = 0 .. t))

for n from 0 to 4 do  end do

NULL

(1-f)*alpha*v__n*t-beta*c*s__0*i__0*t-(`&theta;__1`+a+Pi)*s__n*t

(3)

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ``s__2__`, `s__3, ``s__4`,  `i__1`, `i__2, ``i__3`, `i__4`,   `r__1`, `r__2`, `r__3, ``r__4`:"

Error, unterminated for loop

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ` `s__2__`, `s__3, __3__, s__4`, `i__1__`, `i__2, ` `i__3`, `i__4`, `r__1`, `r__2`, `r__3, ` `r__4`:"

 

"and s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

i(t) = i__1+`i__2, `+i__3+i__4, r(t) = r__1+r__2+r__3_+r__4

"but A[n]:=(1)/(n!) [((&DifferentialD;)^(n))/(&DifferentialD; lambda^(n)) ((&sum;)`s__k`lambda^(k))((&sum;)`i__k`lambda^(k)) ]() ? ()|() ? (lambda=0)"

Error, missing numerator

Typesetting:-mambiguous(Typesetting:-mrow(Typesetting:-mi("but", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msub(Typesetting:-mi("A", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mi("n", fontstyle = "italic", mathcolor = "#c800c8", mathvariant = "italic", placeholder = "true"), subscriptshift = "0"), Typesetting:-mo("&Assign;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfrac(Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&excl;", accent = "false", fence = "false", largeop = "false", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "false", rspace = "0.1111111em", separator = "false", stretchy = "false", symmetric = "false")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-msup(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`s__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`i__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false")), open = "&lsqb;", close = "&rsqb;", mathvariant = "normal"), Typesetting:-mfrac(Typesetting:-mambiguous(Typesetting:-merror("?"), Typesetting:-merror("missing numerator")), Typesetting:-mphantom(Typesetting:-mrow(Typesetting:-mi("x", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "unset", rspace = "0.2777778em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("a", fontstyle = "italic", mathvariant = "italic")), constraints = "height-only"), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center"), Typesetting:-mo("&verbar;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "unset", rspace = "0.1111111em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mfrac(Typesetting:-mphantom(Typesetting:-mi("f(x)", fontstyle = "italic", mathvariant = "italic"), constraints = "height-only"), Typesetting:-mrow(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center")))

 

``

"Pls how can I write this Maple code to help me generate `s__1` ,`s__2__ _` ` ___` `s__3 `,`s__4` ; `i__1 `, `i__2__` ,`i__3 `, `i__4`  and `r__1 `, `r__2` , `r__3 `,`r__4`  and finally generate                       "

"s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

"i(t)=`i__1`+ `i__2, `+`i__3`+ `i__4`,   r(t)= `r__1`+ `r__2`+ `r__3_`+`r__4`:  "?""

``

NULL

NULL


 

Download Adomian.Elisha2.mw
 

restart

with(student)

NULL

G := S(t)*L(t)

S(t)*L(t)

(1)

m := 10

S[lambda] := sum(S[b]*lambda^b, b = 0 .. m); L[lambda] := sum(L[b]*lambda^b, b = 0 .. m); G[lambda] := subs(S(t) = S[lambda], G); G[lambda] := subs(L(t) = L[lambda], G[lambda]); G := G[lambda]; s := expand(G, lambda); ft := unapply(s, lambda); for i from 0 while i <= m do A1[i] := ((D@@i)(ft))(0)/factorial(i); print(A[i] = A1[i]) end do

A[0] = S[0]*L[0]

 

A[1] = L[0]*S[1]+L[1]*S[0]

 

A[2] = L[0]*S[2]+L[1]*S[1]+L[2]*S[0]

 

A[3] = L[0]*S[3]+L[1]*S[2]+L[2]*S[1]+L[3]*S[0]

 

A[4] = L[0]*S[4]+L[1]*S[3]+L[2]*S[2]+L[3]*S[1]+L[4]*S[0]

 

A[5] = L[0]*S[5]+L[1]*S[4]+L[2]*S[3]+L[3]*S[2]+L[4]*S[1]+L[5]*S[0]

 

A[6] = L[0]*S[6]+L[1]*S[5]+L[2]*S[4]+L[3]*S[3]+L[4]*S[2]+L[5]*S[1]+L[6]*S[0]

 

A[7] = S[5]*L[2]+S[2]*L[5]+S[1]*L[6]+S[0]*L[7]+S[4]*L[3]+S[3]*L[4]+S[6]*L[1]+S[7]*L[0]

 

A[8] = S[2]*L[6]+S[0]*L[8]+S[8]*L[0]+S[4]*L[4]+S[1]*L[7]+S[3]*L[5]+S[6]*L[2]+S[5]*L[3]+S[7]*L[1]

 

A[9] = S[6]*L[3]+S[9]*L[0]+S[4]*L[5]+S[2]*L[7]+S[3]*L[6]+S[8]*L[1]+S[0]*L[9]+S[1]*L[8]+S[7]*L[2]+S[5]*L[4]

 

A[10] = S[0]*L[10]+S[10]*L[0]+S[1]*L[9]+S[6]*L[4]+S[7]*L[3]+S[3]*L[7]+S[2]*L[8]+S[4]*L[6]+S[9]*L[1]+S[5]*L[5]+S[8]*L[2]

(2)

s[n+1] := (1-f)*alpha*(int(v__n, t = 0 .. t))-beta*c*(int(A__n, t = 0 .. t))-(`&theta;__1`+a+Pi)*(int(s__n, t = 0 .. t))

v[n+1] := `&theta;__1`*(int(s__n, t = 0 .. t))-((1-f)*alpha+f*`&theta;__2`+a+Pi)*(int(v__n, t = 0 .. t))

e[n+1] := `&beta;c`*(int(A__n, t = 0 .. t))-(delta+a+Pi)*(int(e__n, t = 0 .. t))

i[n+1] := delta*(int(e__n, t = 0 .. t))-(eta+a+Pi)*(int(i__n, t = 0 .. t))

r[n+1] := eta*(int(i__n, t = 0 .. t))+`f&theta;__2`*(int(v__n, t = 0 .. t))-(a+Pi)*(int(r__n, t = 0 .. t))

for n from 0 to 4 do  end do

NULL

(1-f)*alpha*v__n*t-beta*c*s__0*i__0*t-(`&theta;__1`+a+Pi)*s__n*t

(3)

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ``s__2__`, `s__3, ``s__4`,  `i__1`, `i__2, ``i__3`, `i__4`,   `r__1`, `r__2`, `r__3, ``r__4`:"

Error, unterminated for loop

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ` `s__2__`, `s__3, __3__, s__4`, `i__1__`, `i__2, ` `i__3`, `i__4`, `r__1`, `r__2`, `r__3, ` `r__4`:"

 

"and s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

i(t) = i__1+`i__2, `+i__3+i__4, r(t) = r__1+r__2+r__3_+r__4

"but A[n]:=(1)/(n!) [((&DifferentialD;)^(n))/(&DifferentialD; lambda^(n)) ((&sum;)`s__k`lambda^(k))((&sum;)`i__k`lambda^(k)) ]() ? ()|() ? (lambda=0)"

Error, missing numerator

Typesetting:-mambiguous(Typesetting:-mrow(Typesetting:-mi("but", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msub(Typesetting:-mi("A", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mi("n", fontstyle = "italic", mathcolor = "#c800c8", mathvariant = "italic", placeholder = "true"), subscriptshift = "0"), Typesetting:-mo("&Assign;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfrac(Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&excl;", accent = "false", fence = "false", largeop = "false", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "false", rspace = "0.1111111em", separator = "false", stretchy = "false", symmetric = "false")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-msup(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`s__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`i__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false")), open = "&lsqb;", close = "&rsqb;", mathvariant = "normal"), Typesetting:-mfrac(Typesetting:-mambiguous(Typesetting:-merror("?"), Typesetting:-merror("missing numerator")), Typesetting:-mphantom(Typesetting:-mrow(Typesetting:-mi("x", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "unset", rspace = "0.2777778em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("a", fontstyle = "italic", mathvariant = "italic")), constraints = "height-only"), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center"), Typesetting:-mo("&verbar;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "unset", rspace = "0.1111111em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mfrac(Typesetting:-mphantom(Typesetting:-mi("f(x)", fontstyle = "italic", mathvariant = "italic"), constraints = "height-only"), Typesetting:-mrow(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center")))

 

``

"Pls how can I write this Maple code to help me generate `s__1` ,`s__2__ _` ` ___` `s__3 `,`s__4` ; `i__1 `, `i__2__` ,`i__3 `, `i__4`  and `r__1 `, `r__2` , `r__3 `,`r__4`  and finally generate                       "

"s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

"i(t)=`i__1`+ `i__2, `+`i__3`+ `i__4`,   r(t)= `r__1`+ `r__2`+ `r__3_`+`r__4`:  "?""

``

NULL

NULL


 

Download Adomian.Elisha2.mw
 

restart

with(student)

NULL

G := S(t)*L(t)

S(t)*L(t)

(1)

m := 10

S[lambda] := sum(S[b]*lambda^b, b = 0 .. m); L[lambda] := sum(L[b]*lambda^b, b = 0 .. m); G[lambda] := subs(S(t) = S[lambda], G); G[lambda] := subs(L(t) = L[lambda], G[lambda]); G := G[lambda]; s := expand(G, lambda); ft := unapply(s, lambda); for i from 0 while i <= m do A1[i] := ((D@@i)(ft))(0)/factorial(i); print(A[i] = A1[i]) end do

A[0] = S[0]*L[0]

 

A[1] = L[0]*S[1]+L[1]*S[0]

 

A[2] = L[0]*S[2]+L[1]*S[1]+L[2]*S[0]

 

A[3] = L[0]*S[3]+L[1]*S[2]+L[2]*S[1]+L[3]*S[0]

 

A[4] = L[0]*S[4]+L[1]*S[3]+L[2]*S[2]+L[3]*S[1]+L[4]*S[0]

 

A[5] = L[0]*S[5]+L[1]*S[4]+L[2]*S[3]+L[3]*S[2]+L[4]*S[1]+L[5]*S[0]

 

A[6] = L[0]*S[6]+L[1]*S[5]+L[2]*S[4]+L[3]*S[3]+L[4]*S[2]+L[5]*S[1]+L[6]*S[0]

 

A[7] = S[5]*L[2]+S[2]*L[5]+S[1]*L[6]+S[0]*L[7]+S[4]*L[3]+S[3]*L[4]+S[6]*L[1]+S[7]*L[0]

 

A[8] = S[2]*L[6]+S[0]*L[8]+S[8]*L[0]+S[4]*L[4]+S[1]*L[7]+S[3]*L[5]+S[6]*L[2]+S[5]*L[3]+S[7]*L[1]

 

A[9] = S[6]*L[3]+S[9]*L[0]+S[4]*L[5]+S[2]*L[7]+S[3]*L[6]+S[8]*L[1]+S[0]*L[9]+S[1]*L[8]+S[7]*L[2]+S[5]*L[4]

 

A[10] = S[0]*L[10]+S[10]*L[0]+S[1]*L[9]+S[6]*L[4]+S[7]*L[3]+S[3]*L[7]+S[2]*L[8]+S[4]*L[6]+S[9]*L[1]+S[5]*L[5]+S[8]*L[2]

(2)

s[n+1] := (1-f)*alpha*(int(v__n, t = 0 .. t))-beta*c*(int(A__n, t = 0 .. t))-(`&theta;__1`+a+Pi)*(int(s__n, t = 0 .. t))

v[n+1] := `&theta;__1`*(int(s__n, t = 0 .. t))-((1-f)*alpha+f*`&theta;__2`+a+Pi)*(int(v__n, t = 0 .. t))

e[n+1] := `&beta;c`*(int(A__n, t = 0 .. t))-(delta+a+Pi)*(int(e__n, t = 0 .. t))

i[n+1] := delta*(int(e__n, t = 0 .. t))-(eta+a+Pi)*(int(i__n, t = 0 .. t))

r[n+1] := eta*(int(i__n, t = 0 .. t))+`f&theta;__2`*(int(v__n, t = 0 .. t))-(a+Pi)*(int(r__n, t = 0 .. t))

for n from 0 to 4 do  end do

NULL

(1-f)*alpha*v__n*t-beta*c*s__0*i__0*t-(`&theta;__1`+a+Pi)*s__n*t

(3)

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ``s__2__`, `s__3, ``s__4`,  `i__1`, `i__2, ``i__3`, `i__4`,   `r__1`, `r__2`, `r__3, ``r__4`:"

Error, unterminated for loop

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ` `s__2__`, `s__3, __3__, s__4`, `i__1__`, `i__2, ` `i__3`, `i__4`, `r__1`, `r__2`, `r__3, ` `r__4`:"

 

"and s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

i(t) = i__1+`i__2, `+i__3+i__4, r(t) = r__1+r__2+r__3_+r__4

"but A[n]:=(1)/(n!) [((&DifferentialD;)^(n))/(&DifferentialD; lambda^(n)) ((&sum;)`s__k`lambda^(k))((&sum;)`i__k`lambda^(k)) ]() ? ()|() ? (lambda=0)"

Error, missing numerator

Typesetting:-mambiguous(Typesetting:-mrow(Typesetting:-mi("but", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msub(Typesetting:-mi("A", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mi("n", fontstyle = "italic", mathcolor = "#c800c8", mathvariant = "italic", placeholder = "true"), subscriptshift = "0"), Typesetting:-mo("&Assign;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfrac(Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&excl;", accent = "false", fence = "false", largeop = "false", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "false", rspace = "0.1111111em", separator = "false", stretchy = "false", symmetric = "false")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-msup(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`s__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`i__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false")), open = "&lsqb;", close = "&rsqb;", mathvariant = "normal"), Typesetting:-mfrac(Typesetting:-mambiguous(Typesetting:-merror("?"), Typesetting:-merror("missing numerator")), Typesetting:-mphantom(Typesetting:-mrow(Typesetting:-mi("x", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "unset", rspace = "0.2777778em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("a", fontstyle = "italic", mathvariant = "italic")), constraints = "height-only"), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center"), Typesetting:-mo("&verbar;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "unset", rspace = "0.1111111em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mfrac(Typesetting:-mphantom(Typesetting:-mi("f(x)", fontstyle = "italic", mathvariant = "italic"), constraints = "height-only"), Typesetting:-mrow(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center")))

 

``

"Pls how can I write this Maple code to help me generate `s__1` ,`s__2__ _` ` ___` `s__3 `,`s__4` ; `i__1 `, `i__2__` ,`i__3 `, `i__4`  and `r__1 `, `r__2` , `r__3 `,`r__4`  and finally generate                       "

"s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

"i(t)=`i__1`+ `i__2, `+`i__3`+ `i__4`,   r(t)= `r__1`+ `r__2`+ `r__3_`+`r__4`:  "?""

``

NULL

NULL


 

Download Adomian.Elisha2.mw
 

restart

with(student)

NULL

G := S(t)*L(t)

S(t)*L(t)

(1)

m := 10

S[lambda] := sum(S[b]*lambda^b, b = 0 .. m); L[lambda] := sum(L[b]*lambda^b, b = 0 .. m); G[lambda] := subs(S(t) = S[lambda], G); G[lambda] := subs(L(t) = L[lambda], G[lambda]); G := G[lambda]; s := expand(G, lambda); ft := unapply(s, lambda); for i from 0 while i <= m do A1[i] := ((D@@i)(ft))(0)/factorial(i); print(A[i] = A1[i]) end do

A[0] = S[0]*L[0]

 

A[1] = L[0]*S[1]+L[1]*S[0]

 

A[2] = L[0]*S[2]+L[1]*S[1]+L[2]*S[0]

 

A[3] = L[0]*S[3]+L[1]*S[2]+L[2]*S[1]+L[3]*S[0]

 

A[4] = L[0]*S[4]+L[1]*S[3]+L[2]*S[2]+L[3]*S[1]+L[4]*S[0]

 

A[5] = L[0]*S[5]+L[1]*S[4]+L[2]*S[3]+L[3]*S[2]+L[4]*S[1]+L[5]*S[0]

 

A[6] = L[0]*S[6]+L[1]*S[5]+L[2]*S[4]+L[3]*S[3]+L[4]*S[2]+L[5]*S[1]+L[6]*S[0]

 

A[7] = S[5]*L[2]+S[2]*L[5]+S[1]*L[6]+S[0]*L[7]+S[4]*L[3]+S[3]*L[4]+S[6]*L[1]+S[7]*L[0]

 

A[8] = S[2]*L[6]+S[0]*L[8]+S[8]*L[0]+S[4]*L[4]+S[1]*L[7]+S[3]*L[5]+S[6]*L[2]+S[5]*L[3]+S[7]*L[1]

 

A[9] = S[6]*L[3]+S[9]*L[0]+S[4]*L[5]+S[2]*L[7]+S[3]*L[6]+S[8]*L[1]+S[0]*L[9]+S[1]*L[8]+S[7]*L[2]+S[5]*L[4]

 

A[10] = S[0]*L[10]+S[10]*L[0]+S[1]*L[9]+S[6]*L[4]+S[7]*L[3]+S[3]*L[7]+S[2]*L[8]+S[4]*L[6]+S[9]*L[1]+S[5]*L[5]+S[8]*L[2]

(2)

s[n+1] := (1-f)*alpha*(int(v__n, t = 0 .. t))-beta*c*(int(A__n, t = 0 .. t))-(`&theta;__1`+a+Pi)*(int(s__n, t = 0 .. t))

v[n+1] := `&theta;__1`*(int(s__n, t = 0 .. t))-((1-f)*alpha+f*`&theta;__2`+a+Pi)*(int(v__n, t = 0 .. t))

e[n+1] := `&beta;c`*(int(A__n, t = 0 .. t))-(delta+a+Pi)*(int(e__n, t = 0 .. t))

i[n+1] := delta*(int(e__n, t = 0 .. t))-(eta+a+Pi)*(int(i__n, t = 0 .. t))

r[n+1] := eta*(int(i__n, t = 0 .. t))+`f&theta;__2`*(int(v__n, t = 0 .. t))-(a+Pi)*(int(r__n, t = 0 .. t))

for n from 0 to 4 do  end do

NULL

(1-f)*alpha*v__n*t-beta*c*s__0*i__0*t-(`&theta;__1`+a+Pi)*s__n*t

(3)

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ``s__2__`, `s__3, ``s__4`,  `i__1`, `i__2, ``i__3`, `i__4`,   `r__1`, `r__2`, `r__3, ``r__4`:"

Error, unterminated for loop

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ` `s__2__`, `s__3, __3__, s__4`, `i__1__`, `i__2, ` `i__3`, `i__4`, `r__1`, `r__2`, `r__3, ` `r__4`:"

 

"and s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

i(t) = i__1+`i__2, `+i__3+i__4, r(t) = r__1+r__2+r__3_+r__4

"but A[n]:=(1)/(n!) [((&DifferentialD;)^(n))/(&DifferentialD; lambda^(n)) ((&sum;)`s__k`lambda^(k))((&sum;)`i__k`lambda^(k)) ]() ? ()|() ? (lambda=0)"

Error, missing numerator

Typesetting:-mambiguous(Typesetting:-mrow(Typesetting:-mi("but", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msub(Typesetting:-mi("A", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mi("n", fontstyle = "italic", mathcolor = "#c800c8", mathvariant = "italic", placeholder = "true"), subscriptshift = "0"), Typesetting:-mo("&Assign;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfrac(Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&excl;", accent = "false", fence = "false", largeop = "false", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "false", rspace = "0.1111111em", separator = "false", stretchy = "false", symmetric = "false")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-msup(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`s__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`i__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false")), open = "&lsqb;", close = "&rsqb;", mathvariant = "normal"), Typesetting:-mfrac(Typesetting:-mambiguous(Typesetting:-merror("?"), Typesetting:-merror("missing numerator")), Typesetting:-mphantom(Typesetting:-mrow(Typesetting:-mi("x", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "unset", rspace = "0.2777778em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("a", fontstyle = "italic", mathvariant = "italic")), constraints = "height-only"), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center"), Typesetting:-mo("&verbar;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "unset", rspace = "0.1111111em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mfrac(Typesetting:-mphantom(Typesetting:-mi("f(x)", fontstyle = "italic", mathvariant = "italic"), constraints = "height-only"), Typesetting:-mrow(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center")))

 

``

"Pls how can I write this Maple code to help me generate `s__1` ,`s__2__ _` ` ___` `s__3 `,`s__4` ; `i__1 `, `i__2__` ,`i__3 `, `i__4`  and `r__1 `, `r__2` , `r__3 `,`r__4`  and finally generate                       "

"s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

"i(t)=`i__1`+ `i__2, `+`i__3`+ `i__4`,   r(t)= `r__1`+ `r__2`+ `r__3_`+`r__4`:  "?""

``

NULL

NULL


 

Download Adomian.Elisha2.mw
 

restart

with(student)

NULL

G := S(t)*L(t)

S(t)*L(t)

(1)

m := 10

S[lambda] := sum(S[b]*lambda^b, b = 0 .. m); L[lambda] := sum(L[b]*lambda^b, b = 0 .. m); G[lambda] := subs(S(t) = S[lambda], G); G[lambda] := subs(L(t) = L[lambda], G[lambda]); G := G[lambda]; s := expand(G, lambda); ft := unapply(s, lambda); for i from 0 while i <= m do A1[i] := ((D@@i)(ft))(0)/factorial(i); print(A[i] = A1[i]) end do

A[0] = S[0]*L[0]

 

A[1] = L[0]*S[1]+L[1]*S[0]

 

A[2] = L[0]*S[2]+L[1]*S[1]+L[2]*S[0]

 

A[3] = L[0]*S[3]+L[1]*S[2]+L[2]*S[1]+L[3]*S[0]

 

A[4] = L[0]*S[4]+L[1]*S[3]+L[2]*S[2]+L[3]*S[1]+L[4]*S[0]

 

A[5] = L[0]*S[5]+L[1]*S[4]+L[2]*S[3]+L[3]*S[2]+L[4]*S[1]+L[5]*S[0]

 

A[6] = L[0]*S[6]+L[1]*S[5]+L[2]*S[4]+L[3]*S[3]+L[4]*S[2]+L[5]*S[1]+L[6]*S[0]

 

A[7] = S[5]*L[2]+S[2]*L[5]+S[1]*L[6]+S[0]*L[7]+S[4]*L[3]+S[3]*L[4]+S[6]*L[1]+S[7]*L[0]

 

A[8] = S[2]*L[6]+S[0]*L[8]+S[8]*L[0]+S[4]*L[4]+S[1]*L[7]+S[3]*L[5]+S[6]*L[2]+S[5]*L[3]+S[7]*L[1]

 

A[9] = S[6]*L[3]+S[9]*L[0]+S[4]*L[5]+S[2]*L[7]+S[3]*L[6]+S[8]*L[1]+S[0]*L[9]+S[1]*L[8]+S[7]*L[2]+S[5]*L[4]

 

A[10] = S[0]*L[10]+S[10]*L[0]+S[1]*L[9]+S[6]*L[4]+S[7]*L[3]+S[3]*L[7]+S[2]*L[8]+S[4]*L[6]+S[9]*L[1]+S[5]*L[5]+S[8]*L[2]

(2)

s[n+1] := (1-f)*alpha*(int(v__n, t = 0 .. t))-beta*c*(int(A__n, t = 0 .. t))-(`&theta;__1`+a+Pi)*(int(s__n, t = 0 .. t))

v[n+1] := `&theta;__1`*(int(s__n, t = 0 .. t))-((1-f)*alpha+f*`&theta;__2`+a+Pi)*(int(v__n, t = 0 .. t))

e[n+1] := `&beta;c`*(int(A__n, t = 0 .. t))-(delta+a+Pi)*(int(e__n, t = 0 .. t))

i[n+1] := delta*(int(e__n, t = 0 .. t))-(eta+a+Pi)*(int(i__n, t = 0 .. t))

r[n+1] := eta*(int(i__n, t = 0 .. t))+`f&theta;__2`*(int(v__n, t = 0 .. t))-(a+Pi)*(int(r__n, t = 0 .. t))

for n from 0 to 4 do  end do

NULL

(1-f)*alpha*v__n*t-beta*c*s__0*i__0*t-(`&theta;__1`+a+Pi)*s__n*t

(3)

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ``s__2__`, `s__3, ``s__4`,  `i__1`, `i__2, ``i__3`, `i__4`,   `r__1`, `r__2`, `r__3, ``r__4`:"

Error, unterminated for loop

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ` `s__2__`, `s__3, __3__, s__4`, `i__1__`, `i__2, ` `i__3`, `i__4`, `r__1`, `r__2`, `r__3, ` `r__4`:"

 

"and s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

i(t) = i__1+`i__2, `+i__3+i__4, r(t) = r__1+r__2+r__3_+r__4

"but A[n]:=(1)/(n!) [((&DifferentialD;)^(n))/(&DifferentialD; lambda^(n)) ((&sum;)`s__k`lambda^(k))((&sum;)`i__k`lambda^(k)) ]() ? ()|() ? (lambda=0)"

Error, missing numerator

Typesetting:-mambiguous(Typesetting:-mrow(Typesetting:-mi("but", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msub(Typesetting:-mi("A", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mi("n", fontstyle = "italic", mathcolor = "#c800c8", mathvariant = "italic", placeholder = "true"), subscriptshift = "0"), Typesetting:-mo("&Assign;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfrac(Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&excl;", accent = "false", fence = "false", largeop = "false", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "false", rspace = "0.1111111em", separator = "false", stretchy = "false", symmetric = "false")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-msup(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`s__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`i__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false")), open = "&lsqb;", close = "&rsqb;", mathvariant = "normal"), Typesetting:-mfrac(Typesetting:-mambiguous(Typesetting:-merror("?"), Typesetting:-merror("missing numerator")), Typesetting:-mphantom(Typesetting:-mrow(Typesetting:-mi("x", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "unset", rspace = "0.2777778em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("a", fontstyle = "italic", mathvariant = "italic")), constraints = "height-only"), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center"), Typesetting:-mo("&verbar;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "unset", rspace = "0.1111111em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mfrac(Typesetting:-mphantom(Typesetting:-mi("f(x)", fontstyle = "italic", mathvariant = "italic"), constraints = "height-only"), Typesetting:-mrow(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center")))

 

``

"Pls how can I write this Maple code to help me generate `s__1` ,`s__2__ _` ` ___` `s__3 `,`s__4` ; `i__1 `, `i__2__` ,`i__3 `, `i__4`  and `r__1 `, `r__2` , `r__3 `,`r__4`  and finally generate                       "

"s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

"i(t)=`i__1`+ `i__2, `+`i__3`+ `i__4`,   r(t)= `r__1`+ `r__2`+ `r__3_`+`r__4`:  "?""

``

NULL

NULL


 

Download Adomian.Elisha2.mw
 

restart

with(student)

NULL

G := S(t)*L(t)

S(t)*L(t)

(1)

m := 10

S[lambda] := sum(S[b]*lambda^b, b = 0 .. m); L[lambda] := sum(L[b]*lambda^b, b = 0 .. m); G[lambda] := subs(S(t) = S[lambda], G); G[lambda] := subs(L(t) = L[lambda], G[lambda]); G := G[lambda]; s := expand(G, lambda); ft := unapply(s, lambda); for i from 0 while i <= m do A1[i] := ((D@@i)(ft))(0)/factorial(i); print(A[i] = A1[i]) end do

A[0] = S[0]*L[0]

 

A[1] = L[0]*S[1]+L[1]*S[0]

 

A[2] = L[0]*S[2]+L[1]*S[1]+L[2]*S[0]

 

A[3] = L[0]*S[3]+L[1]*S[2]+L[2]*S[1]+L[3]*S[0]

 

A[4] = L[0]*S[4]+L[1]*S[3]+L[2]*S[2]+L[3]*S[1]+L[4]*S[0]

 

A[5] = L[0]*S[5]+L[1]*S[4]+L[2]*S[3]+L[3]*S[2]+L[4]*S[1]+L[5]*S[0]

 

A[6] = L[0]*S[6]+L[1]*S[5]+L[2]*S[4]+L[3]*S[3]+L[4]*S[2]+L[5]*S[1]+L[6]*S[0]

 

A[7] = S[5]*L[2]+S[2]*L[5]+S[1]*L[6]+S[0]*L[7]+S[4]*L[3]+S[3]*L[4]+S[6]*L[1]+S[7]*L[0]

 

A[8] = S[2]*L[6]+S[0]*L[8]+S[8]*L[0]+S[4]*L[4]+S[1]*L[7]+S[3]*L[5]+S[6]*L[2]+S[5]*L[3]+S[7]*L[1]

 

A[9] = S[6]*L[3]+S[9]*L[0]+S[4]*L[5]+S[2]*L[7]+S[3]*L[6]+S[8]*L[1]+S[0]*L[9]+S[1]*L[8]+S[7]*L[2]+S[5]*L[4]

 

A[10] = S[0]*L[10]+S[10]*L[0]+S[1]*L[9]+S[6]*L[4]+S[7]*L[3]+S[3]*L[7]+S[2]*L[8]+S[4]*L[6]+S[9]*L[1]+S[5]*L[5]+S[8]*L[2]

(2)

s[n+1] := (1-f)*alpha*(int(v__n, t = 0 .. t))-beta*c*(int(A__n, t = 0 .. t))-(`&theta;__1`+a+Pi)*(int(s__n, t = 0 .. t))

v[n+1] := `&theta;__1`*(int(s__n, t = 0 .. t))-((1-f)*alpha+f*`&theta;__2`+a+Pi)*(int(v__n, t = 0 .. t))

e[n+1] := `&beta;c`*(int(A__n, t = 0 .. t))-(delta+a+Pi)*(int(e__n, t = 0 .. t))

i[n+1] := delta*(int(e__n, t = 0 .. t))-(eta+a+Pi)*(int(i__n, t = 0 .. t))

r[n+1] := eta*(int(i__n, t = 0 .. t))+`f&theta;__2`*(int(v__n, t = 0 .. t))-(a+Pi)*(int(r__n, t = 0 .. t))

for n from 0 to 4 do  end do

NULL

(1-f)*alpha*v__n*t-beta*c*s__0*i__0*t-(`&theta;__1`+a+Pi)*s__n*t

(3)

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ``s__2__`, `s__3, ``s__4`,  `i__1`, `i__2, ``i__3`, `i__4`,   `r__1`, `r__2`, `r__3, ``r__4`:"

Error, unterminated for loop

"for n:=0, n=1, n=2, n=3, n=4:  `s__1, ` `s__2__`, `s__3, __3__, s__4`, `i__1__`, `i__2, ` `i__3`, `i__4`, `r__1`, `r__2`, `r__3, ` `r__4`:"

 

"and s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

i(t) = i__1+`i__2, `+i__3+i__4, r(t) = r__1+r__2+r__3_+r__4

"but A[n]:=(1)/(n!) [((&DifferentialD;)^(n))/(&DifferentialD; lambda^(n)) ((&sum;)`s__k`lambda^(k))((&sum;)`i__k`lambda^(k)) ]() ? ()|() ? (lambda=0)"

Error, missing numerator

Typesetting:-mambiguous(Typesetting:-mrow(Typesetting:-mi("but", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msub(Typesetting:-mi("A", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mi("n", fontstyle = "italic", mathcolor = "#c800c8", mathvariant = "italic", placeholder = "true"), subscriptshift = "0"), Typesetting:-mo("&Assign;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfrac(Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&excl;", accent = "false", fence = "false", largeop = "false", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "false", rspace = "0.1111111em", separator = "false", stretchy = "false", symmetric = "false")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-msup(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0"), Typesetting:-mrow(Typesetting:-mo("&DifferentialD;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.0em", mathvariant = "normal", movablelimits = "unset", rspace = "0.0em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`s__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mo("&sum;", accent = "unset", fence = "unset", largeop = "true", lspace = "0.0em", mathvariant = "normal", movablelimits = "true", rspace = "0.1666667em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mrow(Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), Typesetting:-mn("4", mathvariant = "normal"), accent = "false", accentunder = "false"), Typesetting:-mi("`i__k`"), Typesetting:-msup(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("k", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0")), mathvariant = "normal"), Typesetting:-mo("&InvisibleTimes;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false")), open = "&lsqb;", close = "&rsqb;", mathvariant = "normal"), Typesetting:-mfrac(Typesetting:-mambiguous(Typesetting:-merror("?"), Typesetting:-merror("missing numerator")), Typesetting:-mphantom(Typesetting:-mrow(Typesetting:-mi("x", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "unset", rspace = "0.2777778em", separator = "unset", stretchy = "unset", symmetric = "unset"), Typesetting:-mi("a", fontstyle = "italic", mathvariant = "italic")), constraints = "height-only"), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center"), Typesetting:-mo("&verbar;", accent = "unset", fence = "unset", largeop = "unset", lspace = "0.1111111em", mathvariant = "normal", movablelimits = "unset", rspace = "0.1111111em", separator = "unset", stretchy = "true", symmetric = "unset"), Typesetting:-mfrac(Typesetting:-mphantom(Typesetting:-mi("f(x)", fontstyle = "italic", mathvariant = "italic"), constraints = "height-only"), Typesetting:-mrow(Typesetting:-mi("&lambda;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("0", mathvariant = "normal")), bevelled = "false", denomalign = "center", linethickness = "0", numalign = "center")))

 

``

"Pls how can I write this Maple code to help me generate `s__1` ,`s__2__ _` ` ___` `s__3 `,`s__4` ; `i__1 `, `i__2__` ,`i__3 `, `i__4`  and `r__1 `, `r__2` , `r__3 `,`r__4`  and finally generate                       "

"s(t)=`s__1_`+`s__2 __`+ `s__3, `+`s__4`,"

"i(t)=`i__1`+ `i__2, `+`i__3`+ `i__4`,   r(t)= `r__1`+ `r__2`+ `r__3_`+`r__4`:  "?""

``

NULL

NULL


 

Download Adomian.Elisha2.mw

 

 

 

 

 

 

 

 

 

 

 

PDE := diff(u(x, t), t$2) = (1/16)*(diff(u(x, t), x$2))-(1/5)*(diff(u(x, t), t)); IBCs := u(x, 0) = x*(1-(1/2)*x), (D[2](u))(x, 0) = x*(1-(1/2)*x), u(0, t) = 0, (D[1](u))(1, t) = 0; Sol := pdsolve({IBCs, PDE}, HINT = f(x)*g(t)); Sol := subs(op([2, 2, 1], Sol) = n, Sol)

I thought that the addition of HINT wolud help but no.

The numeric solution gives the right answer but the analytical gives way too small numbers and wrong shape.

 

I have a list of coefficients each assigned a triple of indices. E.g. CF_{x,y,z}. These indicies are also able to take other values between +-2. E.g. CF_{x+2,y-1,z} or CF_{x,y-2,z+1} as examples. I have a working loop that cycles through the list of these coefficients and I am able to call a particular one by specifying the triple of indicies. This script has been attached:

triple_index_script.mw

I would like to modify this script to have more control over single indexes. As an example, say I want to add up all the coefficients which have z as a subscript (so not z+1,z-2 etc...) and I don't care what the x and y subscripts are; I want to be able to call that sum using the same notation in the script but with a single index. e.g. (using a new example function called RR_MapZ):

RR_MapZ[0]; ## This would return the sum of all coefficients that had z in their subscript

and this would return the sum of all the coefficients which have subscript Z. If I wanted to add up all the coefficients which had index Z+1 I would do:

RR_MapN[1]; ## This would return the sum of all coefficients that had z+1 in their subscript

What would be the most efficient way to do this?

-Yeti

Hi everybody

In the attached file, when I run the code an error appears while calculating "omegaL1" parameter. The dimensions of the matrices are correct but the source of error is unknown to me. Can anyone help me?

Thanks in advance

R2_Link_2D.mw 

Is there any convenient tool to convert Maple worksheet to Matlab m file, until today?

This must have a simple answer but I have been unable to figure it out after many attempts. 

I am trying to create a Clifford algebra, and then use the results in the multiplication table "MT". The multiplication table elements are correct as displayed, but I don't know how to access the results in the table (i.e. the products of the basis elements).  For example, trying to access the table results as matrix elements like MT[2,3] doesn't work, presumably because it is not a matrix. In other words, I need a matrix that contains the same information as the multiplication table.

DGsetup([x, y, z], M);
I12 := Matrix([[-1, 0, 0], [0, -1, 0], [0, 0, -1]]);
AD3b := AlgebraLibraryData("Clifford(3)", Cl3Q, quadraticform = I12);
DGsetup(AD3b, '[e0, e1, e2, e3, e12, e13, e23, e123]', '[omega]');
MT := MultiplicationTable(Cl3Q, "AlgebraTable");

 

hello, i have problem here.

> restart;
> with(linalg);
> NULL;
> fungsi1 := sum(d1[h]+b1[h], h = 1 .. 7);
> fungsi2 := sum(sum(d2[h, t]+b2[h, t], t = 1 .. 23), h = 1 .. 7);
> fungsi3 := sum(sum(d3[h, t]+b3[h, t], t = 1 .. 23), h = 1 .. 7);
> fungsi4 := sum(d4[k]+b4[k], k = 1 .. 3);
> fungsi := fungsi1+fungsi2+fungsi3+fungsi4;
> NULL;
> NULL;
> k1 := seq(sum(X[h, t], t = 1 .. 23) >= 9, h = 1 .. 6);
> k2 := seq(sum(Y[h, t], t = 1 .. 23) >= 2, h = 1 .. 6);
> k3 := seq(sum(Z[h, t], t = 1 .. 23) >= 2, h = 1 .. 6);
> NULL;
> k4 := seq(seq(X[h, t]+Y[h, t]+Z[h, t] <= 1, h = 1 .. 6), t = 1 .. 23);
> NULL;
> k5 := seq(seq(Z[h, t]+Z[h+1, t] <= 1, h = 1 .. 6), t = 1 .. 23);
> NULL;
> k6 := seq(sum(X[h, t]+Y[h, t]+Z[h, t], t = 1 .. 23) >= 5, h = 1 .. 7);
> k7 := seq(sum(X[h, t]+Y[h, t]+Z[h, t], t = 1 .. 23) <= 6, h = 1 .. 7);
> NULL;
> k8 := seq(sum(X[h, t], t = 1 .. 23)+b1[h]-d1[h] <= 15, h = 1 .. 6);
> k9 := seq(sum(Y[h, t], t = 1 .. 23)+b1[h]-d1[h] <= 4, h = 1 .. 6);
> k10 := seq(sum(Z[h, t], t = 1 .. 23)+b1[h]-d1[h] <= 4, h = 1 .. 6);
> NULL;
> k11 := seq(seq(Y[h, t]+Y[h+1, t]+b2[h, t]-d2[h, t] <= 1, t = 1 .. 23), h = 1 .. 6);
> NULL;
> k12 := seq(seq(Z[h, t]+Z[h+1, t]+b3[h, t]-d3[h, t] <= 1, t = 1 .. 23), h = 1 .. 6);
> NULL;
> k13 := sum(X[7, t], t = 1 .. 23)+b4[1]-d4[1] = 2;
> k14 := sum(Y[7, t], t = 1 .. 23)+b4[1]-d4[1] = 2;
> k15 := sum(Z[7, t], t = 1 .. 23)+b4[1]-d4[1] = 2;
> with(Optimization);
[ImportMPS, Interactive, LPSolve, LSSolve, Maximize, Minimize, 

  NLPSolve, QPSolve]
> CodeTools:-Usage(LPSolve(fungsi, {k1, k10, k11, k12, k13, k14, k15, k2, k3, k4, k5, k6, k7, k8, k9}, assume = {integer, nonnegative}));
Error, (in Optimization:-LPSolve) no feasible point found for LP subproblem

why it can be? please i need help. 

I was looking to see if anyone has come across a Maple routine for a savings algorithm - specifically, Clarke and Wright. In fact, any classical savings heuristic would also be interesting.

Any guidance would be truly appreciated.

Is it possible get a solution of this equation without RoofOf in form explicit?

 Question:- can the procedure given below called "epi" be speeded up by compiling/ using evhf.If so how? My paple code is at the bottom.

First some background information.

Recently I ran into a difference in usage of a couple of elliptical functions between Maple and Mathematica.  This first case concerned EllipticalPi. The author of the blog kindly wrote  a Maple procedure to produce the same results as Mathematica’s  usage of ElllipticalPi.

I tested the basic integral that produces the EllipticPi    Ell := int(1/(1-nu*JacobiSN(t, k)^2), t)  answer      Ell := EllipticPi(JacobiSN(t, k), nu, k). They do not produce the same outcome. Plots are in the document .  They agree in one quarter only.

 I then ran into a difference in usage of  EllipticF. This time I was able to get to same outcome myself using Maple’s help.

“It is worth noting the difference between the Legendre normal form of the Incomplete Elliptic integral of the first kind (see A&S 17.2.7), in Maple represented by EllipticF(z,k) but for the splitting of the square root in the denominator of the integrand (see definition lines above), and the normal trigonometric form of this elliptic integral (see A&S 17.2.6), in Maple represented by the InverseJacobiAM function
InverseJacobiAM(phi,k);

That worked fine.

There is no mention in the help for usage implementation of EllipticPi as opposed to different usages as there is with EllipticF. I do not know if there is a way in Maple of achieving the same enactment as Mathematica in this case, without the Procedure I  was  given.

 

 

Elliptic Pi in Mathematica and Maple

Posted on 2017/02/202017/02/23 by arkajad

We use EllipticPi when we write exact solutions of rotation of a free asymmetric top. While solving Euler’s equations for angular velocity or angular momentum in the body frame we need Jacobi elliptic functions \cn,\sn,\dn,solving the differential equation for the attitude matrix involves EllipticPi function. As I have explained it in Taming the T-handle continued we need the integral

(1)   \begin{equation*}\psi(t)=c_1 t+c_2\int_0^t \frac{1}{1+c_3\,\sn^2(Bs,m)}\,ds.\end{equation*}

In Mathematica this is easily implemented as

(2)   \begin{equation*}\psi(t)=c_1 t+\frac{c_2}{B}\,\Pi(-c_3;\am(Bt,m)|m).\end{equation*}

However, as pointed out by Rowan in a comment to Taming the T-handle continued , the same formula does not work with Maple.

While the documentations of both Mathematica and Maple contain links to Abramowitz and Stegun Handbook of Mathematical Functions, they use different definitions. Here is what concerns us, from p. 590 of the 10th printing:

http://arkadiusz-jadczyk.eu/blog/wp-content/uploads/2017/02/epiam.jpg

What we need is 17.2.16, while Maple is using 17.2.14. To convert we need to set x=\sn u,but such a conversion is possible only in the domain where \sncan be inverted. We can do it easily for sufficiently small values of u,but not necessarily for values that contain several quarter-periods.

The following Maple procedure does the job:


epi := proc (t::float, nu::float, k::float) local t2, n, dt, ep0, res; ep0 := EllipticPi(nu, k); t2 := EllipticK(k); n := floor(t/t2); dt := t-t2*n; if type(n, even) then res := Re(n*ep0+EllipticPi(JacobiSN(dt, k), nu, k)) else res := Re((1+n)*ep0-EllipticPi(JacobiSN(t2-dt, k), nu, k)) end if end proc

HAs an example here is the Maple plot for nu=-3, k=0.9:
plot(('epi')(t, -3.0, .9), t = -20 .. 20)
http://arkadiusz-jadczyk.eu/blog/wp-content/uploads/2017/02/epimap.jpg

And here is the corresponding Mathematica plot:
http://arkadiusz-jadczyk.eu/blog/wp-content/uploads/2017/02/epimat.jpg

The function epi(t,nu, k) defined above for Maple gives now the same result as EllipticPi(nu,JacobiAM(t,k^2),k^2) in Mathematica.

restart;
epi := proc (t, nu, k) local t2, n, dt, ep0, res; ep0 := EllipticPi(nu, k); t2 := EllipticK(k); n := floor(t/t2); dt := t-t2*n; if type(n, even) then res := Re(n*ep0+EllipticPi(JacobiSN(dt, k), nu, k)) else res := Re((1+n)*ep0-EllipticPi(JacobiSN(t2-dt, k), nu, k)) end if end proc;


Ell := int(1/(1-nu*JacobiSN(t, k)^2), t);
            Ell := EllipticPi(JacobiSN(t, k), nu, k)
k := .9;
                            k := 0.9
nu := -3;
                            nu := -3
plot([epi(t, nu, k), Ell], t = -8 .. 20);

 

Dear All,

This is probably an easy issue to solve.

I have imported an .xls file using the 1D lookup table.

I need the signal to be executed for 4 seconds which is also how long my simulation duration is.

So I set the Ramp height and rise time to 4s. For some reason when I display the signal using a probe it gives me the constant value of the first row of my Excel sheet. I need help to solve this! I have provided some visuals below.

Thank you for your time!

Can

I have two figures that's generated in Maple (by plot), then pasted them to a worksheet, which I would like to export them to PDF format with exactly the same as it seems on Maple, meaning that these two figures need to be on the same row.

However, in the exported PDF, these two figures are always in two rows: see Fig_1.mw and Fig_1.pdf 

What I tried was: to really resize these two figures into very small size, and the export works, however, I also need three figures or four figures in one row. See Fig_2.mw and Fig_2.pdf

So there is actually two questions:

1. Can I specify some parameters in Maple such that the exported PDF is exactly 'what I see is what I get'?

2. If #1 is impossible, where can I get the information on: width of the exported PDF, how to specify the precise size of plot command etc

Thanks,

How to express a chemistry equation in prefix expression

Hi everyone!

I would really appreciate if someone could give me a hand on telling me what is wrong with this problem! pdsolve gives the error: Error, (in pdsolve/sys/info) found functions with same name but depending on different arguments in the given DE system: {f(0, y), f(x, 0), f(x, y), (D[2](f))(0, y), (D[2](f))(x, 0)}.


Thanks in advance!!! 




 

 

Hello,

I want to check via Maple whether the term is always bigger than c/4 (it is), but using verify(TERM, c/4, greater_than) just returns FALSE. I did assume(a > 0, b > 0, -1 <= c and c <= 1); It would be nice if you could tell me what exactly is causing the problem and how to solve it.

Thanks in advance

(9*a^3*b^3*c^2+4*a^6*c+16*a^5*b*c+47*a^4*b^2*c+82*a^3*b^3*c+47*a^2*b^4*c+16*a*b^5*c+4*b^6*c+16*a^5*b+80*a^4*b^2+132*a^3*b^3+80*a^2*b^4+16*a*b^5)*(a+2*b)^2*(a+b)^2*(2*a+b)^2/((4*a^6+28*a^5*b+77*a^4*b^2+106*a^3*b^3+77*a^2*b^4+28*a*b^5+4*b^6)*sqrt(-9*a^2*b^2*c^2+32*a^3*b*c+62*a^2*b^2*c+32*a*b^3*c+16*a^4+80*a^3*b+132*a^2*b^2+80*a*b^3+16*b^4)*sqrt(-9*a^4*b^4*c^2+24*a^6*b^2*c+28*a^5*b^3*c-14*a^4*b^4*c+28*a^3*b^5*c+24*a^2*b^6*c+16*a^8+112*a^7*b+276*a^6*b^2+296*a^5*b^3+220*a^4*b^4+296*a^3*b^5+276*a^2*b^6+112*a*b^7+16*b^8))

 

First 137 138 139 140 141 142 143 Last Page 139 of 334