Preben Alsholm

13728 Reputation

22 Badges

20 years, 247 days

MaplePrimes Activity


These are replies submitted by Preben Alsholm

@9009134 Sorry, I have no ideas. Maybe this problem simply doesn't have a nontrivial solution, here meant as a solution for which also F,K,Omega, besides theta, are nonzero in the interior of the interval.

You write " The objective is y2 at t =1." and yet you have z2:=sol1(0.5);
Shouldn't that be z2:=sol1(1);  or am I misunderstanding something?
This is surely irrelevant for the question you pose, but confuses me.
##
I think I got it: You are resetting the clock and starting anew, so the new time just has to run 0.5 for the total time to be 1.
I tried this piecewise version which, however, doesn't improve Hesse.
 

sysp:=diff(y1(t),t)=-piecewise(t<=0.5,u1+u1^2/2,u2+u2^2/2)*y1(t),
           diff(y2(t),t)=piecewise(t<=0.5,u1,u2)*y1(t);
res:=dsolve({sysp,y1(0)=1,y2(0)=0},numeric,parameters=[u1,u2],output=listprocedure);
Y2:=subs(res,y2(t));
obj4:=proc(u1,u2) 
   res(parameters=[u1,u2]);
   -Y2(1)
end proc;

 

@9009134 My doubts about the solution were expressed in my comment above:
http://www.mapleprimes.com/questions/218706-Error-in-Dsolvenumericbvp-Singularity#comment232672

entitled "Plot, approxsoln, and is it a solution?".

## It may be worth while mentioning that the result of this test:

odetest({F(eta)=0,K(eta)=0,theta(eta)=1-eta,Omega(eta)=0},SYS);

is  {0}, which means that the solution given, i.e. {F(eta)=0,K(eta)=0,theta(eta)=1-eta,Omega(eta)=0} is in fact a solution to SYS according to odetest. We should, however, remember the troublesome denominators K(eta) and Omega(eta).

@9009134 Since I'm not at all convinced about the "solution" found in the first case, I found it hard to summon interest for the second, I must admit. No reason to consider new parameters that also give problems, when you haven't successfully solved the first case.

@torabi I believe that there is no positive minimum.
Consider again the example I gave above.
I have modified it to fit your situation better:
 

restart;
ode:=diff(y(x),x,x)-omega2=0; #-1.2345 changed to 1 for convenience 

for b in [seq(10^(-n),n=0..10)] do
  res:=dsolve({ode,y(0)=0,y(1)=0,D(y)(1)=b},numeric);
  print(subs(res(0),omega2))
end do:
##Basically what goes on in the numerical solution with a parameter to be determined (here omega2) is this:
ode1:=subs(omega2=omega2(x),ode);
ode2:=diff(omega2(x),x)=0;
b:='b':
dsolve({ode1,ode2,y(0)=0,y(1)=0,D(y)(1)=b}); 

It is really just enough to look at the output from the exact version at the end:
{omega2(x) = 2*b, y(x) = b*x^2-b*x}
There is clearly no positive minimum for omega2. The nonnegative minimum exists and is 0, but it corresponds to y(x) = 0 for all x in 0..1.
I believe you have the same situation.

The syntax is
int(a(t)*b(t)+2*(diff(a(t), t))*(diff(b(t), t)), t);
But what did you expect to get out of it?

@9009134 I don't quite see the connection of the two equations in the paper to your problem. The equations in the paper are
 

ode1:=diff(f(eta),eta$3)+1/Pr*(3*f(eta)*diff(f(eta),eta,eta)-2*diff(f(eta),eta)^2)+1=0;
ode2:=diff(theta(eta),eta,eta)+3*f(eta)*diff(theta(eta),eta)=0;
bcs:=f(0)=0,D(f)(0)=0,(D@@2)(f)(etad)=0,theta(0)=1,theta(etad)=0;

Your system has F, K, Omega, and theta with orders 3, 2, 2, and 2, respectively.

Is there any relationship between f and theta above and F,K,Omega, and theta in your system? If so, what is it?

The system in the paper is easily solved numerically at least in this case (etad=1,Pr=7):

restart;
ode1:=diff(f(eta),eta$3)+1/Pr*(3*f(eta)*diff(f(eta),eta,eta)-2*diff(f(eta),eta)^2)+1=0;
ode2:=diff(theta(eta),eta,eta)+3*f(eta)*diff(theta(eta),eta)=0;
bcs:=f(0)=0,D(f)(0)=0,(D@@2)(f)(etad)=0,theta(0)=1,theta(etad)=0;
res:=dsolve(eval({ode1,ode2,bcs},{etad=1,Pr=7}),numeric);
plots:-odeplot(res,[[eta,diff(f(eta),eta)],[eta,theta(eta)]]);

 

@J4James Whether you are using one program or the other the dependence on f0 is quite apparent.
Here in Maple:
 

restart;
ode1:=diff(f(x), x,x)+(f(x)+g(x))*diff(f(x),x)=0;
ode2:=diff(g(x), x,x)+(f(x)+g(x))*diff(g(x),x)=0;
ics:=f(0)=f0,g(0)=1-f0,D(f)(0) =0,D(g)(0) =1;
res:=dsolve({ode1,ode2,ics},numeric,parameters=[f0]);
p:=proc(f0) res(parameters=[f0]);
   plots:-odeplot(res,[[x,f(x)],[x,g(x)]],0..5)
end proc; 
plots:-animate(p,[f0],f0=-1..1);

 

If you happen to be only interested in h(x)=f(x)+g(x), then it is a different matter, but then why all this complication? Because then you only have one ode:
 

simplify(eval(ode1+ode2,f(x)=h(x)-g(x)));

This ode is second order in h and you just need two initial conditions for h:

h(0)=1, D(h)(0)=1.
 

@J4James To answer your two questions:

1. You can (in principle, but there may be numerical problems) choose any value for f0 you like including of course negative values.
2. If you are only going to use one or very few different values of f0, then it won't make much of a difference, but if you are going to find the solution for many values of f0, then using the parameters option is much more efficient.

I wonder though, what kind of physical, chemical, or whatever, setup you have, where it doesn't matter which value f0 has. The system you gave us is a trivial example of a more complicated one, I understand. But I wonder why there is such an indifference in your baby example. Is that present in the complicated one as well?

@shakuntala nops(m,n,p) is never valid syntax in Maple since nops only takes one argument, and you are giving it 3.
You have an unfinished sentence:
"... if it is not then how can we represent "
What did you want to represent?

@jessica99 I did this in Maple 8.00:

V:=A*exp(-b*abs(r)^1.5)*abs(r)^a;
H:=R0+R1*abs(sin(c*theta/2))^d;
Vp:=1+r^2*A1*sin(p*theta);
params:=[a=0.5,b=0.15,A=2,c=5,d=0.5,R0=0.5,R1=0.5,p=15,A1=0.05];
plot3d(eval([H*r*cos(theta),H*r*sin(theta),V+Vp],params),theta=0..2*Pi,r=-1..1,style=patchnogrid);

@J4James 4 conditions cannot be written as 3. That way you might as well have added all your ics as in this:
f(0)+g(0)+D(f)(0) +D(g)(0) =2;

which is ludicrous.
If you want to find all the different solutions satisfying f(0)+g(0)=1, you could use
ics:= f(0) = f0, g(0)= 1-f0, D(f)(0)=0, D(g)(0)=1;

and then use the parameters option in dsolve/numeric, parameters=[f0] .

@Parham2016 I looked at what you say is the solution found by Matlab. I see an infinite series plus an O(epsilon) term. What is epsilon, and why is that then a solution since presumably the O-term has the usual meaning?
Is some epsilon-approximation going on, and if so how?

@das1404 I just checked the suggestion made by Tom Leslie in Maple 8.
RegMatch exists and the commands work there. I don't have Maple 7 on this computer, but it may work there too.
 

@Kitonum In recent versions of Maple dsolve accepts vector equations; no need for conversion:
 

restart;
x:=<x1(t), x2(t)>;
A:=<1,1; 1,-1>;
##
sys:=diff~(x,t)=A.x; #Not =~
##
ic:=eval(x,t=0)=<1, -1>; # Not =~

dsolve({sys,ic});

 

First 73 74 75 76 77 78 79 Last Page 75 of 230