Kitonum

21565 Reputation

26 Badges

17 years, 137 days

MaplePrimes Activity


These are replies submitted by Kitonum

@vv  Thank you for your constructive suggestions. Using them  I'll try to rewrite the procedure  IntegerPoints  without   LinearMultivariateSystem  command.

@Markiyan Hirnyk  Thank you for your interest. The reason for the error is  the built-in command  SolveTools[Inequality][LinearMultivariateSystem] which was used in the procedure  IntegerPoints . See the simple example with the same bug:

SolveTools[Inequality][LinearMultivariateSystem]([x[1] > 0, x[2] > 0, x[1]+x[2] < 3], [x[1], x[2]]);

    Error, (in Utilities:-SimpleAnd) invalid input: a string/name list is expected for sort method `lexorder`

 

If you do not use indexed variables, all right:

SolveTools[Inequality][LinearMultivariateSystem]([x1 > 0, x2 > 0, x1+x2 < 3], [x1, x2]);

                             {[{0 < x1, x1 < 3}, {0 < x2, x2 < 3-x1}]}

 

 

@litun  If you are interested in only one real root  in the appropriate range  for each  , use the  fsolve  command.

Details in  Roots1.mw

@vv  

restart;

rsolve(f(n+1)=f(n)+c, f(n));

                                                          f(0)-c+c*(n+1)

@mskalsi  Perhaps this is a bug. We see that the result depends on name of a variable:

simplify(diff(u(x,t), x,t), {diff(u(x,t), x) = 0});

simplify(diff(u(x,y), x,y), {diff(u(x,y), x) = 0});

                                  diff(u(x,t),t,x)

                                           0

 

@Markiyan Hirnyk  The code works under these refinements.

@Markiyan Hirnyk  

simplify(diff(u, y), {diff(u, x) = 0});

                                 0

You wrote  "another root  that i known, are : 0.165237712988657e-1    and     .103583272213766    and    .290071279318035"

See

plot(g, x = 0 .. .4);

                                     

 

 

 

@vv  You wrote  "In the "exterior" of this hyperbola, the solution is on a curve (also a hyperbola)". But 

{x=(-4*y-6)/(y+2), y=y}  is the same hyperbola. 

@nm  When the  unapply  command is called, there is an immediate calculation, and if  ->  command is called, then the calculation is delayed.

Here is an example:

f:=unapply(int(x^2, x=0..a),a);

g:=a->int(x^2, x=0..a);

                          

 

f(2);

g(2);

                                       

Addition: Here an example where the first command works, and the second command does not work: 

f:=unapply(rsolve({u(n+1)=u(n)+2, u(1)=1}, u(n)), n);

g:=n->rsolve({u(n+1)=u(n)+2, u(1)=1}, u(n));

f(3);

g(3);

 

The reason is obvious - the premature calculation.

 

 

@Bendesarts  Here is the correction my previous plotting (I did not notice that the lines at the zeros of the function to be built only in the points of increasing of the function) . I also added vertical lines at points of extreme.

restart;

v := t->H*sin(w*t):

L := 0.080: H := 0.020: Vf := 0.3: w := 10:

zeros1 := sort([RootFinding[Analytic](v(t), t, re = .5 .. 2, im = -1 .. 1)]):
zeros10 := select(t->D(v)(t)>0, zeros1);

zeros2 := sort([RootFinding[Analytic]((D(v))(t), t, re = .5 .. 2, im = -1 .. 1)]):
zeros20 := selectremove(t->D[1, 1](v)(t) < 0, zeros2);

plot([v(t), seq([zeros10[k], t, t = -0.01 .. 0.01], k = 1 .. 3), seq([zeros20[1, k], y, y = v(zeros20[1, k])-0.01 .. v(zeros20[1, k])+0.01], k = 1 .. 2), seq([zeros20[2, k], y, y = v(zeros20[2, k])-0.01 .. v(zeros20[2, k])+0.01], k = 1 .. 2)], t = 0.5 .. 2, color = [black, yellow$3, red$2, blue$2], linestyle = [1, 3$7], thickness = [1, 2$7]);

     

 

 

 

@Rouben Rostamian   Examples in the help and my own experiments with  Basis  command confirmed it (remember that the initial rows are assumed to be linearly independent). Of course if you need to be sure absolutely, it's necessary to study the source code of  Basis  procedure.

Addition: of course, the addition of linearly independent unit vectors to the initial rows can be done without  Basis command, if first we apply  LinearAlgebra[GaussianElimination]  or  LinearAlgebra[ReducedRowEchelonForm]  commands.

 

@shzan  I am busy now. My answer to your question later today.

@shzan   First apply  LinearAlgebra[GaussianElimination]  command.

@H-R  Replace  2*Pi  to  6.28  in the code .  I do not know the cause of the error

First 84 85 86 87 88 89 90 Last Page 86 of 133