Maple 12 Questions and Posts

These are Posts and Questions associated with the product, Maple 12

Below is MAPLE code to simplify a series.  MAPLE expresses the result in terms of functions which many people are not familiar with.  Is there a way to express the answer in terms of more conventional functions expecially if N is a positive integer?


 

Cn := ((-I)*(1/2))*(2*(I*Pi*n*tau-(2*I)*Pi*n)*cos(Pi*n*tau/T)-T*(2*I)*sin(Pi*n*tau/T)+(4*I)*Pi*n)/(Pi^2*n^2); S4 := a[0]+sum(Cn*sin(2*Pi*n*x/T), n = 1 .. k); a[0] := 0; T := 4; tau := 2; Cn; S5 := unapply(S4, k, x); T := simplify(S5(N, x))

convert(T, StandardFunctions);

(-polylog(2, exp(-((1/2)*I)*Pi*(x-1)))*N^2-exp(-((1/2)*I)*Pi*N*(x+1))*LerchPhi(exp(-((1/2)*I)*(x+1)*Pi), 2, N)*N^2+polylog(2, exp(((1/2)*I)*(x+1)*Pi))*N^2+exp(-((1/2)*I)*Pi*N*(x-1))*LerchPhi(exp(-((1/2)*I)*Pi*(x-1)), 2, N)*N^2+polylog(2, exp(-((1/2)*I)*(x+1)*Pi))*N^2-exp(((1/2)*I)*Pi*N*(x+1))*LerchPhi(exp(((1/2)*I)*(x+1)*Pi), 2, N)*N^2-polylog(2, exp(((1/2)*I)*Pi*(x-1)))*N^2+exp(((1/2)*I)*Pi*N*(x-1))*LerchPhi(exp(((1/2)*I)*Pi*(x-1)), 2, N)*N^2+exp(((1/2)*I)*Pi*N*(x+1))-exp(((1/2)*I)*Pi*N*(x-1))+exp(-((1/2)*I)*Pi*N*(x+1))-exp(-((1/2)*I)*Pi*N*(x-1))-I*exp(-((1/2)*I)*x*Pi*N)*LerchPhi(exp(-((1/2)*I)*x*Pi), 1, N)*N^2*Pi-I*ln(1-exp(-((1/2)*I)*x*Pi))*N^2*Pi+I*exp(((1/2)*I)*x*Pi*N)*LerchPhi(exp(((1/2)*I)*x*Pi), 1, N)*N^2*Pi+I*ln(1-exp(((1/2)*I)*x*Pi))*N^2*Pi-I*exp(((1/2)*I)*x*Pi*N)*N*Pi+I*exp(-((1/2)*I)*x*Pi*N)*N*Pi)/(N^2*Pi^2)

(1)

``


 

Download simplify.mw

interface(prettyprint=0):
interface(screenwidth=500):
with(LinearAlgebra):

expect 

Matrix([[a1,a2,3],[5,6,7],[9,10,12]])

but

it print datatype = anything,storage = rectangular,order = Fortran_order,shape  and (2,1) etc

Matrix(3,3,{(2, 1) = 1, (3, 1) = 1, (3, 2) = 1},datatype = anything,storage = rectangular,order = Fortran_order,shape = []), 

ode1a := diff(y1(tt), tt) = 1.342398800*10^5*y1(tt)+89591.20000*y2(tt)+44647.44000*y3(tt);
ode2a := diff(y2(tt), tt) = 89591.20000*y1(tt)+89803.24000*y2(tt)+44901.60000*y3(tt);
ode3a := diff(y3(tt), tt) = 44647.44000*y1(tt)+44901.60000*y2(tt)+44859.24000*y3(tt);

would like to find the origin eigenstate before it collapse to eigenvalues

how to apply ricci flow in this situation?

i find help file , and can not find some relationship between this application and inputs of ricci related function

which functions in maple can help to find origin of eigenstate

Assume I had a 2D line

how to put and draw this line into a new geometric world defined by patch?

how to find back a patch in maple from Pi+GaussCurvature*Area(triangle) = Pi

restart:
with(LinearAlgebra):
EFG := proc(X)
local Xu, Xv, E, F, G;
Xu := <diff(X[1],u), diff(X[2],u), diff(X[3],u)>;
Xv := <diff(X[1],v), diff(X[2],v), diff(X[3],v)>;
E := DotProduct(Xu, Xu, conjugate=false);
F := DotProduct(Xu, Xv, conjugate=false);
G := DotProduct(Xv, Xv, conjugate=false);
simplify([E,F,G]);
end proc;

UN := proc(X)
local Xu,Xv,Z,s;
Xu := <diff(X[1],u), diff(X[2],u), diff(X[3],u)>;
Xv := <diff(X[1],v), diff(X[2],v), diff(X[3],v)>;
Z := CrossProduct(Xu,Xv);
s := VectorNorm(Z, Euclidean, conjugate=false);
simplify(<Z[1]/s|Z[2]/s|Z[3]/s>,sqrt,trig,symbolic);
end:

lmn := proc(X)
local Xu,Xv,Xuu,Xuv,Xvv,U,l,m,n;
Xu := <diff(X[1],u), diff(X[2],u), diff(X[3],u)>;
Xv := <diff(X[1],v), diff(X[2],v), diff(X[3],v)>;
Xuu := <diff(Xu[1],u), diff(Xu[2],u), diff(Xu[3],u)>;
Xuv := <diff(Xu[1],v), diff(Xu[2],v), diff(Xu[3],v)>;
Xvv := <diff(Xv[1],v), diff(Xv[2],v), diff(Xv[3],v)>;
U := UN(X);
l := DotProduct(U, Xuu, conjugate=false);
m := DotProduct(U, Xuv, conjugate=false);
n := DotProduct(U, Xvv, conjugate=false);
simplify([l,m,n],sqrt,trig,symbolic);
end proc:

GK := proc(X)
local E,F,G,l,m,n,S,T;
S := EFG(X);
T := lmn(X);
E := S[1];
F := S[2];
G := S[3];
l := T[1];
m := T[2];
n := T[3];
simplify((l*n-m^2)/(E*G-F^2),sqrt,trig,symbolic);
end proc:

sph := <f(u,v)|g(u,v)|h(u,v)>;
cur := GK(sph);
X := sph;
Xu := <diff(X[1],u), diff(X[2],u), diff(X[3],u)>;
Xv := <diff(X[1],v), diff(X[2],v), diff(X[3],v)>;
Z := CrossProduct(Xu,Xv);
AreaTriangle := int(int(Z[1]^2+Z[2]^2+Z[3]^2,v=-Pi/2..Pi/2),u=0..2*Pi);
dsolve(Pi+cur*AreaTriangle = Pi, [f(u,v),g(u,v),h(u,v)]);
 

this equation is complicated

how to dsolve for this equation for function f ?

f(t,x,diff(x,t)) - f(t,x,p) - (diff(x,t)-p)*diff(f(t,x,p), p) = tan(t)
 

updated:
P := evalm(p2 + c*vector([cos(q1+q2+q3), sin(q1+q2+q3)]));
 
restart:
with(Groebner):
p1 := vector([a*cos(q1), a*sin(q1)]);
p2 := evalm(p1 + b*vector([cos(q1+q2), sin(q1+q2)]));
P := evalm(p2 + c*vector([cos(q1+q2+q3), sin(q1+q2+q3)]));
Pe := map(expand, P);
A := {cos(q1) = c1, sin(q1) =s1, cos(q2)=c2, sin(q2)=s2, cos(q3)=c3, sin(q3)=s3};
P := subs(A, op(Pe));
F1 := [x - P[1], y - P[2], s1^2+c1^2-1, s2^2+c2^2-1, s3^2+c3^2-1 ];
F2 := subs({a=1, b=1, c=1}, F1);
 
g2 := Basis(F2, plex(c3, s3, c2, s2, c1, s1));
LeadingTerm(g2[1], plex(c3, s3, c2, s2, c1, s1));
LeadingTerm(g2[2], plex(c3, s3, c2, s2, c1, s1));
LeadingTerm(g2[3], plex(c3, s3, c2, s2, c1, s1));
LeadingTerm(g2[4], plex(c3, s3, c2, s2, c1, s1));
LeadingTerm(g2[5], plex(c3, s3, c2, s2, c1, s1));
LeadingTerm(g2[6], plex(c3, s3, c2, s2, c1, s1));
LeadingTerm(g2[7], plex(c3, s3, c2, s2, c1, s1));
LeadingTerm(g2[8], plex(c3, s3, c2, s2, c1, s1));
LeadingTerm(g2[9], plex(c3, s3, c2, s2, c1, s1));
 
                                   1, c1
                               2       2    2   2
                           16 y  + 16 x , s1  s2
                                           2
                                 8 x, c1 s2
                                2      2    2  
                             2 y  + 2 x , s1  c2
                                 2 x, c1 c2
                            3            2        
                         2 x  - 2 x + 2 y  x, s2 c2
                                        2
                                   1, c2
                                   2 x, s3
                                    2, c3
originally i think
g2[1], g2[7], g2[9] have single variables c1, c2, c3 respectively
can be used to solve system
 
but without x and y, these equations can not be used
if choose leading term has x and y , but there is no single variable s1 or c1.
 
originally expect solve as follows
g2spec := subs({x=1, y=1/2}, [g2[3],g2[5],g2[6]]);
S1 := [solve([g2spec[1]])];
q1a := evalf(arccos(S1[1]));
q1b := evalf(arccos(S1[2]));
S2 := [solve(subs(s1=S1[1], g2spec[2])), solve(subs(s1=S1[2], g2spec[2])) ];
q2a := evalf(arccos(S2[1]));
q2b := evalf(arccos(S2[2]));
S3 := [solve(subs(s1=S2[1], g2spec[2])), solve(subs(s1=S2[2], g2spec[2])) ];
q2a := evalf(arccos(S3[1]));
q2b := evalf(arccos(S3[2]));
 

f := -ln(-1-ln(exp(x)))+ln(-ln(exp(x)))-Ei(1, -1-ln(exp(x)))+Ei(1, -ln(exp(x)))
solve(limit(diff((subs(x=q, f)-f),h), h=0) = f, q);
limit(diff((subs(x=x*h, f)-f),h), h=0);
Error, (in limit/dosubs) invalid input: `limit/dosubs` uses a 3rd argument, newx, which is missing

guess an operator called Lee, Lee(f, x) = f

solve(limit(diff((subs(x=q, f)-f),h), h=0) = f, q);

suspect q = x*h or q=x*f

limit(diff((subs(x=x*h, f)-f),h), h=0);
Error, (in limit/dosubs) invalid input: `limit/dosubs` uses a 3rd argument, newx, which is missing
 
limit(diff((subs(x=f*h, f)-f),h), h=0);
Error, (in depends/internal) invalid input: `depends/internal` uses a 2nd argument, x, which is missing
read example
 
sph := <R*cos(u)*cos(v)|R*sin(u)*cos(v)|R*sin(v)>;
GK(sph); #Gauss Curvature
MK(sph); #Mean Curvature
 
how to find sph if slope is tan(u) ?
 
Lee := (-1+Int(exp(LambertW(1/(-1+t))*(-1+t)), t=1..x))/(Int(exp(LambertW(1/(-1+t))*(-1+t)), t=1..x));
sum(unknown, n=1..infinity) = Lee
 
how to find unknown?

A system of algebraic equation

in terms of x, y, z

how draw 3 different circles to show the range of possible values for x, y and z respectively?

it may not be a circle 

It may be 3 bounded area graph to show the range of x , y , z respectively

 

updated

like the graph in many examples in

algebraic and geometric ideas in the theory of discrete optimization

bound area have color

is it possible to change ODE to PDE?

the ODE has diff(a(t),t) and diff(b(t),t)

how to convert to diff(t, a), diff(t, b) ?

with(DEtools, buildsym, equinv, symtest):
ans := dsolve([eq2,eq3,eq4], Lie);
Error, (in dsolve) too many arguments; some or all of the following are wrong: [{a(t), b(t), c(t)}, Lie]
 
ans := dsolve([eq2+eq3+eq4 = exp(t)], Lie);
Error, (in PDEtools/sdsolve) too many arguments; some or all of the following are wrong: [{a(t), b(t), c(t)}, Lie]
 
ans := dsolve([eq2,eq3,eq4]);
sym2 := buildsym(ans);
Error, (in buildsym) invalid input: `ODEtools/buildsym` expects its 1st argument, sol, to be of type {algebraic, algebraic = algebraic}, but received [{c(t) = ...}, {b(t) = ...}, {a(t) = ...)}]
 
 
PDEtools[declare](a(t), b(t), c(t), prime = t):
symgen(eq2+eq3+eq4=0);
                       a(t) will now be displayed as a
                       b(t) will now be displayed as b
                       c(t) will now be displayed as c
   derivatives with respect to t of functions of one variable will now be
      displayed with 'symgen(....)'
 
 
update
if it can not do for 3 function a(t),b(t),c(t) system of differential equations
then
 
i change to use
eq2 := subs(b(t)=a(t),subs(c(t)=a(t),eq2));
eq3 := subs(b(t)=a(t),subs(c(t)=a(t),eq3));
eq4 := subs(b(t)=a(t),subs(c(t)=a(t),eq4));
 
with(DEtools, buildsym, equinv, symtest):
ans := dsolve(eq2 = 0, Lie);
buildsym(ans[1], a(t));
buildsym(ans[2], a(t));
buildsym(ans[3], a(t));
 
there are 3 answers, can i use one of it to recover the equation eq2 or  eq3 or eq4?
 
ans := dsolve(eq3=0, Lie);
buildsym(ans[1], a(t));
sym2 := buildsym(ans[2], a(t));
buildsym(ans[3], a(t));

sym := [_xi=rhs(sym2[2]),_eta=rhs(sym2[1])];
ODE := equinv(sym, a(t));
eq3 - ODE;
sym := [_xi=rhs(sym2[1]),_eta=rhs(sym2[2])];
ODE := equinv(sym, a(t));
eq3 - ODE;
but ODE is not equal to original eq3
ans := dsolve(eq4=0, Lie);
buildsym(ans[1], a(t));
buildsym(ans[2], a(t));
 
ans := dsolve(eq2+eq3+eq4=0, Lie);
sym := buildsym(ans[1], a(t));
ODE := equinv(sym, a(t));
eq2+eq3+eq4 - ODE;
sym := buildsym(ans[2], a(t));
ODE := equinv(sym, a(t));
eq2+eq3+eq4 - ODE;
sym := buildsym(ans[3], a(t));
ODE := equinv(sym, a(t));
simplify(eq2+eq3+eq4 - - ODE);
 
can not recover the original result
i count the number among group
but when the list a large such as over 1000 records, the count will be over 30,000
use which denominator to find probability?
is there any functions in maple for this case?
 
with(LinearAlgebra):
correlationlist1 := [[1,2,3],[1,3,5]....]:
PAB := Matrix(50):
for ii from 1 to nops(correlationlist) do
 for jj from 1 to nops(correlationlist[ii]) do
  for kk from 1 to nops(correlationlist) do
   for qq from 1 to nops(correlationlist[kk]) do
    if ii <> kk then
     #print("scan=",correlationlist2[kk],"kk=",kk,"qq=",qq,"row=",correlationlist[ii][jj],"column=",correlationlist[kk][qq]):
     PAB[correlationlist[ii][jj],correlationlist[kk][qq]] := PAB[correlationlist[ii][jj],correlationlist[kk][qq]] + 1: # group to group relations
    end if:
   od:
  od:
 od:
od:

If there is a list

[[1,2],[2,2],[3,3]...

how to use correlate function?

assume [1,2] and [2,1] count as 2 

when find correlation between 1and 2

and how about 

if [1,2] and [2,1] are different

first position as key

means 1 relate with 2 count as 1 case for 1 only

[2,1] count as 1 case for 2 only

 

3 4 5 6 7 8 9 Last Page 5 of 32