Preben Alsholm

13733 Reputation

22 Badges

20 years, 258 days

MaplePrimes Activity


These are replies submitted by Preben Alsholm

@jonlg The command

Eigenvalues(Jacobevals[2]);

should find the eigenvalues of the jacobian for the second steady state before parameters are inserted. It fails as you will notice with:

Error, (in LinearAlgebra:-Eigenvalues) expecting either Matrices of rationals, rational functions, radical functions, algebraic numbers, or algebraic functions, or Matrices of complex(numeric) values


Thus obviously this command fails too:
ev := Eigenvalues~(Jacobevals);

That command would have computed eigenvalues for all the steady states before parameters are inserted.

Thus you should insert parameters before computing eigenvalues.

You create plots one at a time, but that certainly doesn't mean that you cannot do it rather automatically.


What I would do is to write a procedure p, which takes as input a (phi, theta) pair and outputs the quantities you want corresponding to those concrete values. When that functions, i.e. when e.g. p(0.5,5); produces the quantities you want correctly, then you just have to decide how to store the results and how to go though different inputs. Using loops or seq seems easy.

eq21,eq22:=selectremove(has,eq2,Z);

@Kitonum I think the exercise consists of changing Max without using max.

I executed your worksheet in Maple 18.02 and at the end I got the result 8.998575612 from the command poleR(3, .2);

For both files the pdsolve(pde) works without problem on my machine.

@digerdiga The error message means that the procedure `DEtools/convertsys`cannot isolate the derivative of highest order (here just 1) uniquely.

This results in 2 solutions:

solve(ode,diff(x(t),t));

You may try:

debug(`DEtools/convertsys`);
DEtools[convertsys](ode,{x(0)=0},x,t);

#You may continue with examining the two different roots of solve:
undebug(`DEtools/convertsys`);
ode1,ode2:=op(op~([solve(ode,{diff(x(t),t)})]));
res1:=dsolve({ode1, x(0) = 0}, x(t), numeric);
res2:=dsolve({ode2, x(0) = 0}, x(t), numeric);
plots:-odeplot(res1,[t,x(t)],-1.1..1);
plots:-odeplot(res2,[t,x(t)],-5..5);
#####################
#You can specify the derivative at zero:
subs(t=0,x(0)=0,convert(ode,D)): %;
#Thus either D(x)(0) must be sqrt(29) or -sqrt(29).
#Now ask explicitly for a DAE method:
res:=dsolve({ode,x(0)=0,D(x)(0)=sqrt(29)},numeric,method=rkf45_dae);
plots:-odeplot(res,[t,x(t)],-1..1);

#Clearly what happens is that ode is differentiated and then the resulting second order equation is solved, as in:
odeSec:=diff(ode,t);
resSec:=dsolve({odeSec,x(0)=0,D(x)(0)=sqrt(29)},numeric);
plots:-odeplot(resSec,[t,x(t)],-1..1);


@Konstantin@ The limits of the interior integral are certainly allowed to be dependent on the integration variable of the outer integral (i.e. x).

How did you get that ymax?
ymax:=arctan(300*cos(x)+sqrt(12.25-90000*sin(x)^2));

Since x = 0..Pi the square root surely returns an imaginary result on almost the whole interval.

From looking at the result of int(f1,y) I think that your only chance for a result is numerical integration. However, you have to rethink ymax.

An example with ymax=sin(x) (nothing like yours):

Doubleint(f1,y=ymin..sin(x),x=xmin..xmax);
evalf(%);

@DimB I just get {0}:

restart;

ode1 := diff(W1(x),[x$2])+diff(gamma1(x),x)-2*g^2*W1(x) = 0;
ode2 := diff(gamma1(x),[x$2])-b*gamma1(x)-b*(diff(W1(x),x)) = 0;
ode3 := diff(Wb1(x), [x$2])+diff(gammab1(x),x)-2*gb^2*Wb1(x) = 0;
ode4 := diff(gammab1(x),[x$2])-bb*gammab1(x)-bb*diff(Wb1(x),x) = 0;

sysODE := {ode1, ode2, ode3, ode4};
solODE:=dsolve(sysODE);
odetest(solODE,sysODE);

Can you confirm that if you execute my lines above (and only those) in a new worksheet, you get as answer {0} from odetest?

That should be very simple:

subs(Sw=sum(w[k],k=1..n) ,expr);

# or

eval(expr,Sw=sum(w[k],k=1..n));

@Markiyan Hirnyk
Quote "I am somewhat troubled by no reply of you. I believe the perfect gentlemen use to answer the obtained requests."

I hate to have to repeat what I have had to do quite a few times in the past.
Your rude behavior offends me!

I regret now that I actually answered your question before this "No feedback" comment of yours.

@Markiyan Hirnyk I pointed out (what actually showed up in Kitonum's question) that before even calling simplify there was a radical (no pun intended) difference between the output from
expr and expr1 (in Kitonum's question) and from S and S1 in my simplified version.
Where in the first case (expr and S) an important and visible change happened during evaluation, in the second case (expr1 and S1) the expressions were returned seemingly untouched. In fact though, they are not returned unevaluated. sqrt has been replaced by `^`(... , 1/2) as is seen here:

type(S1,specfunc(anything,sqrt));
type(S1,`^`(anything,1/2));
type('sqrt'(4-sqrt(6)),specfunc(anything,sqrt));

My point in other words is that the procedure sqrt does some work on its own. What it does is shown in its procedure definition. I did not try to decipher what happened, but what did happen in the first case was that nested square roots were gone.

@jonlg There is no problem that I can see with the jacobian:

desys := [eq1, eq2]:
vars := [x, y]:
Equilibria:=solve(desys,vars,explicit):
steadyStates := map2(eval, vars, Equilibria):
Df := unapply(VectorCalculus:-Jacobian(desys,vars),vars):
##Example
Df(op(steadyStates[1]));
LinearAlgebra:-Determinant(%);
##
Jacobevals := (Df@op)~(steadyStates):
##Example
eval(Jacobevals,{phi=0.5,theta=5});


Everybody should take a break occasionally in particular around Christmas, but I thought email notifications were automated.
If the machine broke down I guess it takes the vacationing repairman to fix it.
Does he exist?
Is this a result of a new Canadian law disallowing sending anything whatsoever automatically even to people who have subscribed?

An obvious error, yes.

You get the same result by
<<6,8>|<-3,9>|<4,14>>;

First 131 132 133 134 135 136 137 Last Page 133 of 230