nm

12043 Reputation

20 Badges

13 years, 204 days

MaplePrimes Activity


These are questions asked by nm

Noticed something strange.  When I type

restart;
F:=x-> (x^4+3*x^3-3*x^2-2*x-24)/(x^4-4*x^3-13*x^2+62*x-56);
u:=x->piecewise(x=-4,limit(F(x),x=-4),true,F(x));
u(-4);

Gives Error, (in F) numeric exception: division by zero which means it did not hit the first condition x=-4

But when I write this

restart;
F:=x-> (x^4+3*x^3-3*x^2-2*x-24)/(x^4-4*x^3-13*x^2+62*x-56);
A:=limit(F(x),x=-4);
u:=x->piecewise(x=-4,A,true,F(x));
u(-4)

Now it gives expected result 15/47

To avoid defining many variables, like A above, I'd like to just write the  limit inside.

Is there a way to make Maple accept the limit inside piecewise as written above? i.e. have it evaluate to 15/47?

Help says "The piecewise function evaluates its arguments on an as-needed basis."

Not sure what this means.

I tried adding eval, as in 

u:=x->piecewise(x=-4,eval(limit(F(x),x=-4)),true,F(x));

But this did nothing

Maple 2025.2

 

Should not the following two commands produce same solution?

f:=x->(x^2+3*x-4)*cos(x^2+3*x-5);
PDEtools:-Solve({f(x)=0,0<x,x<2},x);
solve({f(x)=0,0<x,x<2},x);

This is what the result looks like

Why Solve gives one solution and solve gives 2? Is this expected or a bug?

btw, the solution from solve is also not complete. There are 5 roots not 2.

Student:-Calculus1:-Roots(f(x),x=0..2);

 

Why when going to user pages and clicking to see the next page, Mapleprimes gives

https://mapleprimes.com/users/?page=2

This happens for each page after the first one which shows OK.

Do others see this also?

I do not use table data struct in Maple and could not find anything in help on how to do this.

given a table T such as the following, typing indices(T) shows there are more than entry in each index

indices(T)

[[-0.687272727272727, -0.687272727272727, 1.],   [2.25818181818182, 2.25818181818182, 1.]], 

  [[-2.47, -1.47, 2.], [0.53, 1.53, 2.]], 

  [[0.245, -2.755, -2.], [2.745, -0.255, -2.]], 

  [[-2.6, -0.6, 3.], [0.379, 2.379, 3.]], 

  [[2.659, -1.341, -3.], [4.652, 0.652000000000001, -3.]], 

  [[-3.178, 0.822000000000001, 5.], [-1.185, 2.815, 5.]], 

  [[0.0672727272727271, -0.932727272727273, 0.], [3.06181818181818, 2.06181818181818, 0.]], 

  [[2.8895, -2.1105, -4.], [4.3895, -0.6105, -4.]], 

  [[1.01, -0.99, -1.], [4.02571428571429, 2.02571428571429, -1.]], 

  [[-3.63, -0.63, 4.], [-1.13875, 1.86125, 4.]]

In the above each entry in table has 2 indices. I want to keep only the first index in each entry so that it has only one, to become this

[[-0.687272727272727, -0.687272727272727, 1.]], 

[[-2.47, -1.47, 2.]], 

[[0.245, -2.755, -2.]],

 [[-2.6, -0.6, 3.]], 

[[2.659, -1.341, -3.]],

 [[-3.178, 0.822000000000001, 5.]],

 [[0.0672727272727271, -0.932727272727273, 0.]], 

[[2.8895, -2.1105, -4.]], 

[[1.01, -0.99, -1.]], 

[[-3.63, -0.63, 4.]]

And keep everything else as in in the Table. Just need to adjust the indices to be one entry instead of 2 or more.

Here is an example of such table


T:=table([([-.687272727272727, -.687272727272727, 1.], [2.25818181818182, 2.258181\
81818182, 1.])=COLOR(RGB,.63529412,.60392157,.60000000),([-2.47, -1.47, 2.], [.\
53, 1.53, 2.])=COLOR(RGB,.60784314,.47450980,.46274510),([.245, -2.755, -2.], [
2.745, -.255, -2.])=COLOR(RGB,.44705882,.52549020,.67058824),([-2.6, -.6, 3.],
[.379, 2.379, 3.])=COLOR(RGB,.57647059,.34509804,.32549020),([2.659, -1.341, -3\
.], [4.652, .652000000000001, -3.])=COLOR(RGB,.34901961,.46666667,.70980392),([
-3.178, .822000000000001, 5.], [-1.185, 2.815, 5.])=COLOR(RGB,.47058824,0.,.\
54901961e-1),([.672727272727271e-1, -.932727272727273, 0.], [3.06181818181818,
2.06181818181818, 0.])=COLOR(RGB,.62352941,.63529412,.65490196),([2.8895, -2.11\
05, -4.], [4.3895, -.6105, -4.])=COLOR(RGB,.22745098,.40392157,.78039216),([1.0\
1, -.99, -1.], [4.02571428571429, 2.02571428571429, -1.])=COLOR(RGB,.53725490,.\
57647059,.65490196),([-3.63, -.63, 4.], [-1.13875, 1.86125, 4.])=COLOR(RGB,.537\
25490,.20392157,.18823529)])

Is it possible to do this in code?

Maple 2025.2

I am not able to find place in help which lists which changes interface(typesetting = extended); makes compared to interface(typesetting = standard);

Reason  I am asking, is that in interface(typesetting = extended); Maple adds a small annoying "dot"  between each term for multiplication, which is not there in standard.

Is there a place in documentation that mentions this as part of extended? Where to find it?

1 2 3 4 5 6 7 Last Page 1 of 212