Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Implementation of Maple apps for the creation of mathematical exercises in
engineering

In this research work has allowed to show the implementation of applications developed in the Maple software for the creation of mathematical exercises given the different levels of education whether basic or higher.
For the majority of teachers in this area, it seems very difficult to implement apps in Maple; that is why we show the creation of exercises easily and permanently. The purpose is to get teachers from our institutions to use applications ready to be evaluated in the classroom. The results of these apps (applications with components made in Maple) are supported on mobile devices such as tablets and / or laptops and taken to the cloud to be executed online from any computer. The generation of patterns is a very important alternative leaving aside random numbers, which would allow us to lose results
onscreen. With this; Our teachers in schools or universities would evaluate their students in parallel on the blackboard without losing the results of any student and thus achieve the competencies proposed in the learning sessions.
In these apps would be the algorithms for future research updates and integrated with systems in content management. Therefore what we show here is extremely important for the evaluation on the blackboard in bulk to students without losing any scientific criteria.

FAST_UNT_2018.mw

FAST_UNT_2018.pdf

Lenin Araujo Castillo

Ambasador of Maple

 

I am perplexed about the geometry and plots packages.  When starting a programme involving geometric shapes, how does one decide which to use?  ..Or can the two packages be used in the same programme?  To iiiustrate my question there is a text program below which draws a diagram of a large square, with a circle inscribed tangentially to the square.  There is then a further smaller concentric circle, with a square drawn inside; the vertices touching this circle.  (It isdesigned as a problem suitable for young high-school teenagers.)

   I wanted to fill in various regions of this diagram in colors red and green.  I believe the with(geometry) package does this easily.  However, as I'm more used to the with(plots) package I stuck to this.  To get the coloured regions I drew a sequence of colored lines.  I also drew a colored square (See    SmallSq:=[op(SmallSq),sq_small||ii]:   ) by drawing a seq of concentric squares.  At the end of my program there are two almost identical plots[display] commands.   The difference is that the first does not incude the SmallSq.  I was expecting the two displays to be identical, since I'd specified the color white.  The first display has a dark colored square.  Why?? .  

   .   The program is very klutsy!  I'm embarrassed to publish it:-(  The SmallSq is adequate for my purposes, but has several white spaces - almost dots - on the dark version.  The thickness and style of the lines was the widest possible  - perhaps I should have set the larger rarius R, to a bigger value?

   And I have a feeling this diagram could have been constructed ib the geometry package in far fewer lines of code!

As always, any comments, suggestions would be most appreciated.

  David

 

 

> restart:
> # # # # # # # # # # # # # # # # # # # # # # # # # # # #

# Maple 7
> # Area puzzle involving squares & circles
> #To Do:  fill areas with color
> #  Use segment command and seq to make a set of colored lines
> #NB  Numbering for lines L1 is 1,2,3,4 for N,E,S,West
> #    Numbering for lines L2 is 1,2,4,3 for N,E,S,West
> # # # # # # # # # # # # # # # # # # # # # # # # # # # #
> with(plots):
> with(plottools):
> print(`The diagram shows two squares and two circles.`);
> print(`The red and green regions are equal in area.`);
> print(`To find the ratio of the radius of the large circle to the
> smaller.`);

> #Doesn't seem to like a combination of geometry & with plots
> #with(geometry);
> r:=R*sqrt((4-Pi)/(Pi-2));  #for the pretty printout only!
> R:=49:
> r:=R*sqrt((4-Pi)/(Pi-2)):  #give r a numerical value
> c_big := circle([0,0], R, color=red):
> c_small := circle([0,0], r, color=green):
> sq_big := rectangle([-R,R], [R,-R], color=white):
> #sq_small := rectangle([-r/sqrt(2),r/sqrt(2)], [r/sqrt(2),-r/sqrt(2)],
> color=white):
> #y:=R/2:

> SmallSq:=[]:
> for ii from 1 to round(r) do
> sq_small||ii := rectangle([-ii/sqrt(2),ii/sqrt(2)],
> [ii/sqrt(2),-ii/sqrt(2)], color=white,linestyle=1 , thickness=3):
> SmallSq:=[op(SmallSq),sq_small||ii]:
> end do:

> Llines1:=[]:Llines2:=[]:Llines3:=[]:Llines4:=[]:
> for yy from 1 by 1 to R do
> l1||yy := line([-R,yy], [-sqrt(R^2-yy^2),yy], color=red, linestyle=1 ,
> thickness=3):
> l2||yy := line([sqrt(R^2-yy^2),yy], [R,yy], color=red, linestyle=1 ,
> thickness=3):
> l3||yy := line([sqrt(R^2-yy^2),-yy], [R,-yy], color=red, linestyle=1 ,
> thickness=3):
> l4||yy := line([-sqrt(R^2-yy^2),-yy], [-R,-yy], color=red, linestyle=1
> , thickness=3):
> #List of lines is Llines
> Llines1:=[op(Llines1),l1||yy]:
> Llines2:=[op(Llines2),l2||yy]:
> Llines3:=[op(Llines3),l3||yy]:
> Llines4:=[op(Llines4),l4||yy]:
> end do:
> first:=round(r*(sqrt(2))/2)+1:
> last:=round(r):
> L2lines1:=[]:L2lines2:=[]:L2lines2D:=[]:L2lines3:=[]:L2lines3Up:=[]:L2
> lines4:=[]:
> for yy from first by 1 to last do
> l2_1||yy := line([-sqrt(r^2-yy^2),yy], [sqrt(r^2-yy^2),yy],
> color=green, linestyle=1 , thickness=3):
> #l2_2||yy := line([yy,r/sqrt(2)],[yy,sqrt(r^2-yy^2)],  color=green,
> linestyle=1 , thickness=3):
> l2_2||yy := line([yy,sqrt(r^2-yy^2)],[yy,0],  color=green, linestyle=1
> , thickness=3):
> l2_2D||yy := line([yy,-sqrt(r^2-yy^2)],[yy,0],  color=green,
> linestyle=1 , thickness=3):

> l2_3||yy := line([-yy,-sqrt(r^2-yy^2)],[-yy,0],  color=green,
> linestyle=1 , thickness=3):
> l2_3Up||yy := line([-yy,sqrt(r^2-yy^2)],[-yy,0],  color=green,
> linestyle=1 , thickness=3):

> l2_4||yy := line([-sqrt(r^2-yy^2),-yy], [sqrt(r^2-yy^2),-yy],
> color=green, linestyle=1 , thickness=3):
> #List of lines is Llines
> L2lines1:=[op(L2lines1),l2_1||yy]:
> L2lines2:=[op(L2lines2),l2_2||yy]:
> L2lines2D:=[op(L2lines2D),l2_2D||yy]:
> L2lines3:=[op(L2lines3),l2_3||yy]:
> L2lines3Up:=[op(L2lines3Up),l2_3Up||yy]:
> L2lines4:=[op(L2lines4),l2_4||yy]:
> end do:


> plots[display](c_big,c_small,Llines1,Llines2,Llines3,L2lines1,L2lines2
> ,L2lines2D,Llines4, L2lines3,L2lines3Up,L2lines4,
> scaling=constrained);
> plots[display](c_big,c_small,Llines1,Llines2,Llines3,Llines4,L2lines1,
> L2lines2,L2lines2D,L2lines3,L2lines3Up,
> L2lines4,SmallSq,scaling=constrained);


Warning, the name changecoords has been redefined

Warning, the name arrow has been redefined


            The diagram shows two squares and two circles.


             The red and green regions are equal in area.


  To find the ratio of the radius of the large circle to the small\
        er.


                                     4 - Pi
                         r := R sqrt(------)
                                     Pi - 2
 

I'm a brand-new Maple user, so be gentle!

I was fooling around with a document and manually changed some fonts on various items, by just highlighting them and setting a new font.  I even selected everything and changed the font but not the size.  I didn't actually change any styles. 

I want to reset to the Maple default now, but can't seem to do it.  Format / Manage Style Sets... / Default Maple Style Set / OK doesn't do it, neither does Format / Manage Style Sets... / Load Style Set... navigating to the default stylesets\WorksheetDefault.mw and OK / OK.  Nothing seems to change.  I've been through Help:worksheet/documenting/styles and the verbiage doesn't match the dialog box screen shots there.  I'm not really sure what to do with that "help".

I can't seem to switch to a customized style set either.  If you manually change fonts, does that supercede the style?  Is there any way to revert?

Thanks for any help!

Hi,

I have a list of displayed sequences  

S[j]:=display(seq(R1[i],i= 1..ne),seq(R[i],i= 1..ne), scaling = constrained, axes = none);

that can be animated easily in a worksheet using the following command 

display(seq(S[n]$5, n=1..10), insequence=true);

but when I try to embed that in a maplet, it doesnt work. The problem is with insequence. I removed insequence and the maplet showed S[10]. What else can I use?  

What can I do to have the maplet show the sequence of displays? Is there a way to use the animate command here?

Thanks for the help. 


 

I'm trying to compute the flux over a closed cylinder but can't define the top and bottom.

For the envelope

works fine. But top and bottom?

 

why does the sum(sin(k), k = -214748364 .. 214748364) not equal 0?

This behavior seems rather odd.  Is it documented anywhere?

v := <a,b>;

_rtable[18446883876157227486]

 

a := 3: b := 4:

v;

_rtable[18446883876157227486]

 

convert(v, list);

[a, b]

 

I expected that final result to be [3,4].  Why is it [a,b]?

I know that I can do eval(convert(v, list)) to get the numerical value, but why is the eval necessary?

 

Hello everybody, 

I use Maple to obtain the solution of a reccurrence equation :
r := rsolve({u(n)=n*(u(n-1)+1), u(0)=0}, u)

Now I want to define a function s(n) wich returns the integer value of the nth term u(n).
In the attached file three different attempts to compute the numerical value of s(2) (you can replace "2" by any other positive integer) are given.

  • S := unapply(r, n);
     
  • S := unapply(convert(r, sum), n);
     
  • S := unapply(simplify(convert(r, sum)), n);


But none of them returns an integer and I'm always forced to apply some operation to "transform" the output into the desired integer.
Could you please help me to understand why it is so ?

Thanks in advance

2018.mw

 

​​​​​​use epilson- delta definition of a limit to prove that

Limit as x approaches 5 of 1/x =1/5

There seems to be a bug: in some of the cases, the intersection command works, in others it doesn't.

I'd appreciate any hints as to why this is the case.

 

intersection_of_two_lines.mw

Hello,

I think its a simple question and I hope, someone can help me. For Example:

I have a list of numbers ("M") and I want to write these numbers in a new List but with the restriction

if x<Mthen Mi*2
else Mi 

Can someone explain how to solve this in maple?

Thank you very much.
Maritn

 

I am looking for a pragmatic solution to the question: Can my rolled carpet fit inside a given cardboard box?

It is the (generally unsolvable) problem "straw in a box":

https://www.maa.org/sites/default/files/pdf/upload_library/22/Polya/jerrard93.pdf

...with the restriction that the cylinder is aligned along the spatial diagonal.

 

So the application is this:
Is it possible to put a 120cm long rolled (radius 10cm) carpet inside a cardbord box of (inner) dimensions 118cm x 58cm x 38cm ?

Maple code would be perfect, but I have very little Maple experience so I cannot even provide any attempts/code at this stage.

Thanks!

A Happy New Year, people in mapleprimes,

I have a question, but this might be an inappropriate question to this site.

In Introduction to Maple, there is a calculation with a double square root.
Related to it, I want to calculate the following expression, which has a value of zero.

-3*(sqrt(10+4*sqrt(5)))+sqrt(50+20*sqrt(5))+sqrt(10-4*sqrt(5))+sqrt(50-20*sqrt(5));

Is there any way to use maple  so as to explain how the above expression takes the value of zero?

On earth, I cannot understand why this takes zero.

I hope you will give me a hint.

Thanks in advance.

 

I am trying to assess stability from real roots of Eigenvalues that are returned in the RootOf from. I tried allvalues(), evalf() both return the same RootOf list. If memory serves me correctly any square matrix should have and Eigenvalue solution.

Any suggestions?

Eignevalues.mw
 

NULL

with(LinearAlgebra)

Xd := 1.81
Xq := 1.76; Xpd := .3; Xe := .65; re := 0.3e-2; et := 1.0

M := 7; Tdo := 8; Ke := 200; Te := 0.2e-1

Q := -2.7; k := 0.2e-1; m := 1; FORW := 1

D curve PointsPoints      
             
           Pt__a := 0, .66

Pt__b := .56, .55 
Pt__c := .94, .34; Pt__d := 1.0, 0; Pt__h := 1.0, 0; Pt__g := .95, -.311; Pt__f := .59, -.398; Pt__e := 0, -.428
PSS

KSTAB := 9.6

     
TW := 1.4; T1 := .154

T2 := 0.33e-1

P := 1

Q := -.5

eto := abs(et); Ipo := P/eto; Iqo := Q/eto; Eqo := sqrt((Iqo*Xq+eto)^2+(Ipo*Xq)^2); Eo := sqrt((-Ipo*re-Iqo*Xe+eto)^2+(Ipo*Xe-Iqo*re)^2); `sin&delta;o` := (eto*Ipo*(Xq+Xe)-re*Xq*(Ipo^2+Iqo^2)-eto*Iqo*re)/(Eqo*Eo); `cos&delta;o` := (eto*(eto+Iqo*(Xq-Xe)-Ipo*re)-Xe*Xq*(Ipo^2+Iqo^2))/(Eqo*Eo); iqo := (Ipo*(Iqo*Xq+eto)-Iqo*Ipo*Xq)/Eqo; ido := (Ipo^2*Xq+Iqo*(Iqo*Xq+eto))/Eqo; eqo := eto*(Iqo*Xq+eto)/Eqo; edo := iqo*Xq; A := re^2+(Xe+Xpd)*(Xq+Xe); K1 := Eqo*Eo*(re*`sin&delta;o`+(Xe+Xpd)*`cos&delta;o`)/A+iqo*Eo*((Xq-Xpd)*(Xq+Xe)*`sin&delta;o`-re*(Xq-Xpd)*`cos&delta;o`)/A; K2 := re*Eqo/A+iqo*(1+(Xq+Xe)*(Xq-Xpd)/A); K3 := 1/(1+(Xq+Xe)*(Xd-Xpd)/A); K4 := Eo*(Xd-Xpd)*(Xq+Xe)*`sin&delta;o`/A-re*`cos&delta;o`; K5 := edo*Xq*(re*Eo*`sin&delta;o`+(Xe+Xpd)*Eo*`cos&delta;o`)/(eto*A)+eqo*Xpd*(re*Eo*`cos&delta;o`-(Xq+Xe)*Eo*`sin&delta;o`)/(eto*A); K6 := eqo*(1-Xpd*(Xq+Xe)/A)/eto+edo*Xq*re/(eto*A); A4 := Matrix(6, 6, {(1, 1) = 0, (1, 2) = 377, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (2, 1) = -K1/M, (2, 2) = 0, (2, 3) = -K2/M, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (3, 1) = -K4/Tdo, (3, 2) = 0, (3, 3) = -1/(K3*Tdo), (3, 4) = -1/Tdo, (3, 5) = 0, (3, 6) = 0, (4, 1) = K5*Ke/Te, (4, 2) = 0, (4, 3) = K6*Ke/Te, (4, 4) = -1/Te, (4, 5) = Ke/Te, (4, 6) = 0, (5, 1) = -K1*KSTAB*T1/(T2*M), (5, 2) = 0, (5, 3) = -K2*KSTAB*T1/(T2*M), (5, 4) = 0, (5, 5) = -`#mn("1")`/TW, (5, 6) = -(T1+TW)/(T2*TW), (6, 1) = -K1*KSTAB/M, (6, 2) = 0, (6, 3) = -K2*KSTAB/M, (6, 4) = 0, (6, 5) = 0, (6, 6) = -`#mn("1")`/TW}); Eig := Eigenvalues(A4)

allvalues(Eig)

evalf(Eig[1])

RootOf(10000000000*_Z^6+(14285714290*`#mn("1")`+503236834300)*_Z^5+(5102040817*`#mn("1")`^2+718909763500*`#mn("1")`+1193248786000)*_Z^4+(256753486900*`#mn("1")`^2+1704641123000*`#mn("1")`-94259434520000)*_Z^3+(608800401100*`#mn("1")`^2-52350222800000*`#mn("1")`+1273591282000000)*_Z^2+(10698531930000*`#mn("1")`^2+632925408400000*`#mn("1")`+1000000)*_Z+226044788700000*`#mn("1")`^2-10000000)

(1)

``


 

Download Eignevalues.mw
 

 


 

Download Eignevalues.mw

 

 

Dears,

Consider the problem min{|a+2*i| : i integer}, where a is a number of the form 2k*t for a fixed integer k>1 and t in [0,1]. A simple checking shows that i must belongs to the interval [-(1+a)/2,(1-a)/2] and as the legth of this interval is 1, there is two integers in this interval.

How can I compute this integer i with Maple? The commad "ceil" not seem very suitable. Some idea?
Many thanks in advance for your comments.

5 6 7 8 9 10 11 Last Page 7 of 1357