Maple 12 Questions and Posts

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

with(LinearAlgebra):
test1 := Matrix([[1,-1],[-1,1]]);
for i from 1 to 20 do
print(Eigenvectors(test1)[2]);
od:

i run the same command 20 times, but sometimes left has negative 1 , sometimes right has negative 1

why position is like random , is my maple has virus?

the result are not consistent, i am learning quantum computation, will this influence the quantum computation and result?

i am doing up and down and change to a differential equation, Pauli equation

It seems only one Pauli equation

i find 3*3 matrix 

has 3 different kinds of matrix

one is row 1 and row 2

second is row 1 and row 3

Third is row 2 and 3

column 1 is constant 

Is there any one has the same experience to predict these 3 kind of matrix, and know what I mentioned?

 

I executed finding the roots of the derivative of a series expansion containing 500 terms.  I did it 2 ways.  The 1st using fsolve & the 2nd using RootFinding.  The fsolve took over 20 minutes to find a single root within a specified range while the RootFinding took less than 60 seconds to find all roots within a larger range.  I do not know of the inner mechanisms of either command, but why is this the case?  Why would the algorithms differ?  My results are in the link below.

fsolve_vs_RootFinding.mw

Matrix([[xx3[1,2],xx3[1,3]],[xx3[2,2],xx3[2,3]]])
Matrix(2, 2, {(1, 1) = (1/6)*sqrt(3)+(1/2)*I, (1, 2) = (1/6)*sqrt(3)-(1/2)*I, (2, 1) = (1/6)*sqrt(3)-(1/2)*I, (2, 2) = (1/6)*sqrt(3)+(1/2)*I})
expect output be
but these example are wrong
((1/6)*sqrt(3)+(1/2)*I)*Matrix([[1,-I].[-I,1]])
but these example are wrong
MatrixMatrixMultiply(Matrix([[(1/6)*sqrt(3),(1/2)],[(1/6)*sqrt(3),(1/2)]]),Matrix([[1,-I],[1,I]]));
concept like this output

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

When attempting to numerically solve for a function using fsolv it is possible that the function has multiple roots.  So to focus on a particular region you specify a range such as:

xmax := fsolve(S, x = 0 .. 1/2)

Is it possible fsolve may not resolve the solution due to the fact that delta x is not small enough or does fsolve autonomously adjust delta x in order to find the solution?  If not, how do you manually dictate the delta x for the interval specified?

Below is a link to my worksheet.  I am attempting to evaluate a Fourier series for a particular number of terms & at a specific location xmax.  As far as I can tell xmax is assessed correctly.  Howver, when I go to evaluate the Fourier series for x = xmax using either the 'value' or 'evalf' command they do on seem to recognize that x = xmax.

So I am guessing I must have some syntax problem.  Can anyone show me what I have wrong?

command_syntax.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 = []), 

The MAPLE worksheet associated with the link below attempts to generate a sequence of signals to be symmetric about t=0.  It worked for the 1st plot, but not for the 3rd plot.  I believe the problem resides with the Heaviside function.  I need to somehow create a function that is the mirror image of the Heaviside function.  Does anyone know how to do that?

untitled4.mw

The link below has my code for generating 2 matrices.  The 1st one does not generate flfoating point numerical data; whereas, the 2nd one does.  What is wrong with the 1st case?  I am attempting to single out one harmonic which works in the 2nd case.  Also, is there a way I can generate a spectrum of S2(k= 1 to 100, t= 0 to 1)?

?untitled6.mw

 

1.
tanh(1-x) = sum(p(ii)*x^q(ii), ii=0..infinity) or product(p*x^q(ii), ii=0..infinity) ?
2.
tanh(1-x)*1/(1-x) = sum(p(ii)*x^q(ii), ii=0..infinity) or product(p*x^q(ii), ii=0..infinity) ?
3.
tanh(x) = sum(p(ii)*x^q(ii), ii=0..infinity) or product(p*x^q(ii), ii=0..infinity) ?

Remark: it may not be possible to use diff to find p(ii)

update

series(tanh(1-x), x=0);
with(OrthogonalSeries):
Coefficients(series(1/(1-x), x=0));
coeffs(series(tanh(1-x), x=0));
coeffs(series(tanh(1-x), x=0),x);
Error, invalid arguments to coeffs;
 
and is it possible to find q(ii) only if assume p(ii) all are one?

ode1a := diff(y1(t), t) = round(rhs(odeparm1[1][1]))*y1(t)+round(rhs(odeparm1[1][2]))*y2(t)+round(rhs(odeparm1[1][3]))*y3(t);
ode2a := diff(y2(t), t) = round(rhs(odeparm1[1][4]))*y1(t)+round(rhs(odeparm1[1][5]))*y2(t)+round(rhs(odeparm1[1][6]))*y3(t);
ode3a := diff(y3(t), t) = round(rhs(odeparm1[1][7]))*y1(t)+round(rhs(odeparm1[1][8]))*y2(t)+round(rhs(odeparm1[1][9]))*y3(t);
try
ode1a := diff(y1(t), t) = rhs(odeparm1[1][1])*y1(t)+rhs(odeparm1[1][2])*y2(t)+rhs(odeparm1[1][3])*y3(t);
ode2a := diff(y2(t), t) = rhs(odeparm1[1][4])*y1(t)+rhs(odeparm1[1][5])*y2(t)+rhs(odeparm1[1][6])*y3(t);
ode3a := diff(y3(t), t) = rhs(odeparm1[1][7])*y1(t)+rhs(odeparm1[1][8])*y2(t)+rhs(odeparm1[1][9])*y3(t);
sys := DiffEquation([ode1a, ode2a, ode3a], inputvariable = [y1(t)], outputvariable = [y2(t), y3(t)]);
sysz := ToDiscrete(sys, ts); in_t := Sine(1, 1, 0, 0);
sol := Simulate(sys, [in_t]);
try
p1 := plots[odeplot](sol, [[t, y2(t)]], t = 0 .. t_sim, numpoints = 200, color = red);
print("succeed 1 2", i)
catch:
print("error draw at ", i)
end try;
try
p1 := plots[odeplot](sol, [[t, y3(t)]], t = 0 .. t_sim, numpoints = 200, color = red);
print("succeed 1 3", i)
catch:
print("error draw at ", i)
end try
catch: print("error at ", i);
print(lastexception);
print(ode1a);
print(ode2a);
print(ode3a);
end try;
try
ode1a := diff(y1(t), t) = rhs(odeparm1[1][1])*y1(t)+rhs(odeparm1[1][2])*y2(t)+rhs(odeparm1[1][3])*y3(t);
ode2a := diff(y2(t), t) = rhs(odeparm1[1][4])*y1(t)+rhs(odeparm1[1][5])*y2(t)+rhs(odeparm1[1][6])*y3(t);
ode3a := diff(y3(t), t) = rhs(odeparm1[1][7])*y1(t)+rhs(odeparm1[1][8])*y2(t)+rhs(odeparm1[1][9])*y3(t);
sys := DiffEquation([ode1a, ode2a, ode3a], inputvariable = [y2(t)], outputvariable = [y1(t), y3(t)]);
sysz := ToDiscrete(sys, ts);
in_t := Sine(1, 1, 0, 0);
sol := Simulate(sys, [in_t]);
try
p1 := plots[odeplot](sol, [[t, y1(t)]], t = 0 .. t_sim, numpoints = 200, color = red);
print("succeed 2 1", i)
catch:
print("error draw at ", i)
end try;
try
p1 := plots[odeplot](sol, [[t, y3(t)]], t = 0 .. t_sim, numpoints = 200, color = red);
print("succeed 2 3", i)
catch:
print("error draw at ", i)
end try
catch:
print("error at ", i);
print(lastexception);
print(ode1a);
print(ode2a);
print(ode3a)
end try;
try
ode1a := diff(y1(t), t) = rhs(odeparm1[1][1])*y1(t)+rhs(odeparm1[1][2])*y2(t)+rhs(odeparm1[1][3])*y3(t);
ode2a := diff(y2(t), t) = rhs(odeparm1[1][4])*y1(t)+rhs(odeparm1[1][5])*y2(t)+rhs(odeparm1[1][6])*y3(t);
ode3a := diff(y3(t), t) = rhs(odeparm1[1][7])*y1(t)+rhs(odeparm1[1][8])*y2(t)+rhs(odeparm1[1][9])*y3(t);
sys := DiffEquation([ode1a, ode2a, ode3a], inputvariable = [y3(t)], outputvariable = [y1(t), y2(t)]);
sysz := ToDiscrete(sys, ts);
in_t := Sine(1, 1, 0, 0);
sol := Simulate(sys, [in_t]);
try
p1 := plots[odeplot](sol, [[t, y1(t)]], t = 0 .. t_sim, numpoints = 200, color = red);
print("succeed 3 1", i)
catch:
print("error draw at ", i)
end try;
try
p1 := plots[odeplot](sol, [[t, y2(t)]], t = 0 .. t_sim, numpoints = 200, color = red);
print("succeed 3 2", i)
catch:
print("error draw at ", i)
end try
catch:
print("error at ", i);
print(lastexception);
print(ode1a);
print(ode2a);
print(ode3a)
end try

diff(y1(t), t) = 1.052936200*10^5*y1(t)+70106.19000*y2(t)+35169.00000*y3(t)
diff(y2(t), t) = 70106.19000*y1(t)+71031.61000*y2(t)+35511.00000*y3(t)
diff(y3(t), t) = 35169.00000*y1(t)+35511.00000*y2(t)+36100.00000*y3(t)
"the DEs contain functions with undefined values (probably caused by a discontinuity in the input that was differentiated). As a result, the numerical solution cannot be calculated. The DE system is: %1\"",[(&DifferentialD;)/(&DifferentialD;t) y1(t)=1.052936200 10^5 y1(t)+70106.19000 y2(t)+35169.00000 ({[[0,t<0],[sin(t),otherwise]]),(&DifferentialD;)/(&DifferentialD;t) y2(t)=70106.19000 y1(t)+71031.61000 y2(t)+35511.00000 ({[[0,t<0],[sin(t),otherwise]]),{[[0,t<0],[undefined,t=0],[cos(t),0<t]]=35169.00000 y1(t)+35511.00000 y2(t)+36100.00000 ({[[0,t<0],[sin(t),otherwise]]),y2(0)=0,y1(0)=0]
 
it has error when plot
ygraph1 := -.736312023696564122*exp(2.26140104440167664*10^5*tt)-.591826613918776445*exp(28994.5376895644186*tt)+.328002839648234568*o*exp(13767.7178702679158*tt);
ygraph2 := -.591859486202007235*exp(2.26140104440167664*10^5*tt)+.328381376616263988*exp(28994.5376895644186*tt)-.736116852194203974*o*exp(13767.7178702679158*tt);
ygraph3 := -.327943520064913564*exp(2.26140104440167664*10^5*tt)+.736143281263262450*exp(28994.5376895644186*tt)+.592069351595225779*o*exp(13767.7178702679158*tt);
FunctionAdvisor(branch_points, ygraph1);
plot(ygraph1, tt=-5..5);
plot(ygraph2, tt=-5..5);
plot(ygraph3, tt=-5..5);
Warning, unable to evaluate the function to numeric values in the region;
 
how to plot this system?

ode1a := diff(a(t), t) = 1.342398800*10^5*a(t)+round(89591.20000)*b(t)+round(44647.44000)*c(t);
ode2a := diff(b(t), t) = round(89591.20000)*a(t)+round(89803.24000)*b(t)+round(44901.60000)*c(t);
ode3a := diff(c(t), t) = round(44647.44000)*a(t)+round(44901.60000)*b(t)+round(44859.24000)*c(t);
sol := dsolve([ode1a=exp(t), ode2a=exp(t), ode3a=exp(t)], [a(t),b(t),c(t)]);

Error, (in dsolve) invalid input: `PDEtools/NumerDenom` expects its 1st argument, ee, to be of type algebraic, but received diff(a(t), t) = (3355997/25)*a(t)+89591*b(t)+44647*c(t)

 

initially i guess the error come from decimal number coefficient

but after round it, still have error

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

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);
 
DEplot3d({ode1a,ode2a,ode3a}, {y1(tt), y2(tt), y3(tt)}, tt=0..10,[[y1(0) = 0, y2(0) = 0, y3(0) = 0]],scene=[tt,y1(tt),y2(tt)]);
DEplot3d({ode1a,ode2a,ode3a}, {y1(tt), y2(tt), y3(tt)}, tt=0..10,[[y1(0) = 0, y2(0) = 0, y3(0) = 0]],scene=[tt,y1(tt),y3(tt)]);
DEplot3d({ode1a,ode2a,ode3a}, {y1(tt), y2(tt), y3(tt)}, tt=0..10,[[y1(0) = 0, y2(0) = 0, y3(0) = 0]],scene=[tt,y2(tt),y3(tt)]);
 
can it plot 3 functions ?
and why it return a straight line 3d graph
 
is there some interesting graph from this system?
First 10 11 12 13 14 15 16 Last Page 12 of 32