Abdu

5 Reputation

One Badge

4 years, 156 days

MaplePrimes Activity


These are questions asked by Abdu

As you can see in the code, I am trying to print the solution of the ODE using the Homotopy perturbation method for N = 10 ( f[0] till f[10]), but Maple is only printing f[0],f[1], and the rest of the terms are not printed out, what could cause this issue to take place?

``` 
 
restart;
N := 10:
  F(Y) :=  add(p^i*f[i](Y), i = 0..N);
  HPMEq := (1 - p)*diff(F(Y), Y $ 4) + p*(diff(F(Y), Y $ 4) + R*(diff(F(Y), Y $ 3)*F(Y)- diff(F(Y), Y $ 2)*diff(F(Y), Y $ 1))-G*diff(F(Y), Y $ 2));
    sol:=[]:
  for i from 0 to N do
      sol:= [ sol[],
              dsolve
              ( [ eval
                  ( coeff(HPMEq, p, i) = 0,
                    sol
                  ),
                  f[i](0) = -a,
                  f[i](1) = -b,
                  D(f[i])(0) = B * D(D(f[i]))(0),
                  D(f[i])(1) = -B * D(D(f[i]))(1)
                ]
              )
            ];
end do:
sol;

```
Please kindly try to run this code in your Maple version and tell me if all terms are printed.

Page 1 of 1