Question: How can I solve BVP by using homotopy perturbation method in maple

 can you help me to solve BVP by using homotopy perturbation method
 

``

restart

with(student); -1; n := 5; 1; v := sum(y[i]*p^i, i = 0 .. n); -1; y[0] := 1; 1; D(y[0]) := gamma

5

 

1

 

gamma

(1)

for i to n do y[i] := expand(subs(coeff(diff(v, x, x)-(diff(y[0], x, x))+p*(diff(y[0], x, x)-v+cos(x)), p^i))) end do;

-1+cos(x)

 

1-2*cos(x)+cos(x)^2

 

-1+3*cos(x)-3*cos(x)^2+cos(x)^3

 

1-4*cos(x)+6*cos(x)^2-4*cos(x)^3+cos(x)^4

 

-1+5*cos(x)-10*cos(x)^2+10*cos(x)^3-5*cos(x)^4+cos(x)^5

(2)

s := simplify(sum(y[k], k = 0 .. n));

cos(x)*(cos(x)^4-4*cos(x)^3+7*cos(x)^2-6*cos(x)+3)

 

cos(x)*(cos(x)^4-4*cos(x)^3+7*cos(x)^2-6*cos(x)+3)

(3)

``

``


 

Download homotopy.mw

Please Wait...