## 12915 Reputation

8 years, 356 days

## MaplePrimes Activity

### These are answers submitted by vv

1. use e.g.
# or
evala((x^2 - 2)/(x - sqrt(2)));

2. Example:
A := <124,12; "NA/101", ">2.6"; 1,2>:
AA :=map(u -> `if`(type(u,numeric),u,undefined),  A);

## The assume facility...

The assume facility is far from perfect. You can find many examples searching this site.
It is designed for simple conditions; it has evolved in time but with very small steps. At least here, the result (FAIL) is not wrong.

Note also, that the assume facility often ignores the endpoints in inequalities.
Example:
limit(a^n, n=infinity) assuming a>=1;
infinity

limit(a^n, n=infinity) assuming -1 <=a, a<1;
0

## list of generators...

```restart;
with(GroupTheory):
G:=Symm(4);
GroupOrder(G);
do
H := Subgroup([RandomElement(G),RandomElement(G)], G);
C := Core(H, G);
until is(GroupOrder(C) <> 1) and is(GroupOrder(C) <> GroupOrder(H)):
H;
C;
GroupOrder(C) <> GroupOrder(H);
```

```restart;
with(LinearAlgebra): with(plots):
n:=3:
f:=-x^2 + 2*y^2 + 2*z^2 - 6*x + 4*x*y - 4*x*z - 8*y*z + 4*z - 12:
f:=eval(f, [x=x[1],y=x[2],z=x[3]]);
L:=10:
quad:=implicitplot3d(f, x[1]=-L..L, x[2]=-L..L, x[3]=-L..L, style=surface, scaling=constrained):
A:=VectorCalculus:-Hessian(1/2*f,[seq(x[i],i=1..n)]):
b:=eval(Vector( [ seq(diff(f,x[i]),i=1..n)]), [seq(x[i]=0,i=1..n)]):
c:=eval(f,[seq(x[i]=0,i=1..n)]):
X:=Vector([seq(x[i],i=1..n)]):
solve([ seq(diff(f,x[i]),i=1..n)],{seq(x[i],i=1..n)}); # the center
X0:= Vector[column]( eval([seq(x[i],i=1..n)],%) ):
J,Q:=Eigenvectors(A):
T:=Matrix(GramSchmidt([seq( Q[..,j],j=1..n)],normalized)): # T is orthogonal
fnew:=simplify( (T.X+X0)^+. A. (T.X+X0) + b.(T.X+X0) + c ); # ==> Hyperboloid of Two Sheets
col:=[red,yellow,blue]:
ax:=seq(arrow(X0, T[..,j], length=10, width=0.3, color=col[j]), j=1..n):
display(quad, ax, orientation=[175,63,21], caption="Hyperboloid of Two Sheets");
```

## Yes...

```restart;
f := (x,y)->(x^2+y^2)^x: f(0,0):=1:
'D[1]'(f)(0,0) = limit((f(x,0)-f(0,0))/x, x=0);
'D[2]'(f)(0,0) = limit((f(0,x)-f(0,0))/x, x=0);
```

## IdentifySmallGroup...

G:=GroupTheory:-GaloisGroup(x^5 + 20*x + 32, x);
Gal(x^5+20*x+32,x)
IdentifySmallGroup(G);
10, 1

G has been identified as [n,d] = [10,1],  see ?IdentifySmallGroup

To identify it as a human, just access the wiki page  List of small groups - Wikipedia

==> [10,1]  corresponds to the non-abelian group D10 (i.e. D5 with Maple notation).

## maths...

arctan(x,y) = - arctan(-x,y)  implies for x=0 that arctan(0,y) = 0,
but this is false for y<0.
[I have used your swapped notation x <--> y ]

## seq...

Replace fn:=solve(...)  with

`seq(['q'=q, 'x'=solve(V__out/120 = 1/sqrt((-m*x^2 + m + 1)^2 + (q*(x - 1/x))^2), x, useassumptions)], q in Q__s) assuming x::positive;`

## GroupOrder...

Correct syntax:

`GroupOrder(ds[2]);`

The result is of course 5, because it is generated by a cycle of length 5.

## formal or assuming...

```sum(-5*3^(-k-1)*(x-2)^k, k=0..infinity, formal);

# or, say something about the domain
sum(-5*3^(-k-1)*(x-2)^k, k=0..infinity) assuming abs(x-2)<3;

# Note that tha radius of convergence is R=3.
```

5/(x - 5)

5/(x - 5)

## series or not series...

Not all ODEs have series solutions around 0.
To illustrate the problem, let's modify a bit your second ODE.

```ode1:=x^2*diff(diff(y(x),x),x)+x*diff(y(x),x)+y(x) = 0:
dsolve(ode1);
```

y(x) = _C1 sin(ln(x)) + _C2 cos(ln(x))

MultiSeries:-series(sin(ln(x)), x=0);

-sin(ln(1/x))

```restart;
m:=166571820085905498772938593207359906487315774156514145089564134\
67009247675308229223573508773729914408724747749233779284765414\
62530835296763930087228227919982503096221081674037688617693027\
1167988018683:
for x from isqrt(m) while not issqr(x^2-m) do od:
y:=isqrt(x^2-m):  'm' = (x-y) %* (x+y);
```

m = 4081321110693270343633073697474256143563558458718976746753830538032062222085722974121768604305614359 %* 4081321110693270343633073697474256143563558458719886006565783193342137709249520153612225643475208637

# This works only if the two primes are "very" close. (x is close to sqrt(m).)
x-isqrt(m);
25

## signum...

You must use signum, not sign.(sign is used mainly for polynomials in Maple).

Take the two sub-sequences for which sin(n)>0  and sin(n)<0 [it cannot be 0].
The limits are 11/2 and 25/2, so, R=2/25.

## Iterator...

Using random polynomials there are big chances to have duplicates (there are only 500 such polynomials). So:

```restart;
A:={seq(-2..2)}:  A0:=A minus {0}:
n:=54:
a:=Iterator:-CartesianProduct(A0,A\$3, rank=500-n+1):
```

## Root test...

The radius of convergence needs limsup and root test here.

```a := n -> ((2 + (-1)^n)/(5 - (-1)^n))^n:
an0:=simplify(abs(a(n))^(1/n)) assuming n::even:
R0:=limit(1/an0,n=infinity):
an1:=simplify(abs(a(n))^(1/n)) assuming n::odd:
R1:=limit(1/an1,n=infinity):
R:=min(R0,R1);
```

R := 4/3

 First 11 12 13 14 15 16 17 Last Page 13 of 115
﻿