Preben Alsholm

MaplePrimes Activity


These are replies submitted by Preben Alsholm

@Markiyan Hirnyk You have a totally different equation, but OK.
Now the "delay" is given by t-tau = y(t)+1, thus tau = t-y(t)-1. Therefore tau < 0 at least for t=0, where tau = 0-0.5-1 = -1.5 < 0, i.e. tau is NOT a delay.
The facility for doing delay differential equations was written with the understanding that the delay must be just that, a delay.

@Markiyan Hirnyk Since the delay tau is given by y(x)-2=x-tau, we have (as also stated in the question posed) tau = x-y(x)+2, which certainly will be considered a variable delay.

@Carl Love Considering that the presumably much simpler system odesys3 obtained from odesys by replacing exp by 1, the sigmas by 0, and all floats by their signs is difficult (if not impossible?) I would think it is a waste of time to let this run for days:

odesys2:=eval({odesys},{:-exp=1,sigma[1,1]=0,sigma[1,2]=0});
odesys3:=evalindets(odesys2,float,signum);
:-dsolve(odesys3);

The systems are quadratic in the y's. Even for a quadratic system in 2 dependent variables solution is not trivial.



@acer It may boil down to automatic simplification in one case and not another:
restart;
0.1*(0.4*eta+1); #Automatically simplified
0.1*(0.4*eta+1)*(2-x); #Not so
0.1*(0.4*eta+1)*(2-x)/(0.1*(0.4*eta+1)); #Consequently no cancellation

#Mimicking to some degree what is going on in isolate which uses `isolate/isolate1`:
restart;
eq:=.4*eta-0.8e-1+(.1*(.4*eta+1))*(2-x)=0;
EQ:=subs(x=_XX,eq);
EQ1:=EQ:
to 10 do EQ1:=`isolate/isolate1`(EQ1) end do;
isolate(EQ,_XX,10); #10 iterations instead of 100000


@acer A strange coincidence. I sent an SCR giving the very same example yesterday.

@emmantop The way I usually do it is to use debug (aka trace)as in
debug(`dsolve/numeric/bvp/convertsys`);
#To stop debugging use undebug:
undebug(`dsolve/numeric/bvp/convertsys`);
#Also taking a look at the procedure is a good idea. Here one can use showstat:
showstat(`dsolve/numeric/bvp/convertsys`);

These facilities (debug and showstat) have been around forever.

##############
Having found the problem: that it lies with the use of isolate (instead of solve), it is tempting to try to replace `dsn/solve` with a version where isolate is replaced with solve:

`dsn/solve`:=subs(isolate=(proc(eq,var) solve(eq,{var})[1] end proc),eval(`dsn/solve`));

After that `dsolve/numeric/bvp/convertsys` will work fine on the problem we have, and so dsolve(....) should work too.
However, I think it is wiser to stick with one of the workarounds.

It is interesting that the help page for isolate says:
"For direct solutions of equations, solve may be more efficient than isolate, which is intended, primarily, for use in an interactive Maple session".
But isolate has the advantage of being a much less complicated procedure than solve.


@Alejandro Jakubi If we assume that x>0 it suffices to use Parts:

restart;
with(IntegrationTools):
J:=Int(ln(1+sqrt((x+1)/x)),x):
J1:=Parts(J,ln(1+sqrt((x+1)/x)));
simplify(J1) assuming x>0;
value(%);


@jjcp You are not doing anything wrong, but if you only carry 4 digits in a complex computation it is not surprising  ( or rather it should be expected) that the result obtained is not the same as the one obtained by rounding to 4 digits a result computed carrying 10 digits.

Could you explain why you are asking?

After all what does it mean to set Digits to 4 or 10 (the default)? Surely you know of rounding?

In case the point is that not even the first 4 digits in the first result are all correct then remember that setting Digits to 4 does not guarantee 4 correct significant digits in the result.

Trivial example:
Digits:=10:
evalf(Pi)-3.14159;
evalf(Pi-3.14159); #Same result, but the point is that there are only 4 significant digits, not 10


@Carl Love I find no visible difference for alpha, but a clear difference for beta.
Also I don't see any difference between method=rkf45_dae and method=rkf45 when using [diff(eq1, t), eq2, CI].
The reason for the latter must be that we got two second order equations for which the second derivatives can be isolated and we have the necessary initial conditions in CI. I guess then that rkf45_dae simply uses rkf45.

At this moment it is not clear to me why the solutions for alpha seem to be the very same. My eq3 contains alpha only, not beta. Thus it can be solved separately if one wishes.

There is no similar situation when using diff(eq1,t), eq2.
###
Looking somewhat closer at the values of alpha they do appear to be different in the two situations as one would expect.


 




@digerdiga In the expression D(x)(x) the first x must be a (mathematical) function (as sin is as opposed to sin(x)).
Thus D(x) is the first derivative of the function x. There is no name attached to the independent variable. Why should there be, and how could there be?  It would be irrelevant in any case.

D(x)(x) then is the derivative of the (not defined) function x applied to the variable name x which happens to be the same as the name of the function. This is obviously an oddity. With other letters: It is like f ' (f);
It is acceptable in Maple, but clearly does not mean the same as diff(x,x), where the first argument to diff is an expression (presumably, but not necessarily) dependent on the second argument to diff: the variable x. Obviously here, the expression x does depend on x, is in fact x, so the derivative is 1.

@Glowing Have you tried using assuming T1<T2 right after dsolve, as in

dsolve(ode) assuming T1<T2;

There are a couple of issues in addition to tomleslie's point 2.

1. Since z is time pdsolve/numeric will have to solve for diff(r(z,theta),z) one way or the other since the algorithm is time based. However, that could be a problem as you see by looking at the RootOf result here:
solve(PDE,{diff(r(z,theta),z)});
The result is RootOf of a polynomial of degree 8. Thus if for given numerical values there is a real root there is certainly at least one more, and of course there need not be a real root.
2. Replace epsilon by epsilon:=evalf(epsilon); The reason is that a test similar to the following is performed:
if sqrt(2)>1 then "yes" else "no" end if; #Try it!

@tomleslie It is usually the case that Maple treats an expression expr supposed to be an equation expr=0 as exactly that,

thus for e.g.
solve(x^2-2, x);
fsolve(x^2-2,x);
dsolve(diff(y(x),x)-y(x) );
pdsolve( diff(u(x,y),x)+diff(u(x,y),y) );
pdsolve(diff(u(x,y),x)+diff(u(x,y),y),{u(x,0)=1,u(0,y)=sin(y)},numeric,time=x,range=0..evalf(Pi));

@alla Do other requests for help work, e.g.

?int

?simplify

?diff

What are the error messages you receive?

First 116 117 118 119 120 121 122 Last Page 118 of 231