MaplePrimes Questions

I learned about Dodgson calculation of the determinant only recently (https://en.m.wikipedia.org/wiki/Dodgson_condensation).
I am only interested in symbolic expressions of the determinant.
Furthermore, I compared several methods. Not surprisingly, the build in method is the fastest. But why is the seq method slower than the proc method for the Dodgson method? Is there anything I could do to program it more efficiently?
 

restart; with(LinearAlgebra)

with(combinat); with(GroupTheory)

DetDef := proc (A) local i, n, sigma; description "Jeremy Johnson. Downloaded from https://www.cs.drexel.edu/~jjohnson/2016-17/winter/cs300/lectures/determinant.mw"; n := RowDimension(A); add(PermParity(Perm(sigma))*mul(A[i, sigma[i]], i = 1 .. n), `in`(sigma, permute([`$`(1 .. n)]))) end proc

InnerMatrix := proc (M::Matrix) SubMatrix(M, 2 .. RowDimension(M)-1, 2 .. ColumnDimension(M)-1) end proc

MatrixDet := proc (M::Matrix) local C, n, i, j; n := RowDimension(M)-1; C := Matrix(n, n); seq(seq(assign('C[i, j]', Determinant(M([i, i+1], [j, j+1]))), j = 1 .. n), i = 1 .. n); return C end proc

Dodgson := proc(M::Matrix)
 MatrixDet(M);
InnerMatrix(M) ^~ (-1) *~ MatrixDet(MatrixDet(M));
do if 1 < RowDimension(%) then InnerMatrix(`%%`) ^~ (-1) *~ MatrixDet(%);
end if;
until RowDimension(%) = 1;
Trace(%):
end proc:

Dodgsonseq := proc (E::Matrix) local w, dim, Z; dim := RowDimension(E); Z[dim] := E; Z[dim-1] := MatrixDet(E); Z[dim-2] := `~`[`*`](`~`[`^`](InnerMatrix(E), -1), MatrixDet(MatrixDet(E))); seq(assign('Z[w-1]', `~`[`*`](`~`[`^`](InnerMatrix(Z[w+1]), -1), MatrixDet(Z[w]))), w = dim-1 .. 1, -1); Trace(Z[1]) end proc

LaPlace := proc (M::Matrix) local c; add((-1)^(c+1)*M[1, c]*Minor(M, 1, c), c = 1 .. ColumnDimension(M)) end proc

dim := 7; A := Matrix(dim, dim, shape = symmetric, symbol = a)

7

(1)

start_time := time(); st := time[real](); Det1 := abs(A); CPUtime_used_Build_in_Determinant := time()-start_time; REALtime_used_Build_in_Determinant := time[real]()-st; start_time := time(); st := time[real](); Det2 := DetDef(A); CPUtime_used_Jeremy_Johnson_Determinant := time()-start_time; REALtime_used_Jeremy_Johnson_Determinant := time[real]()-st; start_time := time(); st := time[real](); Det3 := Dodgsonseq(A); CPUtime_usedDodgsonseq := time()-start_time; REALCPUtime_usedDodgsonseq := time[real]()-st; start_time := time(); st := time[real](); Det4 := Dodgson(A); CPUtime_usedDodgson := time()-start_time; REALtime_usedDodgson := time[real]()-st; start_time := time(); st := time[real](); Det5 := LaPlace(A); CPUtime_usedLaPlace := time()-start_time; REALtime_usedLaPlace := time[real]()-st; simplify(Det1-Det2); simplify(Det1-Det3); simplify(Det1-Det4); simplify(Det1-Det5)
``

0.32e-1

 

0.34e-1

 

0.93e-1

 

.108

 

47.094

 

41.295

 

40.766

 

38.158

 

0.31e-1

 

0.50e-1

 

0

 

0

 

0

 

0

(2)

Download test_Determinants_symbolic.mw

I had purchached reseach licience Maple 2022 towards the end of 2022 only and Quantum Chemistry Toolbox I purchased in Feb 2022 only.

Now i find significant update in toolbox in just 3 months. Now guide me how should i address this issuse.

I had to take loan in india to buy the toolbox.

It is only 3 months.

Can you suggest me how solve the problem to get the update without spending again.

What is the way guide someone.

I calculate the limit

Let me know if there are any errors in my calculations?


 

restart

assume(a > 0)

limit(int(sin(x)/x, x = n .. n+a), n = infinity)

0

(1)

int(sin(x)/x, x = n .. n+a)

-Si(n)+Si(n+a)

(2)

plot3d(-Si(n)+Si(n+a), a = -5 .. 5, n = -5 .. 5)

 

limit(-Si(n)+Si(n+a), n = infinity)

0

(3)

limit(-Si(n), n = infinity)

-(1/2)*Pi

(4)

limit(Si(n+a), n = infinity)

(1/2)*Pi

(5)

NULL


Thank you in advance.

Download limit_int.mw

I have a polyhedron with A(1,1,0), B(-1,1,0), C(-1,-1,0), H(-1/2,0,1), K(1/2,-1/2,0). How can I calculate volume of polyhedron ABCHK?
 

How can a horizontal axis be curved in a plot? like this

plot(F*r*sin(theta) - m, theta = 0 .. Pi)

When I am setting up the coordinates in the physics package, I use the following command. And it sets it to (r,theta,phi,t).

Setup(dimension = 4, mathematicalnotation = true, coordinates = spherical)

Is there a way to change it to (t,r,theta,phi)?

It gets a bit more confusing when we are looking at rank 2 objects.

Hi, I am working on an activity about conic sections, but I have a small issue with the display of the ellipse and the circle. My outlines are not complete. Any ideas on how to identify my error? Thanks  SectionsConiquesTest.mw

Hi to every one. I have attached a maple for eigenvalues. Please see and tell be solution of problem.

Thanks for time.

Eigen_Values.mw

Hi, here is my question.

test:=v^3;

plot3d(test,u=0..1-v, v=0..1);

How can I  transform this plot in the right triangle into an equilateral triangle? 

So that the three edges of the plot are the same length.

I wanna, squish it, or shear?

any tools i can use? Or can I do it using some tricks to change the function?

 

 

why the output wont appear eventhough I think the working is right?

y'' + 1/x * u' + u = 6 - 9x + x^2 - x^3

with baundary condition :

u(0) = 0 , and u(1) = 0

 I run the attached code, but after waiting for a few minutes, there is no response, does anyone know the reason?

 It only shows Evaluating!!!!

 sy01.mw

eq1:=( d)/(dt)u+(d^(2))/(dy^(2))u + s*( d)/(dy)u + delta * theta = 0;

eq2:=( d)/(dt)theta + (d^(2))/(dy^(2))theta + s*Pr*( d)/(dy)theta +lambda* exp(theta/(1 +(epsilon*theta))) = 0; 

initial and boundary conditons   

t <=0; u = theta = 0, for 0 <= y  <= 1   

t> 0;  u =0, theta = 0   at  y = 0;  

t> 0;  u =1, theta = 0   at   y = 1  ;

where, s, epsilon, Pr, lambda, delta are arbitrary parameters

Assuming I have an expression

you can know that the derivative with respect to y will vanish when y is a constant y0.

How can we use the mathematical software Maple to simplify this expression?

First 199 200 201 202 203 204 205 Last Page 201 of 2428