MaplePrimes Questions

How to most effectively generate all matrices from zeros and ones (matrices size 6 by 6), such that in each row and in each column exactly 4 units. This problem was encountered in solving one problem in the field of entertaining mathematics. I know how to solve it in about 100 seconds, but I so far do not give my solution so that everyone can enjoy solving it.

My "for loop" index is being treated as a letter and not a number. The 'h' in my for loop is is supposed to be the index for these tables but the result is tables that have indices of the letter 'h'.  

The indexing for the 'Z' part works Z[h][1] ,Z[h][2] and Z[h][3] have numbers instead of the letter 'h' but the x1[h], y1[h] and Q[h][1],Q[h][2] and Q[h][3] are all 'h' indexed with no number as an index when I view this table in the variable viewer.

 

for h to 50 do :

Z[h][1] := s -> evalf(subs(x = x1[h](s), y = y1[h](s), Q[h][1])) ;

Z[h][2] := s -> evalf(subs(x = x1[h](s), y = y1[h](s), Q[h][2]));

Z[h][3] := s -> evalf(subs(x = x1[h](s), y = y1[h](s), Q[h][3])); 

end do:

the result is just using the last value of index 'h' and puting it in the first index of 'Q'. There is nothing defined with index 51.

Z[2][3](4*(1/50));
                            Q[51][3]
Z[9][3](4*(1/50));
                            Q[51][3]
 

if I hard code the index numbers then it works correctly but I do not want to hard code all 50 of these.  

Z[1][1] := s -> evalf(subs(x = x1[1](s), y = y1[1](s), Q[1][1]));
Z[1][1](4/50);
                   HFloat(-4.977040014616719)
Z[1][2] := s -> evalf(subs(x = x1[1](s), y = y1[1](s), Q[1][2]));
Z[1][2](3/50);
                  HFloat(-2.0000000000987943)
Z[1][3] := s -> evalf(subs(x = x1[1](s), y = y1[1](s), Q[1][3]));
Z[1][3](3/50);
                          1.563178208

 

Why is the for loop index variable 'h' treated as a letter and not evaluated to be a number in the indexing?

thanks . . . 

Although a very general question... does the rope break or not?

A 100 kg weight is hung from the center of a 1/4" polypropelene rope making an angle of 10 degrees at both ends with the horizontal.  According to some characteristics, the breaking strength of the rope is 1125 lbs or 5kN.  The safe load (safety factor of 12) drops the weight to  93.8 lbs or 0.417kN. Find the tension in the rope?  Is it strong enough?

Fairly easy to solve in Maple - just two equations two unknowns making t1 tension on one side and t2 tension on the other side

eq1 := t1*cos(80*Pi*(1/180))+t2*cos(80*Pi*(1/180)) = 100*9.8 # ΣFy=mg

eq2 := t1*sin(80*Pi*(1/180))-t2*sin(80*Pi*(1/180)) = 0 #ΣFx=0 hence basically t1=t2

solve([eq1,eq2])

                 {t1 = 2821.797537, t2 = 2821.797537}

Therefore the tension on the rope t1=t2 is 2821 N  (looks like way beyond the safety factor) so this means the rope will not break, correct?  or is it that the total tension becomes t1+t2=5642 N putting us over the 5kN and the rope breaks?

 

Hi!
I'm very new to Maple, so I apologize ahead if this is a stupid question.

It seems that my "Determinant" function is not working properly, as shown in the picture.
I simply defined the matrix M and called for the determinant, as instructed by the help system in Maple.

 

 

Does anyone know what's happening?

Thank you very much.

Hi

I need some code in maple thats help me to verify my hand notes:

Find the set of points z  ( z complex number ) such that the three points A=1, B=z, and C=1+z^2  will be  aligned.

Many thanks

 

B(t)B' '(t)A(t) - A(t)(B'(t))^2 -A' '(t)(B(t))^2 + A'(t)B(t)B'(t) - A(t)=0

 

hi

im beginner in maple, i have a parametric matrix that i want to muliply it in a vector of differential equations like below.

i have functions like thees;

u(x,y,z)=u0(x,y)+z*u1(x,y)

v(x,y,z)=v0(x,y)+z*v1(x,y)

matrix:  A=[a,b;c,d]

vector : b = [du/dx, dv/dy]

now i want to do like this:

C=A.B

but i dont know how to do this.

 

I am new to maple. how do i segregate different term in long PDE in maple

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

As can be seen in the example i have shown below, i have iterated the "collect" function a number of times as required for the number of distinct terms. Can someone please show me how i would specify that i would like to iterate a particular function 'N' times in the same manner i have done only 3 times in the example, ie suppose instead of the 3 variables i wish to collect for here (a[0],a[1],a[2]) i now must do so for another definition of F that has 'N' variables (a[0],a[1],a[2],....a[N]) 


 

F := ((1/2)*a[2]-a[1]+(1/2)*a[0])*n^2+(-(1/2)*a[2]+2*a[1]-(3/2)*a[0])*n+a[0]

((1/2)*a[2]-a[1]+(1/2)*a[0])*n^2+(-(1/2)*a[2]+2*a[1]-(3/2)*a[0])*n+a[0]

(1)

[factor(op(1, collect(collect(collect(F, a[0]), a[1]), a[2]))/a[2]), factor(op(2, collect(collect(collect(F, a[0]), a[1]), a[2]))/a[1]), factor(op(3, collect(collect(collect(F, a[0]), a[1]), a[2]))/a[0])]

[(1/2)*n*(n-1), -n*(n-2), (1/2)*(n-1)*(n-2)]

(2)

``


 

Download Asking_Again_About_iterations.mw

Currently working on Fourier series. Having trouble plotting the graph of the Fourier series and would love to add and use a package such as the one found here: https://www.maplesoft.com/applications/view.aspx?SID=4857 . I'm having trouble installing and using the package, though. Could anyone be so kind as to assist me in adding and using packages not already found in Maple?

I have the following integral, which is solved. int(14*t*exp(-t/3),t=0..infinity); It equals 126. I now need to find 90%, of the integral. This is just math and the answer is 113.40. The challenge is I need to prove this using maple. So I need to show how to get the upper limit to 11.67, which yeilds the answer of 113.40(rounded).  I just started pluging in numbers for the upper limit till I got my answer, but clearly, this is now what my instructor wants. I need the process for finding the upper limit. Any help would be appreciated.

A bride and groom are very torn on what flavor of wedding cake they should have. They decide to make the cake 1/3 chocolate, 1/3 vanilla, 1/3 strawberry. The bride values Chocolate five times as much as she values Vanilla, but she values Vanilla four times as much as she Values Strawberry. If the cake costs a total of $480, then in the value system of the bride, what is the cost of the entire Vanilla piece.

is there an algorithm to search whether protocol exist for movement of balls in different boxes

for example

assume there are 5 boxes, each box has a variable number of number balls

ball number 1 move from box 1 to box 3 and box 5

then when discover ball number 8 in any box, ball number 1 will disappear

if input data are 5 list of numbers each row

1. [1,2,3],[5,7,12],[12,14,15],[1,5,7,9,15],[12,13,14]

2. [2,3],[5,7,12],[1,12,14,15],[1,5,7,9,15],[1,12,13,14]

....

etc

 

In the unrelated discussion https://mapleprimes.com/questions/222768-Interrupting-An-Evaluation-Leaves-Mserver-Running
I asked Carl Love if he had an estimate of the number of builtin procedures in Maple.
Carl answered with the code you will find in the link.
His code came up with 316 and 320 in Maple 2016.2 and 2017.2, respectively.
He mentioned that the last one alphabetically was zip.
I happened to look up the help page for type/builtin and found the statement:

"It may be used with anames to list all builtin procedures. For example anames(builtin)."

So I tried:

AB:={anames(builtin)};
nops(AB); # 234 in Maple 2017.2
member(zip,AB); #false
op(3,eval(zip)); # builtin = 589 in Maple 2017.2
showstat(zip); # Works despite being builtin.

In Maple 2016.2 the corresponding numbers were 232 and 585.
So I'm left somewhat confused.
Apparently some procedures are less builtin than others? Does this just mean that the most difficult zipping is builtin, while simple stuff like the following is done by line 16 in the available code for zip?

showstat(zip,16..17);
zip(`=`,[a,b,c], [1,2,3]);


 

First 930 931 932 933 934 935 936 Last Page 932 of 2429