J4James

355 Reputation

12 Badges

12 years, 346 days

MaplePrimes Activity


These are questions asked by J4James

Hello every one,

restart;with(stats):

with(stats[statplots]):
with(plots):

x1_values:=[0.1, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80];

x2_values:=[1, 2, 3, 4, 5, 6, 7, 8];

x3_values:=[11, 12, 13, 14, 15, 16, 17, 18];

x4_values:=[10, 20, 30, 40, 50, 60, 70, 80];

y_values:=[30, 40, 60, 70, 90, 120, 150, 200];

How to fit the above data into the following equation

y=a+b*x1+c*x2+d*x3+e*x4+f*x1^2+g*x2^2+h*x3^2+i*x4^2+j*x1*x2+k*x1*x3+l*x1*x4

+m*x2*x3+n*x2*x4+p*x3*x4;

Thanks

 

 

 

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

Hello everyone, I am trying to solve  a differential equation with one extra boundary condition.

restart:with(plots):

Eq:= diff(f(y),y$3)+f(y)*diff(f(y),y$2)-diff(f(y),y$1)^2-(diff(f(y),y$1)+y/2*diff(f(y),y$2))=0;

bc:=D(f)(0)=1,f(0)=0,(D@@2)(f)(b)=0, f(b)=b/2;

With the arbitrary trial values, the integrated solutions will generally not satisfy the outer boundary conditions.

(D@@2)(f)(b)=0, f(b)=b/2. 

I need find a way to adjust the two trial values such that the numerical solution eventually matched

the required boundary conditions.

 

Thanks

 

Hello everyone,

Here is my question,

restart:with(plots):

Eq:= diff(f(y),y$3)+f(y)*diff(f(y),y$2)-diff(f(y),y$1)^2-S*(diff(f(y),y$1)+y/2*diff(f(y),y$2))=0;

bc:=D(f)(0)=1,f(0)=0,(D@@2)(f)(b)=0, f(b)=S*b/2;

How we can plot b vs S?

 

Thanks

 

I am stuck with an IVP which is

eq1:=diff(y(x),x$2)+2/x*(diff(y(x),x))+y^M=0;

ic:=y(0)=a,D(y)(0)=0;

its quite easy to find the series solution of the ode 

dsolve({eq1, ic}, y(x), series);

y(x)=a-(1/6)*exp(M*ln(a))*x^2+(1/120)*(exp(M*ln(a)))^2*M*x^4/a;

But I am facing problem when I try to solve it numerically,

dsolve(subs(a=1,M=3,{eq1,ic}),numeric);

THanks

First 9 10 11 12 13 14 15 Last Page 11 of 20