Question: Loop help required

Helloo everyone,

eq1:=((diff(f(eta),eta$3)))-a*diff(f(eta),eta$1)^2+b*f(eta)*diff(f(eta),eta$2)=0;

bc:=f(0)=0,D(f)(0)=1+c*(D@@2)(f)(0),D(f)(8)=d:

Now the question is how we can get data in the following form 

a      b     c      d         dif(f(eta),eta$2) at eta=0

1      1     1      1                  0.1

1     2      1      1                   0.2

1     2      2       1                   0.3

1     2     2      2                      0.4

2      1     1      1                  0.5

2     2      1      1                   0.6

2     2      2       1                   0.7

2     2     2      2                      0.8

In the above table, I want to vary a, b, c, d and to find out the values from the ode for dif(f(eta),eta$2) at eta=0

Here is my try but no luck

 

sol:= (a1,b1,c1,d1)->dsolve({bc,eq1}), numeric,output = array([0]);

p:=proc(a1,b1,c1,d1)
subs(sol(a1,b1,c1,d1):-value()(a1,b1,c1,d1),Vector[row]([a1,b,c,d,rhs(sol[3])])) #dif(f(eta),eta$2) at eta=0 is called as rhs(sol[3])
end proc;

ha:=.01: hb:=.1: hc:=0.1: hd:=0.1: #Increments in a, b, c and d, respectively
Ia:=2: Ib:=2: Ic:=2: Id:=2: #Number of increments
A:=Matrix(ha*hb*hc*hd,5); #Rows: [a,b,c,d,dif(f(eta),eta$2) at eta=0]

r:=0:

for i from 1 to Ia do
q:=sol(i*ha);
for j from 1 to Ib do
v:=q:-value(b=j*hb);

for l from 1 to Ic do

w:=v:-value(c=j*hc);
for k from 1 to Id do
r:=r+1;
A[r,..]:=subs(v(hd*k),subs(w(hc*l),Vector[row]([i*ha,b,c,d,rhs(sol[8])])))
end do

end do

end do
end do;
time()-t0;

interface(rtablesize=infinity);

 

A;

 

Thanks

Please Wait...