Question: Homotopy analysis method

I need assistance with building the homotopy analysis method to solve the system of odes. here is the attempt to do it. I'm still new to maple restart; # Declare functions for the system PDEtools[declare]([f(x), g(x)], prime = x): # Order of expansion N := 4; # Define series for each function f1(x) := sum(p^i*f[i](x), i = 0..N): f2(x) := sum(p^i*g[i](x), i = 0..N): # Define the system of ODEs using Homotopy HPMEq1 := (1-p)*(diff(f1(x), x$3)) + p*(diff(f1(x), x) + f2(x)): HPMEq2 := (1-p)*(diff(f2(x), x$3)) + p*(diff(f2(x), x) - f1(x)): # Extract coefficients for the system for i from 0 to N do equl[1][i] := coeff(HPMEq1, p, i) = 0: equl[2][i] := coeff(HPMEq2, p, i) = 0: end do: # Define boundary conditions for the system cond= 0, D(f1[0])(5) = 1]: cond = 0, D(f2[0])(0) 1]: for j from 1 to N do cond = 0, D(f1[j])(0) = 0, D(f1[j])(5) , D(f2[j])(0) = 0, D(f2[j])(5) = 0]: end do: # Solve the system iteratively for each order for k from 0 to N do dsolve([equl[1][k], cond[1][k]], f1[k](x)): dsolve([equl[2][k], cond[2][k]], f2[k](x)): end do:
Please Wait...