vv

12453 Reputation

19 Badges

9 years, 286 days

MaplePrimes Activity


These are answers submitted by vv

Replace n:=10^10 by  n:=10.^10

Actually, the problem is about inequalities in solve, in your case

F := 1-(1/2)*t*exp(-(1/2)*t)-exp(-(1/2)*t):
S := solve({F=u, t >=0}, t) assuming u >= 0, u <= 1;

In general, solve is able to manage inequalities only for polynomials (of several variables).
In most other cases, the inequalities are simply ignored. So, here, S = S1, where
S1 := solve({F=u}, t) assuming u >= 0, u <= 1;

 

 

Maple can approximate the integral (you can use evalf), but cannot compute it symbolically because the antiderivative cannot be obtained in termes of Maple functions.
The idea is to use the residue theorem.  In your case:

restart;
f := (a,z) -> z*exp(a*z) / (z^2 + 1)^2:
R:=[singular(f(a,z),z)];
2*Pi*I*add(residue(f(a,z),eq[]), eq=R): simplify(%);

                    R := [{z = -I}, {z = I}]
                         I Pi a sin(a)

(The result is valid for any Jordan curve positively oriented an surrounding the poles).

Find the triangle of minimal area which contains at least  nXYin  points.

 

XY:=ImportMatrix("data.txt",delimiter=" "):

nXY:=op([1,1],XY);

92

(1)

f:=proc(a,b) add(`if`(XY[i,1]/a+XY[i,2]/b-1<0,1,0),i=1..nXY);
end:

amax:=1.; bmax:=4.; M:=100; N:=100;
nXYin:=85; # minimal number of points in the triangle

1.

 

4.

 

100

 

100

 

85

(2)

A:=Matrix( M,N, (i,j) -> `if`(f(i/M*amax, j/N*bmax)<nXYin, 1e30,  i*j)):

a0,b0 := min[index](A) *~ (amax/M, bmax/N);

.5900000000, 2.160000000

(3)

plots:-display(plots:-pointplot(XY), plot(b0*(1-x/a0),x=0..a0));

 

 

 

 

See wiki.

stp:=L -> [seq([L[i], L[i]+~L[i+1]][], i=1..nops(L)-1), L[-1]]:
L2f:=u -> `if`(u[2]=0,infinity,u[1]/u[2]):
Brocot:= n -> L2f~((stp@@n)([[0,1],[1,0]])): 

Vector([seq(B||n = Brocot(n),n=0..5)]);

(You may want 1/`0` instead of infinity).

BesselJ(3+1/2, x) simplifies to an elementary expression

and catastrophic cancellation occurs for small x.

For BesselJ(3.5, x) a numeric approximation is used and the the loss of significance is taken into account by the algorithm.

You can increase Digits.

The problem is that you use the variable Zeta which is actually a (celebrated) Maple function.
Change its name to ZETA.

Ec := (Ems+I*Eml)*(1+((Ems+I*Eml)/Ef-1)*Zeta*phi/((Ems+I*Eml)/Ef+Zeta))/(1-((Ems+I*Eml)/Ef-1)*phi/((Ems+I*Eml)/Ef+Zeta)):
EC:=eval(Ec,Zeta=ZETA):
simplify(evalc([Re,Im](EC)));


 

Do not use [...] for grouping in expressions; they are reserved for lists.
Do not use floats in symbolic computations.

restart;
f:=1/(exp((-1+(1-4*epsilon)^(0.5))/(2*epsilon))-exp((-1-(1-4*epsilon)^(0.5))/(2*epsilon)))*(exp((-1+(1-4*epsilon)^(0.5))/(2*epsilon)*t)-exp((-1-(1-4*epsilon)^(0.5))/(2*epsilon)*t))/(exp(1-t)-exp(1-t/(epsilon))):
g:=convert(f, rational);

simplify(limit(g, epsilon=0, right)) assuming t>0;
                               1
simplify(limit(g, epsilon=0, left)) assuming t>0;
                               0
simplify(limit(g, epsilon=0)) assuming t>0;
                           undefined

So, for t>0 your function has distinct side-limits. (For t=0 the function is not defined).

 

sol:=RootOf((8*n-8)*_Z^6+(n^4+36*n^2-68*n+56)*_Z^5+(n^5+10*n^4+80*n^3-200*n^2+224*n-152)*_Z^4+(n^6+28*n^5+69*n^4-268*n^3+468*n^2-356*n+200)*_Z^3+(3*n^7+32*n^6+7*n^5-204*n^4+380*n^3-544*n^2+272*n-128)*_Z^2+(3*n^8+14*n^7-20*n^6-32*n^5+252*n^4-240*n^3+304*n^2-80*n+32)*_Z-n^9-12*n^8-44*n^7-40*n^6-4*n^5-128*n^4+48*n^3-64*n^2);

RootOf((8*n-8)*_Z^6+(n^4+36*n^2-68*n+56)*_Z^5+(n^5+10*n^4+80*n^3-200*n^2+224*n-152)*_Z^4+(n^6+28*n^5+69*n^4-268*n^3+468*n^2-356*n+200)*_Z^3+(3*n^7+32*n^6+7*n^5-204*n^4+380*n^3-544*n^2+272*n-128)*_Z^2+(3*n^8+14*n^7-20*n^6-32*n^5+252*n^4-240*n^3+304*n^2-80*n+32)*_Z-n^9-12*n^8-44*n^7-40*n^6-4*n^5-128*n^4+48*n^3-64*n^2)

(1)

f:=eval(op(sol), _Z=z);

(8*n-8)*z^6+(n^4+36*n^2-68*n+56)*z^5+(n^5+10*n^4+80*n^3-200*n^2+224*n-152)*z^4+(n^6+28*n^5+69*n^4-268*n^3+468*n^2-356*n+200)*z^3+(3*n^7+32*n^6+7*n^5-204*n^4+380*n^3-544*n^2+272*n-128)*z^2+(3*n^8+14*n^7-20*n^6-32*n^5+252*n^4-240*n^3+304*n^2-80*n+32)*z-n^9-12*n^8-44*n^7-40*n^6-4*n^5-128*n^4+48*n^3-64*n^2

(2)

plots:-implicitplot(f=0, n=1..100, z=0..50, gridrefine = 3);

 

a:=algcurves:-puiseux(f,n=infinity,z,2):

alias(alpha=indets(a,RootOf)[]):
alpha=evalf(alpha);

alpha = .2587353940

(3)

Z:=collect(select(u->(limit(u,n=infinity)>0), a), n)[]; # the wanted asymptotic

alpha*n+(4/599)*alpha^4+(1137/1198)*alpha^3+(1203/599)*alpha^2+(1691/599)*alpha+355/1198+((12546379/2870408)*alpha^4+(19500071/2870408)*alpha^3-(2035499/1435204)*alpha^2-(11446491/2870408)*alpha+1446287/2870408)/n

(4)

plot(Z, n=1..100);

 

 

Download puiseux.mw

SymFun:=proc(f,x)
local s,a_,b_, g;
if is(simplify(diff(f,x))=0) then return 'ConstantFunction' fi;
s:=solve(identity(eval(f,x=a_+x)=eval(f,x=a_-x),x),[a_]);
if s<>[] then return 'VerticalSymmetry'=s[] fi;
s:=solve(identity(eval(f,x=a_-x)+eval(f,x=a_+x)=2*b_,x),[a_,b_]);
if s<>[] then return 'CentralSymmetry'=s[] fi;
# hack
g:=eval(f,x=a_+x)-eval(f,x=a_-x);
s:=solve(limit(g,x=infinity),[a_]);
if s<>[] and is(simplify(g,s[1])=0) then return 'VerticalSymmetry'=s[1] fi;
'NoSymmetry'
end:
SymFun(x^3+a*x^2+b*x+c,x);
     CentralSymmetry = [a_ = -(1/3)*a, b_ = (2/27)*a^3-(1/3)*a*b+c]
SymFun(-abs(2*k-7),k);
     VerticalSymmetry = [a_ = 7/2]
SymFun(1/a-1,a);
     CentralSymmetry = [a_ = 0, b_ = -1]
 

eliminate({s = sum(n/2^k, k=0..p), n/2^p=1}, p):
simplify(solve(%[2],s))[];

              s = -1+2*n

 

 

A point on the unit sphere is determined by the spherical coordinates (th, ph). You can choose any color for this point. E.g.

c := ph+th/16:  # color (HUE)
plot3d(1, th=0..2*Pi, ph=0..Pi, coords=spherical, color=c);

If your vector field is V(r,th,ph), you can take c := LinearAlgebra:-Norm(V(1,th,ph), 2, conjugate=false);

 

Digits:=15:
par:=[lambda1 = 0.733e-1,lambda2 = 5.3344,alpha = 4.8492]:
f := (Z^(lambda2/lambda1))^2*ln(Z)^2/((Z-1+alpha)^2*(Z^(lambda2/lambda1)-1+alpha)^3):
J:=IntegrationTools:-Change(Int(f,Z=1..infinity), Z=z^(lambda1/lambda2)) assuming positive:
evalf(eval(J,par));

           1.15034205858649*10^(-7)  

restart;

f:= x^8+x^7+x^5+x+1

x^8+x^7+x^5+x+1

(1)

n:=8; s:=10;

8

 

10

(2)

r:=rand(1..n^2): rLC:=rand(1..s):

LC:=Vector([seq(1..s)], datatype=integer[8]):

A:=Matrix(n,datatype=integer[8]): for i to s do A(LC[i]):=1 od:

st:=time[real]():
while LinearAlgebra:-Modular:-CharacteristicPolynomial(2,A,x)-f <> 0 do
k:=rLC();
do   m:=r();
until not(member(m,LC));
A(LC[k]):=0; A(m):=1; LC[k]:=m;
od:
time=time[real]()-st; A;

time = 45.756

 

Matrix(%id = 18446744074413263918)

(3)

add(A), LinearAlgebra:-Modular:-CharacteristicPolynomial(2,A,x);  #check

10, x^8+x^7+x^5+x+1

(4)

 

 

Download modular-cp.mw

Maple does not have a predicate logic package.

Sometimes we can use the assume facility  but only for very simple situations.
(For the existence quantifier probably only for a single variable!)
For other situations use solve, isolve, Logic package etc.

 

# Example:  Maple cannot prove Fermat theorem.

coulditbe(x^n + y^n = z^n) assuming x::posint, y::posint,z::posint,n::posint,n>2;  

FAIL

(1)

 

### Your problems

## 1 ##   cn2Z, 2*n > n+2   

is(2*n>n+2) assuming n::integer;

false

(2)

# compare:
is(2*n>=n+2) assuming (n/3) :: posint;

true

(3)

## 2 ##   dn2Z, 2 |( 3n+1)   

coulditbe( ((3*n+1)/2) :: integer)  assuming n::integer;

true

(4)

##  compare:

coulditbe( ((3*n+1)/2) :: integer)  assuming n::even;

false

(5)

## 3 ##   dk2Z,  cn2Z,  n=k*n
solve(n=n*k);
has([%], n=n);

{k = k, n = 0}, {k = 1, n = n}

 

true

(6)

 

First 48 49 50 51 52 53 54 Last Page 50 of 111