## 2448 Reputation

13 years, 330 days

## Branch cuts...

Yes, there is a branch cuts issue. While:

```> r:=int( 1/(z+sqrt(z)),z);
1/2
r := ln(z - 1) + 2 arctanh(z   )
```

has branch cuts along all the real axis, `s:=2*ln(1+sqrt(z))` has a branch cut only on the negative real axis. Now, the complex derivative is not defined on the set of branch cuts/points B. Hence, both primitive functions check OK, but only in C minus B, the interior of its definition domain, where B={Im(z)=0} for r and B={Im(z)=0, Re(z)<=0} for s. In this sense, the result provided by Mathematica seems better, as its definition domain is larger.

## with dividend...

The command dividend is quite handy for these kind of transformations, e.g.:

 > dividend(jj,gamma[2]^2,[x->x,factor@`combine/power`@expand]);
 (1)

## regrouping...

In general, sqrt(g/b)<>sqrt(g)/sqrt(b). E.g.:

```sqrt((2)/(-1/3));
(1/2)
I 6
normal(sqrt(2)/sqrt(-1/3));
(1/2)  (1/2)
-I 2      3
```

So, the regrouping would only be valid under some assumptions on g and b, like positive:

```combine(sqrt(g)/sqrt(b)) assuming positive;
(1/2)
/g\
|-|
\b/
```

## timelimit...

Look at ?timelimit . Note, however, the warning:

Note: For efficiency reasons, the timelimit bound is ignored while in built-in routines.

## naming...

Actually, there is an undocumented "trig reduce" in Maple:

```> ex:=sin(x)^2:
> `trig/reduce`(ex);
1/2 - 1/2 cos(2 x)
```

And also a relative:

```> trigsubs(ex);
2
[1 - cos(x) , 1/2 - 1/2 cos(2 x)]
```

## Using a transformation rule...

For instance:

```> r:=a::nonunit(algebraic)^2+b::nonunit(algebraic)=(a+sqrt(-b))*(a-sqrt(-b)):
> L:=DF^2+(3-x)/(16*x^2):
> applyrule(r,L);
/     /  3 - x\1/2\ /     /  3 - x\1/2\
|DF + |- -----|   | |DF - |- -----|   |
|     |      2|   | |     |      2|   |
\     \  16 x /   / \     \  16 x /   /
```

## when this change happened...

The syntax `?index,packages`/`?index[packages]` worked in the CLI until Maple 13. Then for one/two versions it returned an unusable xml version of this help page (the text of a mw worksheet). After that, an error is produced. In the Standard GUI `?index[packages]` worked until Maple 12.

## could it be a bug?...

It looks like that. This integral is being computed by method ftoc, Look at the output of:

```assume(m::integer, n::integer, p::integer, q::integer):
h:=(x,m,n,p,q)->-(1/8*I)*(exp((2*I)*Pi*x)-1)^2*(exp(-(2*I)*Pi*x*(n-q+2))-
exp(-(2*I)*Pi*x*(n-q+1)))/(Pi^3*x*(m-x)*(p-x)):
infolevel[IntegrationTools]:=3:
int(h(x, m, n, p, q), x = -infinity .. infinity);
```

So, let us look at the primitive function:

```F:=int(h(x, m, n, p, q), x);
```

Its expression (omited here), is rather long, involving several exponential integral calls. and its limits return 0:

```> limit(F,x=-infinity);
0
> limit(F,x=infinity);
0
```

The next step is looking whether this primitive function is correct: its derivative wrt x should be (the value of) `h(x, m, n, p, q)`. However, the difference does not simplify to 0. See the long output of:

```f:=diff(F,x):
simplify(f-h(x, m, n, p, q));
```

These results suggest that the primitive function may be wrong.

## Multiple meanings of function...

You are right. There are several different meanings for the word "function", as illustrated by this disambiguation page, and several of them are being used in Maple documentation, frequently inconsistently, without proper distinction. E.g. function as executable routine (aka command), function as a type and function as a mathematical concept (which Maple intends to represent). This is an old problem. It arises because different documentation pieces were written by different authors, in different times and with different naming conventions. And this inconsistency in usage affects to other "Maple-words" as well.

## uncheck Display Examples with 2D Math...

In the help browser menu, uncheck View > Display Examples with 2D Math.

## documented?...

I think that the Euler angles convention used on the plot interface is undocumented

## definition to compute critical points...

It seems to me that the domain is not taken into account. Consider the simpler example:

```> CriticalPoints(ln(x));
[0]
```

And look at this trace:

```> trace(`minimize/solve`):
> CriticalPoints(ln(x));
{--> enter minimize/solve, args = 1/x, [x], [-infinity .. infinity]
division_by_zero = default
fsolseq := proc(exprs)
local tempi;
if type(rhs(op(exprs)), 'specified_rootof') and
is(Im(rhs(op(exprs))) <> 0) = true then return NULL
elif has(tempi, 'I') then return exprs
else return {op([x]) = tempi}
end if
end proc
exprE := 1/x
memory used=1.1MB, alloc=30.3MB, time=0.05
soln := []
_ValuesMayBeLost := _ValuesMayBeLost
<-- exit minimize/solve (now in minimize/tsolve) = }
{--> enter minimize/solve, args = x, [x], [-infinity .. infinity]
division_by_zero = default
fsolseq := proc(exprs)
local tempi;
if type(rhs(op(exprs)), 'specified_rootof') and
is(Im(rhs(op(exprs))) <> 0) = true then return NULL
elif has(tempi, 'I') then return exprs
else return {op([x]) = tempi}
end if
end proc
exprE := x
soln := [{x = 0}]
_ValuesMayBeLost := _ValuesMayBeLost
<-- exit minimize/solve (now in minimize/tsolve) = {x = 0}}
[0]
```

It looks like the domain is taken as -infinity .. infinity.

More generally, Maple (as well as other CAS) does not have a good, standarized representation of the domain of a mathematical function.

It depends on the real case. If you have a sum of terms and you want the leading term of an expansion in powers of q for each, then you may try something like:

```> map(MultiSeries:-LeadingTerm,expr,q);
B b q + A a
```

## regression bug...

It works as expected in Maple 9.03:

```> k:= Vector[column]([W, (1/3)*W, (1/3)*W, (1/3)*W]):
> sort(k, (a,b)->is(a>b));
[W/3]
[   ]
[W/3]
[   ]
[W/3]
[   ]
[ W ]
```

But not in Maple 9.52 and later.

## by parts...

You may try also:

```> J:=Int(diff(w(s),s,s),s=0..L):
> (value@IntegrationTools:-Parts)(J,1,diff(w(s),s));
/d      \
-D(w)(0) + |-- w(L)|
\dL     /
```
 First 12 13 14 15 16 17 18 Last Page 14 of 29
﻿