Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Im trying to create a basis as similar to this document. I have created the 72 equations under root of unity method (aswell have 44 equations on a seperate document for the sum shidoku product way) but cant seem to generate a basis for it such as they did in the document with these equations. If anyone can help as i may be entering the Basis() wrong. If you need the 72 equations i can post them as well. Any tips that you have would be appreciated!

 

http://reu.dimacs.rutgers.edu/~ericlee/Shidoku.pdf

 

 

Hello everyone,

I have a project that uses several machines to make a computation. I wrote a package (called here "package") with procedures, "proc".  I wrote several .mpl files structured as:

read "package.mpl":

W:= Read("file1.mpl"):    #I wrote a procedure to read and assign to a variable. This is not the problem.

Export("output.mpl", proc(W));

The situation is as follows: in all but one of my machines, this works fine, and proc(W) is exported correctly. However, in this ugly duckling (which is running the GUI version of Maple18), maple prints as an output, in blue:

Export("output.mpl",...)

and in place of ... it gives the answer expected. But it does not export automatically. I can, of course, manually correct this, but this is not optimal. Moreover, if the output is too big, there will be display issues.

Help? Any light is appreciated, thanks.

Marcelo

PS: I do not expect an answer for the PS; but I also do not know how to make my package "official", in the sense that I always read the .mpl file with all the procedures. Is there a way to call it like the LinearAlgebra and so on and use the package:-proc syntax? 

I have a problem with this sequence, as defined : f(x)=1-1/x+2*trunc(1/x)

The sequence starts with the number x=50100 and with 100000 steps the aim of the sequence is to see how many numbers are between 0 and 1( and 1 and 2, 2 and 3, and 3 and 4). My idea is:

 f:=x->1-2*(1/x-trunc(1/x))+1/x;
       x:=50100;
       k:=0 : a:=0 : b:=0 : c:=0 : d:=0 : while k<100000 do x:=f(x): k:=k+1 : if(x>0 and x<1)   then(a=a+1)           elif(x>1 and x<2) then(b=b+1) elif(x<2 and x>3) then(c=c+1) elif (x>3 and x<4) then (d=d+1) end             if : end do: printf("%d %d %d %d", a,b,c,d)                                                                                                                                             But i have problems :(.  Does anyone see the mistake?

I want to solve this:
ode := diff(f(x), x, x)+(diff(f(x), x))/x-(1/2)*(1/x^2+3.6*10^17/(6.6))*sin(2*f(x)) = 0;

bcs := f(rho) = 0, f((4*10^(-8)-rho)^.5)

 

and I want to plot it for a range of rho between 10^-9..7*10^-8.
what should I do?

Due to the mechanistic process of our students and little creativity in analysis in schools and universities to be professionally trained is that STEM education appears (science, technology, engineering and mathematics) is a new model that is being considered in other countries and with very slow step in our city. In this work the methods with STEM will be visualized but using computational tools provided by Maplesoft which is a company that leads online education for adolescents and adults in the current market. In Spanish.

ECI_UNT_2018.pdf

ECI_UNT_2018.mw

Lenin Araujo Castillo

Ambassador of Maple

Hi,

I'm trying to help the daughter of one of my friends with some flux related exercises.

We have calculated this one by hand and then I wanted to repeat it in Maple to help her see how to use Maple.

My problem is that I cannot figure out how to represent the functions in Maple, so that the calculations fall out similar to what we have been doing by hand. Yes, we could just use the built in Flux operation, but that defeats the purpose here.

Please bear with me - my calculus is rusty and I only have access to Maple on my son's machine. Plus I have never used Maple before... yes, I'm that old ;-)

We want to calculate the flux of the vector field V through the surface given by r:

Then we can differentiate r wrt both u and v and calculate the normal vector for the surface:

The next step is then to do the double integral of:

This is - bar the evalVF call - almost identical to what you'd be doing by hand, so this is good.

Next is the flux out of the 3d object constrained by the square [0,1] and [-Pi/2, Pi/2] and the surface r.

The paramterisation of that is:

with w in [0,1].

At this point one applies Gauss' Divergence Theorem which means that in order to find the flux of V out of Omega we "just" have to calculate the spatial integral of the divergence of V over the body described by Omega.

But that can be calculated by integrating V(Omega(u,v,w)) times the Jacobi function.

The Jacobi function is the determinant of the output of Maple's Jacobian procedure:

In this case it is 1 - u^3.

Now comes the big problem: how do I get Div(V)(Omega(u,v,w)), ie, the divergence of V taken in the point Omega(u,v,w)?

If I do evalVF(V, Omega(u, v, w)) I get a column vector out that I cannot compute the divergence of using Divergence(%) since that only works on VectorFields.

And Divergence(V) is not a function so I cannot do

And if I change Omega to return a value in R^3 instead of a vector I cannot use Jacobian, so that stop even faster.

Defining two versions of Omega just to make Maple happy seems wrong.

I just want to write the tripple integral of Div(V)(Omega(u,v,w))*jacobi or something close to that.

Please let me know if I should provide the workbook or in some other way make all my calculations available.

Thanks in advance and sorry if my description is lacking,

Torben

 

 

 

Dear Users!

Hoped everyone fine with everything. I the following maple expression, I need a matrix A for each n. Like if I take k =1 I want A[1]; if I take k=2, I want A[1], A[2]; for k=3 I want A[1], A[2], A[3] and so on. A[i]'s is square matrix having order M-1 by M-1.

Further I want to generate a block matrix for k. Like for k=1 I want a block matrix as Vector(1, {(1) = A[1]}), for k=2 I want a block matrix as Matrix(2, 2, {(1, 1) = A[1], (1, 2) = 0, (2, 1) = 0, (2, 2) = A[2]}), for k =3 I want a block matrix as Matrix(3, 3, {(1, 1) = A[1], (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = A[2], (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = A[3]}) and so on.

restart; alpha := 1;
k := 2; M := 3;
printlevel := 3;

for n while n <= 2^(k-1) do

for m from 0 while m <= M-1 do

for j from 0 while j <= M-1 do

Omega[m, j] := 2^((1/2)*k)*sqrt(GAMMA(j+1)*(j+alpha)*GAMMA(alpha)^2/(Pi*2^(1-2*alpha)*GAMMA(j+2*alpha)))*(sum((-1)^i*GAMMA(j-i+alpha)*2^(j-2*i)*(sum((1/2)*binomial(m, l)*(2*n-1)^(m-l)*(1+(-1)^(j-2*i+l))*GAMMA((1/2)*j-i+(1/2)*l+1/2)*GAMMA(alpha+1/2)/GAMMA(alpha+1+(1/2)*j-i+(1/2)*l), l = 0 .. m))/(GAMMA(alpha)*factorial(i)*factorial(j-2*i)), i = 0 .. floor((1/2)*j)))/2^(k*(m+1))

end do

end do;

A[n]:=???

end do;

I am waiting for your positive response.

Thanks
 

Hello i keep getting an error saying that maple expects an integer as it's argument but i has an integer so it is sort of the same thing like when a cat has a full bowl of biscuits and it is going mental at you to feed it, in every other circumstance i would'nt get this error and i even did an assume(k::integer) for the index of the series omega appears, still no. 

 

I am refering to the number theory package bigomega function btw

Size of a population is given by N(t) = 10 + 2e-0.3t sin t, t>= 0

I tried to graph it using Maple but the highest and lowest point I got ( 11.3 and 9.5) was vastly different from the supposed answer of  4.421 and1.279 .

Please help! The Maple command I used was N := t -> 10 + 2*exp(-0.3*t)*sin(t);

Plus, is there any Maple command to show what the highest and lowest point of the graph is?

I'm quite new to Maple but need it for work. I'm trying to work with metric tensors, and for easy examples it does work. For instance, such as here: https://gyazo.com/730e055f3393956ffe41427e11fa1b43

 

For more complicated problems I come into problems of recognising my tensors as actual metrics. In particular here: https://gyazo.com/58347c676b98ddf99275eea8cfecc69d

 

What am I doing wrong here? Is there some trick I'm missing, am I giving the data incorrectly?

 

Thank you,

Eivind

 

PS: For convenience I'm dumping the document in text format here:

 

> restart;
> with(PDETools); with(DifferentialGeometry); with(Tools); with(Tensor);
> k := 4;
                               4
> C := [w1, w2, z1, z2, seq(cat(x, i), i = 1 .. k), seq(cat(y, i), i = 1 .. k)];
        [w1, w2, z1, z2, x1, x2, x3, x4, y1, y2, y3, y4]
> DGsetup(C, PW, quiet);
                         frame name: PW
PW > F := [b, seq(cat(r, i), i = 1 .. k), seq(cat(s, i), i = 1 .. k)];
              [b, r1, r2, r3, r4, s1, s2, s3, s4]
PW > FunGen := proc (symb) options operator, arrow; PDETools[declare](symb(w1, w2), symb) end proc;
PW > map(FunGen, F);
              b(w1, w2) will now be displayed as b
             r1(w1, w2) will now be displayed as r1
             r2(w1, w2) will now be displayed as r2
             r3(w1, w2) will now be displayed as r3
             r4(w1, w2) will now be displayed as r4
             s1(w1, w2) will now be displayed as s1
             s2(w1, w2) will now be displayed as s2
             s3(w1, w2) will now be displayed as s3
             s4(w1, w2) will now be displayed as s4
PW > NULL;
PW > dx := proc (i) options operator, arrow; 'eval(cat(dx, i))' end proc;
PW > dy := proc (i) options operator, arrow; 'eval(cat(dy, i))' end proc;
PW > r := proc (i) options operator, arrow; cat(r, i) end proc;
PW > s := proc (i) options operator, arrow; cat(s, i) end proc;
PW > epsilon := proc (i) options operator, arrow; cat(epsilon, i) end proc;
PW > L1 := [1, b, seq(r(i), i = 1 .. k), seq(s(i), i = 1 .. k), seq(epsilon(i), i = 1 .. k)];
  [1, b, r1, r2, r3, r4, s1, s2, s3, s4, epsilon1, epsilon2,

    epsilon3, epsilon4]
PW > g := evalDG(`&s`(dw1, dz2)+`&s`(dw2, dz2)+b*(`&s`(dw1, dw1)+`&s`(dw2, dw2))+sum('r(i)'*(`&s`(dx(i), dw1)+`&s`(dy(i), dw2)), i = 1 .. k)+sum('s(i)'*(`&s`(dx(i), dw2)-`&s`(dx(i), dw1)), i = 1 .. k)+sum('epsilon(i)'*(`&s`(dx(i), dx(i))+`&s`(dy(i), dy(i))), i = 1 .. k));
_DG([["tensor", PW, [["cov_bas", "cov_bas"], []]], [

  [[1, 1], 2 b], [[1, 4], 1], [[1, 5], -s1 + r1],

  [[1, 6], -s2 + r2], [[1, 7], -s3 + r3], [[1, 8], -s4 + r4],

  [[2, 2], 2 b], [[2, 4], 1], [[2, 5], s1], [[2, 6], s2],

  [[2, 7], s3], [[2, 8], s4], [[2, 9], r1], [[2, 10], r2],

  [[2, 11], r3], [[2, 12], r4], [[4, 1], 1], [[4, 2], 1],

  [[5, 1], -s1 + r1], [[5, 2], s1], [[5, 5], 2 epsilon1],

  [[6, 1], -s2 + r2], [[6, 2], s2], [[6, 6], 2 epsilon2],

  [[7, 1], -s3 + r3], [[7, 2], s3], [[7, 7], 2 epsilon3],

  [[8, 1], -s4 + r4], [[8, 2], s4], [[8, 8], 2 epsilon4],

  [[9, 2], r1], [[9, 9], 2 epsilon1], [[10, 2], r2],

  [[10, 10], 2 epsilon2], [[11, 2], r3], [[11, 11], 2 epsilon3],

  [[12, 2], r4], [[12, 12], 2 epsilon4]]])
PW > Gam := Christoffel(g);
Error, (in DifferentialGeometry:-Tensor:-Christoffel) expected 1st argument to be a metric tensor. Received: _DG([["tensor", PW, [["cov_bas", "cov_bas"], []]], [`...`]])
PW > Ric := RicciScalar(g);
Error, (in DifferentialGeometry:-Tensor:-RicciScalar) expected 1st argument to be metric tensor. Received: _DG([["tensor", PW, [["cov_bas", "cov_bas"], []]], [`...`]])
PW > CovariantDerivative(g, Gam);
Error, (in DifferentialGeometry:-Tensor:-CovariantDerivative) expected 2nd argument to be an affine connection. Received: Gam
PW > LieDerivative(D_x, g);
Error, (in DifferentialGeometry:-LieDerivative) expected 1st argument to be a vector field. Received D_x
PW > CurvatureTensor(g);
Error, (in DifferentialGeometry:-Tensor:-CurvatureTensor) expected 1st argument to be a metric tensor or an  affine connection. Received: _DG([["tensor", PW, [["cov_bas", "cov_bas"], []]], [`...`]])
PW >

 

Hi everyone again

This one is linked to my previous 2 question.

Essentially I am trying to use a procedure to reproduce the formula:

S(j) = (1 + sum(H_j*T_j,j=1..n))/(1 + sum(1/(H_j*T_j),j=1..n))

BigProc:= proc(H::list,T::list)
local Form, i;
Form:=[];
for i from 1 to nops(H) do
Form := [op(Form),(1 + [sum(H[1..i]*~T[1..i],i=1..5)])/~(1 + [sum(1/~(H[1..i]*~T[1..i]),i=1..5)])]
end do:
end proc:
MainProc([1,3,5],[3,6,8])

Error, (in sum) summation variable previously assigned, second argument evaluates to 1 = 1 .. 5
 

The actual answer should be (3, 396/25,22320/509)

ie 

S(1) = (1+ 3)/(1+(1/3)) = 3

S(2) = (1 +(3+18))/(1+1/3 + 1/18)) = 396/25

S(3) = (1 +(3+18+40))/(1+1/3 + 1/18 +1/40) = 22320/509

I feel like I am missing a few things to my procedure. Any help would be greatly appreciated!

The output of a solve command was:

solution := {p[1] = 2.788944999, p[2] = 4.940143518}, { p[1] = 15.29764736, p[2] = 4.946617373}

My question is: How to capture these 4 numbers in a 2 by 2 matrix ?

I tried assign, subs commands. Did not succeed. Could some one help, please?

 

Hi

I would like to be able to use a procedure in order to create a sequence using a list. Here is an example of what I am trying to achieve:

X = [1,3,4, 50,10]

T_n = 1 + sum^n_j=1 X_j

So T_1 = 1 + 1 = 2

T_2 = 1 + [1+3] = 5

T_3 = 1 +[1+3 +4] = 9

T_4 = 1 + [1+3+4+50] = 59

T_5 = 1+ [1+3+4+50+10] = 69

So my final list would be [2,5,9,59,69]

I am quite new to this forum so i was not sure how to create the Sum from j = 1 to n bit. I know the command for creating a summation but not in a procedure sense.

How do I get a graph from Maple for function f(x) that is continuous on [0,2] except at x=1, where f(1)=4, limx approaching 1- f(x)=2, and limx approaching 1+ f(x)=3?

First 822 823 824 825 826 827 828 Last Page 824 of 2219