Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

Write a procedure using the variable args that will take an unspecified finite number of numbers, delete the smallest and the largest, and return the average of the rest as a floating point number. If there are fewer than 3 arguments have an error message say: "There are not enough arguments. There should be at least three." 

You should have no input parameters in the definition of the procedure. You may write it directly or you may use the Maple command sort as a part of your program. Do ?sort to see how sort works. Test your procedure with each of the following argument sequences:  

   50,40,40, 40, 40, 10

   1,2

   seq(100 - i, i = 1..100)

   seq(modp(n,111), n=1..1000).


If n people (numbered 1 to n) stand in a circle and someone starts going around the circle and eliminating every other person till only one person is left, the number J(n) of the person left at the end is given by 

    J(n) = 1                           if n = 1
    J(n) = 2*J(n/2) - 1          if n > 1 and n is even
    J(n) = 2*J((n-1)/2) + 1   if  n > 1 and n is odd

(i) Write a recursive procedure to compute J. [As a check the first 16 values (starting with 1) of J(n) are 1,1,3,1,3,5,7,1,3,5,7,9,11,13,15,1]. 
(ii)Compute the value of J(10000). 
(iii) Can you explain why this is so much faster than our recursive procedure to compute the n-th Fibonacci number?

Has anyone installed and run maple under ubuntu installed the Windows Subsystem for Linux?   We are having trouble doing this: specifically running programs with text input files, etc.

 

 

I have a say sum(F(k) ,k=1..n)  It fails unless n is an actual integer.  But sum(F(k), k=1..a) works. Then then eval(%,a=n) completes it. That is probably correct but not necessarily a valid assumption. Details in attached. Also it is hard to understand the error message.
 

restart

``

``

Sinta := (k^2+n^2-k)*n/((k^2+n^2-2*k+1)*(k^2+n^2))

(k^2+n^2-k)*n/((k^2+n^2-2*k+1)*(k^2+n^2))

(1)

Ai := sum(Sinta, k = 1 .. n)

-((1/2)*I)*(2*n^2+I*n)*Psi(n-I*n)/(4*n^2+1)+((1/2)*I)*(2*n^2-I*n)*Psi(n+I*n)/(4*n^2+1)+((1/2)*I)*(-2*n^2+I*n)*Psi(n+1-I*n)/(4*n^2+1)-((1/2)*I)*(-2*n^2-I*n)*Psi(n+1+I*n)/(4*n^2+1)+((1/2)*I)*(2*n^2+I*n)*Psi(-I*n)/(4*n^2+1)-((1/2)*I)*(2*n^2-I*n)*Psi(I*n)/(4*n^2+1)-((1/2)*I)*(-2*n^2+I*n)*Psi(1-I*n)/(4*n^2+1)+((1/2)*I)*(-2*n^2-I*n)*Psi(1+I*n)/(4*n^2+1)

(2)

Souta := n/(k^2+n^2-k)

n/(k^2+n^2-k)

(3)

NULL

sum(Souta, k = 1 .. n)

Error, (in assuming) when calling 'Dfnt_4'. Received: 'when calling 'Dfnt_4'. Received: 'when calling 'unknown'. Received: 'invalid input: Dfnt_4 expects its 3rd argument, fpts, to be of type Or(list, piecewise), but received 0'''

 

"(->)"

Error, invalid input: evalf[10] expects 1 argument, but received 0

 

 

 

This works

sum(Souta, k = 1 .. a)

n*Psi(a+1/2-(1/2)*(-4*n^2+1)^(1/2))/(-4*n^2+1)^(1/2)-n*Psi(a+1/2+(1/2)*(-4*n^2+1)^(1/2))/(-4*n^2+1)^(1/2)-n*Psi(1/2-(1/2)*(-4*n^2+1)^(1/2))/(-4*n^2+1)^(1/2)+n*Psi(1/2+(1/2)*(-4*n^2+1)^(1/2))/(-4*n^2+1)^(1/2)

(4)

Ao := eval(%, a = n)

n*Psi(n+1/2-(1/2)*(-4*n^2+1)^(1/2))/(-4*n^2+1)^(1/2)-n*Psi(n+1/2+(1/2)*(-4*n^2+1)^(1/2))/(-4*n^2+1)^(1/2)-n*Psi(1/2-(1/2)*(-4*n^2+1)^(1/2))/(-4*n^2+1)^(1/2)+n*Psi(1/2+(1/2)*(-4*n^2+1)^(1/2))/(-4*n^2+1)^(1/2)

(5)

"(->)"

n*Psi(n+.5000000000-.5000000000*(-4.*n^2+1.)^(1/2))/(-4.*n^2+1.)^(1/2)-1.*n*Psi(n+.5000000000+.5000000000*(-4.*n^2+1.)^(1/2))/(-4.*n^2+1.)^(1/2)-1.*n*Psi(.5000000000-.5000000000*(-4.*n^2+1.)^(1/2))/(-4.*n^2+1.)^(1/2)+n*Psi(.5000000000+.5000000000*(-4.*n^2+1.)^(1/2))/(-4.*n^2+1.)^(1/2)

(6)

````

``


 

Download Summation_problem.mw

Dear Users!

Hope you would be fine. I want to construct system of equations by comparing the likes powers of x^i*y^j*t^k1*exp(k2*eta) for an expression H1 present in attached file. Please see the fix my problem. I shall be very thankful for your kind help. 

Help.mw

From  time to tiime Malel emits a sort of "Boiing" noise when I make a keyboard error. I am not sure exaclty when it does this, but it is loud. Is it possible to turn it off? I have looked quite extensively and cannot find out anything.

How to compute inverse of a square matrix in maple?

Like below matrix:

Matrix(6, 6, [[1/EE__1, -nu__21/EE__2, -nu__31/EE__3, 0, 0, 0.], [-nu__12/EE__1, `#mn("1")`/EE__2, -nu__32/EE__3, 0, 0, 0.], [-nu__13/EE__1, -nu__23/EE__2, `#mn("1")`/EE__3, 0, 0, 0], [0, 0, 0, 1/GG__23, 0., 0], [0, 0, 0, 0., 1/GG__13, 0], [0., 0., 0, 0, 0, 1/GG__12]])

Maple help say there is a mode n number, but what actually is it?

In the following problem at two example are given. For Z=2 the sum is converging whereas at Z=4 it is not converging. Thank you

 

PROBLEM.mw

I have a problem writing a program for the numerical solution of nonlinear volterra integral equation using the method of reproducing kernel space. I have my algorithm as well as the program I tried to write, though they are full of error messages. Please could anyone give me a clue on how to go about my challenges. The algorithm is as follows:

Step 1. Fix 𝑎 ≤ 𝑥 and 𝑡 ≤ 𝑏.
If 𝑡 ≤ 𝑥, set 𝑅𝑥(𝑡) = 1 − 𝑎 + 𝑡.
Else set 𝑅𝑥(𝑡) = 1 − 𝑎 + 𝑥.
Step 2. For 𝑖 = 1, 2, . . . , 𝑚 set 𝑥i = (𝑖 − 1)/(𝑚 − 1).

Set 𝜓i(𝑥) = 𝐿t𝑅𝑥(𝑡)|𝑡=𝑥i .
Step 3. Set 𝑢0(𝑥1) = 𝑢(𝑥1).
Step 4. For 𝑖 = 1, 2, . . . , 𝑚 set 𝛾ij = [𝜓-1]ij.
Step 5. 𝑛 = 1.
Step 6. Set Sn = Σ𝑛
𝑘=1 𝛾nk𝑢k-1(𝑥k).
Step 7. Set 𝑢n(𝑥) = Σ𝑛
𝑖=1 Si𝜓i(𝑥).
Step 8. If 𝑛 < 𝑚then set 𝑛 = 𝑛 + 1 and go to step 6.
Else stop.

So I have this system of equations with which I am not sure if the result is the same or not using "series" and "limit" or what is going on here.

I hope it is clear what I mean.


 

restart; with(MathematicalFunctions); Assume(k__2H2O > 0, `k__HA+OH` > 0, `k__A+H2O` > 0, `k__H3O+OH` > 0, `k__HA+H2O` > 0, `k__H3O+A` > 0, HA__0 > 0, H2O > 0); sys := k__2H2O*H2O^2+`k__A+H2O`*H2O*(HA__0-HA)-(H3O*`k__H3O+OH`+HA*`k__HA+OH`)*OH = 0, k__2H2O*H2O^2+`k__HA+H2O`*H2O*HA-(`k__H3O+A`*(HA__0-HA)+`k__H3O+OH`*OH)*H3O = 0, (H2O*`k__HA+H2O`+OH*`k__HA+OH`)*HA-(H2O*`k__A+H2O`+H3O*`k__H3O+A`)*(HA__0-HA) = 0; sys := `~`[simplify]([eval(eval(sys, HA = HA__0+OH-H3O), HA__0 = x__HA0*H2O)]); sol := solve(sys, [OH, H3O]); sol := sol[1]; OH__sol := simplify(rhs(sol[1])); H3O__sol := simplify(rhs(sol[2])); simplify(OH__sol*H3O__sol); OHH3O := simplify(limit(%, `k__HA+OH` = 0)); series(OHH3O, x__HA0 = 0, 2); collect(convert(%, polynom), x__HA0, simplify, factor); r1 := limit(%, x__HA0 = 0); r2 := radnormal(limit(OHH3O, x__HA0 = 0)); simplify(r1-r2)

[`&Intersect`, `&Minus`, `&Union`, Assume, Coulditbe, Evalf, Get, Is, SearchFunction, Sequences, Series]

 

{H2O::(RealRange(Open(0), infinity))}, {HA__0::(RealRange(Open(0), infinity))}, {k__2H2O::(RealRange(Open(0), infinity))}, {`k__A+H2O`::(RealRange(Open(0), infinity))}, {`k__H3O+A`::(RealRange(Open(0), infinity))}, {`k__H3O+OH`::(RealRange(Open(0), infinity))}, {`k__HA+H2O`::(RealRange(Open(0), infinity))}, {`k__HA+OH`::(RealRange(Open(0), infinity))}

 

k__2H2O*H2O^2+`k__A+H2O`*H2O*(HA__0-HA)-(H3O*`k__H3O+OH`+HA*`k__HA+OH`)*OH = 0, k__2H2O*H2O^2+`k__HA+H2O`*H2O*HA-(`k__H3O+A`*(HA__0-HA)+`k__H3O+OH`*OH)*H3O = 0, (H2O*`k__HA+H2O`+OH*`k__HA+OH`)*HA-(H2O*`k__A+H2O`+H3O*`k__H3O+A`)*(HA__0-HA) = 0

 

[-OH^2*`k__HA+OH`+((-x__HA0*`k__HA+OH`-`k__A+H2O`)*H2O+H3O*(`k__HA+OH`-`k__H3O+OH`))*OH+k__2H2O*H2O^2+`k__A+H2O`*H2O*H3O = 0, (x__HA0*`k__HA+H2O`+k__2H2O)*H2O^2+`k__HA+H2O`*(OH-H3O)*H2O+(-`k__H3O+A`*H3O+OH*(`k__H3O+A`-`k__H3O+OH`))*H3O = 0, H2O^2*x__HA0*`k__HA+H2O`+((x__HA0*`k__HA+OH`+`k__A+H2O`+`k__HA+H2O`)*OH-H3O*(`k__A+H2O`+`k__HA+H2O`))*H2O+(OH-H3O)*(H3O*`k__H3O+A`+OH*`k__HA+OH`) = 0]

 

-RootOf(-x__HA0*`k__A+H2O`^2*`k__HA+H2O`+k__2H2O^2*`k__H3O+A`-k__2H2O*`k__A+H2O`^2-k__2H2O*`k__A+H2O`*`k__HA+H2O`+(2*x__HA0*`k__A+H2O`*`k__H3O+OH`*`k__HA+H2O`-k__2H2O*`k__A+H2O`*`k__H3O+A`+k__2H2O*`k__A+H2O`*`k__H3O+OH`+k__2H2O*`k__H3O+OH`*`k__HA+H2O`)*_Z+(-x__HA0*`k__H3O+OH`^2*`k__HA+H2O`-k__2H2O*`k__H3O+A`*`k__H3O+OH`+`k__A+H2O`^2*`k__H3O+OH`+`k__A+H2O`*`k__H3O+OH`*`k__HA+H2O`)*_Z^2+(`k__A+H2O`*`k__H3O+A`*`k__H3O+OH`-`k__A+H2O`*`k__H3O+OH`^2-`k__H3O+OH`^2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__A+H2O`*`k__H3O+A`*`k__HA+H2O`+2*`k__A+H2O`*`k__H3O+OH`*`k__HA+H2O`+`k__H3O+OH`*`k__HA+H2O`^2)*`k__A+H2O`*`k__HA+H2O`*H2O^2*x__HA0/((`k__A+H2O`*`k__H3O+A`-`k__A+H2O`*`k__H3O+OH`-`k__H3O+OH`*`k__HA+H2O`)*(k__2H2O*`k__H3O+A`^2-`k__A+H2O`^2*`k__H3O+OH`-2*`k__A+H2O`*`k__H3O+OH`*`k__HA+H2O`-`k__H3O+OH`*`k__HA+H2O`^2))-(k__2H2O*`k__H3O+A`-`k__A+H2O`^2-`k__A+H2O`*`k__HA+H2O`)*H2O^2*(`k__A+H2O`+`k__HA+H2O`)/(`k__H3O+A`*(`k__A+H2O`*`k__H3O+A`-`k__A+H2O`*`k__H3O+OH`-`k__H3O+OH`*`k__HA+H2O`))

 

-(k__2H2O*`k__H3O+A`-`k__A+H2O`^2-`k__A+H2O`*`k__HA+H2O`)*H2O^2*(`k__A+H2O`+`k__HA+H2O`)/(`k__H3O+A`*(`k__A+H2O`*`k__H3O+A`-`k__A+H2O`*`k__H3O+OH`-`k__H3O+OH`*`k__HA+H2O`))

 

k__2H2O*H2O^2/`k__H3O+OH`

 

-`k__A+H2O`*(-(`k__A+H2O`+`k__HA+H2O`)^2*`k__H3O+OH`+k__2H2O*`k__H3O+A`^2)*H2O^2/(`k__H3O+OH`*`k__H3O+A`*((-`k__A+H2O`-`k__HA+H2O`)*`k__H3O+OH`+`k__A+H2O`*`k__H3O+A`))

(1)

``


 

Download Mapleprimes_-_Ionproduct.mw

As an example, the two-dimensional Array created by

A := Array(triangular[upper], 1..100, 1..100);

has both indexing function and storage "triangular[upper]", which is fine. However, the attempt

B := Array(triangular[upper], 1..100, 1..100, 1..100);

to make a three-dimensional analogue did not work: It returns "Error, triangular[upper] indexing is only valid with 2 dimensions". A similar error message is returned when I replace "triangular[upper]" by "symmetric".

(For definiteness, by a higher-dimensional symmetric Array I would like to understand an Array with entries that are invariant under every permutation of their indices. Similarly, I would call the Array upper-triangular if only its entries with non-decreasing indices can be non-zero.)

For a first solution attempt, I mimic a higher dimensional upper-triangular Array by instead creating a multiply nested one-dimensional Array, where the one-dimensional subarrays become shorter and shorter. I did some preliminary testing with CodeTools[Usage] and the memory and timing results seem to compare favorably to naively using standard rectangular Arrays.

It seems more natural to write my own indexing function. However, I am not sure how to write a suitable corresponding storage function, as the documentation on that latter subject mentions only Vectors and Matrices. Is it possible and advisable to write my own storage function, or is there yet another more natural and memory-efficient way to store higher-dimensional structured Arrays (with symbolic data) in Maple? 

Thank you very much for any insights, particularly documentation pointers.

Sebastiaan Janssens.

 

is there example data that can verify maxwell equations?

How to calculate determinant of a cube matrix ?

is there function to calculate 3x 3x 3 cube determinant?

How to proof classical and quantum both p summation equal to one in maple?

with(linalg):
A := matrix([[1,0],[0,1]]);
AA := exponential(t*A);

A := matrix([[-i/h,0],[0,-i/h]]);
AA := exponential(t*A);
Error, (in evalf/matrixexp) cannot determine if this expression is true or false: 0.9482523555e34*abs(t*i) < 1

arctan(sqrt(3)/2/(1/2));
cos(Pi/3) + i*sin(Pi/3);

exp(i*Pi/3);

cos(Pi/3) + i*sin(Pi/3) - exp(i*Pi/3);

with(ScientificConstants):
Constant(hbar);
h := evalf(%);
dsolve(diff(s(t),t) + i/h*s(t)=0,s(t));
dsolve(diff(s(t),t) + i*s(t)=0,s(t));
 

after solve differential equation, there is no Pi/3, 

can s(t) be a matrix ?

where do Pi/3 come from?

then i try Ket

with(Physics);
K1 := Ket(&psi;t);
dsolve(diff(K1,t) + i/h*K1=0,K1);

Error, invalid neutral operator;
Ket is matrix or complex number ?

and how to solve?

First 108 109 110 111 112 113 114 Last Page 110 of 334