Question:solving a third order ode with series

Question:solving a third order ode with series

Maple

I have a similar problem to before
I have rewritten a fourth order ODE as a third order ODE with a constant of integration, K. I need to rewrite K as a series K=K0+R*K1+R2*K2+… up to nmax. Then I need to solve by comparing coefficients of powers of R. I have four boundary conditions which are clear from the program below and I keep substituting back into the equation to get a more accurate solution:

> restart;
> with(plots);
> nmax:=3:
> Order:=nmax+1:
> de:=diff(F(eta,R),eta\$3)-R*(diff(F(eta,R),eta)^2-F(eta,R)*diff(F(eta,R),eta\$2))-K;

Write in a series of powers of R
Extract the individual equations for each power upto R^nmax
> des:=[seq(coeff(%,R,k),k=0..nmax)]:
Define the boundary conditions
> bcs:=k->(F[k](-1)=`if`(k=0,-1,0),F[k](1)=`if`(k=0,1,0),D(F[k])(-1)=0,D(F[k])(1)=0);

Solve the boundary value problem for each power
> for k from 1 to nmax+1 do
F[k-1]:=unapply(rhs(evalf(dsolve({des[k],bcs(k-1)}))),eta);
end do;