## 110 Reputation

8 years, 225 days
UNIVERSITY OF LAGOS, AKOKA YABA, LAGOS
LAGOS, Nigeria

## Help with the loop...

Maple

Good day everyone,

I am trying to write a code for the loop of the equations below such the Theta[k] and Phi[k] start from 2 to M while F[k] starts from 4  to M.

Anyone with good informations should please.

Thanks in anticipation

Solution_1.mw

## Finite difference Method...

Maple

Good day everyone,

I am trying to write a finite difference Method solution for an ODE and its giving me problem solving the algebraic simplifications generated. Please, any one with useful informations. Below is the attached file

 >
 >
 >
 >
 >
 >
 >
 >
 > ode:=diff(f(eta),eta\$3)+f(eta)*diff(f(eta),eta\$2)=0
 (1)
 > bc1:=df(xmin)=2*sigma__1;
 (2)
 > bc2:=d2f(xmin)=0;
 (3)
 > bc3:=d3f(xmax)=2;
 (4)
 > dfde:=proc(h)(f[k+1]-f[k-1])/2/h;end proc:
 > dfde(h);
 (5)
 > d2fde2:=proc(h)(f[k+1]-2*f[k]+f[k-1])/h^2;end proc:
 > d2fde2(h);
 (6)
 > d3fde3:=proc(h)(f[k+1]-3*f[k]+3*f[k-1]-f[k-2])/h^3;end proc:
 > d3fde3(h);
 (7)
 > d2fde2f:=proc(h)(f[k+2]-2*f[k+1]+f[k])/h^2;end proc:
 > d2fde2f(h);
 (8)
 > d2fde2b:=proc(h)(f[k]-2*f[k-1]+f[k-2])/h^2;end proc:
 > d2fde2b(h);
 (9)
 >
 > dfdef:=proc(h)(f[k+1]-f[k])/h;end proc:
 > dfdef(h);
 (10)
 > h:=xmax/(n-1)
 (11)
 > stencil:=subs(diff(f(eta),eta\$3)=d3fde3(h),f(eta)=f[k],diff(f(eta),eta\$2)=d2fde2,ode);
 (12)
 > bcEqs:=[subs(k=0,dfdef(h))=rhs(bc1),subs(k=0,d2fde2f(h))=rhs(bc2), subs(k=n-1,d2fde2b(h))=rhs(bc3)];
 (13)
 > eqs:=Vector(n-2): cnt:=0: for k from 1 to n-2 do     cnt:=cnt+1:     eqs(cnt):=stencil; end do: eqs:
 >
 (14)
 >
 (15)
 >

## invalid subscript selector...

Maple

Goodday everyone,

Please, anyone with useful informations on the above stated error code should help.

Below is the attached file.

Error_invalid_subscript_selector.mw

Thanks in anticipation for your response

## Error, unable to compute coeff...

Maple

Hello everyone,

Attached below is the code.

Thanking you in anticipations for your prompt response.

Hpm_1.mw

## Error, final value in for loop must be n...

Maple

Goodday sirs,

How can I get over these error message123.mw

 >
 >

 (1)
 >

 >
 >
 >