I asked a question few hours ago. I corrected the error in the process I was suggested. How in writing the program to collect the coefficients of m^0, m^1 and m^2, I am again stuck in an error and could not find any help.
restart; N := 2
Eq[1] := diff(f(eta), `$`(eta, 3))+(m+4)*f(eta)*(diff(f(eta), `$`(eta, 2)))-(2*(m+1))*(diff(f(eta), eta))^2-(2*(m+1))*h(eta)-(.5*(m-2))*eta*(diff(h(eta), eta))
Eq[2] := g(eta)-(diff(h(eta), eta))
Eq[3] := (diff(g(eta), `$`(eta, 2)))/Pr+(m+4)*f(eta)*(diff(g(eta), eta))-(5*m+2)*g(eta)*(diff(f(eta), eta))
BCs := [f(0), (D(f))(0), (D(f))(infinity), (D(g))(0)+1, g(infinity), h(infinity)]
eqs := Eq[1], Eq[2], Eq[3]
f := proc (eta) options operator, arrow; add('f[i](eta)*m^i', 'i' = 0 .. N) end proc
h := proc (eta) options operator, arrow; add('h[i](eta)*m^i', 'i' = 0 .. N) end proc
h := proc (eta) options operator, arrow; add('g[i](eta)*m^i', 'i' = 0 .. N) end proc
EQS := expand(eqs)
deqn := simplify(collect(EQS, m), {m^(N+1) = 0})
for i from 0 to N do eqn[i]:=expand(coeff(lhs(deqn),m,i))=expand(coeff(rhs(deqn),m,i)); od; end do;
MAPLE says:
Error, (in simplify/siderels:-simplify/siderels) side relations must be polynomials in (name or function) variables
Please help in correcting the errors so that I can get the zeroth order, first order and second order equations.
Thanking you.perturbation_equatio.mw