vv

14027 Reputation

20 Badges

10 years, 44 days

MaplePrimes Activity


These are replies submitted by vv

@Carl Love 

However I think that such an animation could be possible, updating continuously a plot component (the compiled step seems to be fast enough for this). I let somone else to try.

Edit. acer already found a simpler solution using Explore.

BTW, the Explore command is now very powerful and probably should be used more often.

@Carl Love 

You are probably right here, but in our situation the order of the enties is not important provided that it is coherent (and it should be).

@Carl Love 

Iterator uses a one-dimensional Array, for which entries is documented. But it works indeed for Vectors too.

@taro 

Just replace beta[1,2]  with beta__12 or other symbol.

Smith form can be used to find ker(A) in all cases.
An example:

A := Matrix([[1,2*p,2*p^2+2*p],[1,6*p,6*p^2+6*p],[1,2,p]]):
S := SmithForm(A); 

(U,V):=SmithForm(A, p, output=['U', 'V']):   #U.A.V=S
# if p^2+2*p<>0 then X=0
# if p^2+2*p=0, ker(A.V) is generated by
K:=<0,0,1>;
# so, ker(A) is generated by
X0:=V.K;


# Check:
A.X0;  #  = 0  (since p^2+2*p=0)




@logiaco 

@logiaco 

I would suggest to solve by hand this concrete example and show us how the result should be returned by Maple.
Note that you want only nontrivial solutions, so you may consider Determinant(A)=0.

@Carl Love 

1. I'd like to know why did you use depends? Why not simply
B::And(list, satisfies(B-> nops(B)=nops(A)))

2. Is the newer satisfies more efficient than the classical if?
Bij:=proc(A::list,B::list)
if nops(A)<>nops(B) then error "The lists must have same dims" fi;
seq(zip(`[]`, A, convert(b,list)),  b=Iterator:-Permute(B))
end;

3. In the previous Bij procedure, the variable b was not declared local.
It should be local but type(b,`local`) gives false and type(b,`global`) also false. Why?
Edit. Ok, it should be type('b',`local`) , type('b',`global`)  and ==> false and true
but even if global,  a global variable b at top level seems to be not affected.
(I.e. b seems to be still local, but type sees the global variable, since it is not declared explicitely. Is it so?)

 

@robin1234 

It is an ad-hoc shooting method. Because the condition f(1/2)=1/2 is not viable (de ODE is not defined for f(b)=b), | f(1/2)-1/2 | was minimized.

If you have other parameters, just include them in the list parameters (see also my first answer).

PS. Maybe a more natural approach (with the same result) would be:

eqx:=diff(f(b),b,b) = -(1/2)*(6*(diff(f(b), b))*f(b)-8*b*(diff(f(b), b))-2*f(b)+diff(f(b),b)+2)*(diff(f(b),b))/((-b+f(b))*(-1+f(b))):
ic:=f(3/8)=0, D(f)(3/8)=d:
s:=dsolve({eqx,ic},numeric, output=listprocedure, parameters=[d]):
fb:=subs(s,f(b)): #Procedure to evaluate f(b)
bdr:=proc(u) s(parameters=[u]); (fb(1/2)-1/2)^2 end:  # minimize  | f(1/2)-1/2 |
Opt:=Optimization:-NLPSolve(bdr, 2..3);   P:=Opt[2][1];
s(parameters=[P]);

@Markiyan Hirnyk 

I simply don't undertand your position and the double moral stuff. The situation in your link is completely different.
As for the "western" part, I think that we live at almost the same longitude (I am in Romania).

@aamirkhan 

You probably forgot to replace L with K in T10.

(because L is a table; K is the scalar now).

P1x.mw

I would not say that using allvalues is necessarily better, unless the user knows exactly what happens in such situations. So, the equation exp(x) = x^2-2 has an infinity of (complex) solutions and solve gives all of them as a RootOf. But allvalues returns only 5 roots as explicit RootOfs.

@Markiyan Hirnyk 

@John Fredsted 

D is a procedure.
D(f):=g  or  D[1](f):=h  fills its remember table.

Maybe, but it's correct, isn't it? After all, it is only a workaround.

@John Fredsted 

I used the argument x only to be able to convert via convert(...,diff), as a workaround.
If you have no arguments, you can use the woekaround:
e := (D[1]@D[1])(f);
unapply(convert(e(x),diff),x);
    (D@@2)(f)

@John Fredsted 

First 148 149 150 151 152 153 154 Last Page 150 of 177