Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I am teaching a course in biofluid mechanics and am looking to help the students get more use out of Maple. Often it is advantageous to scale a differential equation (and initial conditions) using dimensionless variables to reduce the number of free parameters in a problem. For example, the simple linear oscillator differential equation:

Eq(1)         m*d2x(t)/dt2 + k*x(t)=0

where k and m are parameters.  If we define a dimensionless time, s=t/T, and a dimensionless position, X=x/L, where T and L are constants, , Eq(1) becomes

Eq(2)         (mL/T2 ) *d2X(s)/ds2 +  kL*X(s)=0

Then choosing T=sqrt(m/k) we arrive at

Eq(3)         d2X(s)/ds2 +  X(s)=0

which has no parameters.  Can this sequence be done in Maple for a differential equation...i.e. change of variables?

Thanks

 

I recently moved to a new research institute and have to make a decision on either buy a licence for Maple or Mathematica. My needs are PDE hyperbolic system (e.g. shallow water, tsunami...) resolution and when possible export to standalone C/Fortran code based on package like MathPDE.

I know a little of Mathematica, but have a bunch of notebooks. I tried with the help of MapleSoft support to import them into Maple with no success so far.

So as I'm not tied to any of both, I have the impression that I would be more comfy with Mma but Maple is cheaper and seems more open. Is there any rationals for picking one over the other?


I have a difficult problem by NLPSolve & mnimize (optimization)

How do I solve the erroe"unexpected parameters" in Maple?

The code is uploade under the line.
Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/example1.mw .

Download example1.mw

Irrational numbers: numbers that cannot be represented as a ratio of integers. The decimal form of a rational number is non-repeating and non-terminating.

Change to:

Irrational numbers: numbers that cannot be represented as a ratio of integers. The decimal form of an irrational number is non-repeating and non-terminating. 

or change to

Irrational numbers can be represented by decimal fractions in which the digits go on forever without ever repeating a pattern.  See Downing, Douglas. Dictionary of Mathematics Terms. 2nd ed. Hauppauge, NY: Barron's Ed. Series, Inc., 1995, p. 176).

For most expressions e, op(0,e) gives the type, e.g. this works if e is of type string, list, set, Array, Vector, Matrix, '+', etc. This is not the case for procedure calls and indexed expressions, but these differences make sense. However, there are other puzzling differences, at least in Maple 2017.2, for which I can see no rationale.

Specifically, if e is a numeric type such as integer, float, or fraction, complex, then op(0,e) returns the capitalized version of the type, e.g. Integer. Note also that type(e,Integer) will generate an error message saying that type 'Integer' does not exist.

A Google search shows that in an old programming guide for Maple (Release V, p.135; copyright 1998), op(0,x) is "integer" if x is an integer, whereas in a more recent programming guide (the 2009 introductory one, p.53), it is capitalized, consistent with the behaviour in Maple 2017.

I do not understand why this change was made. Can anybody shed light on the situation?

The Joint Mathematics Meetings are taking place this week (January 10 – 13) in San Diego, California, U.S.A. This will be the 101th annual winter meeting of the Mathematical Association of America (MAA) and the 124nd annual meeting of the American Mathematical Society (AMS).

Maplesoft will be exhibiting at booth #505 as well as in the networking area. Please stop by our booth or the networking area to chat with me and other members of the Maplesoft team, as well as to pick up some free Maplesoft swag or win some prizes.

There are also several interesting Maple-related talks and events happening this week - I would definitely not miss the talk by our own Paulina Chin on grading sketch graphs.

 

Using Symbol-Crunching to find ALL Sucker's Bets (with given deck sizes). 

AMS Special Session on Applied and Computational Combinatorics, II 
Wednesday January 10, 2018, 2:15 p.m.-2:45 p.m.

Shalosh B. Ekhad, Rutgers University, New Brunswick 
Doron Zeilberger*, Rutgers University, New Brunswick 
 

Collaborative Research: Maplets for Calculus. 

MAA Poster Session: Projects Supported by the NSF Division of Undergraduate Education 
Thursday January 11, 2018, 2:00 p.m.-4:00 p.m.

Philip B. Yasskin*, Texas A&M University 
Douglas B. Meade, University of South Carolina 
Matthew Barry, Texas A&M Engineering Extension Service 
Andrew Crenwelge, Texas A&M University 
Joseph Martinson, Texas A&M University 
Matthew Weihing, Texas A&M University

 

Automated Grading of Sketched Graphs in Introductory Calculus Courses. 

AMS Special Session on Visualization in Mathematics: Perspectives of Mathematicians and Mathematics Educators, I 

Friday January 12, 2018, 9:00 a.m.

Dr. Paulina Chin*, Maplesoft 

 

Semantic Preserving Bijective Mappings of Mathematical Expressions between LaTeX and Computer Algebra Systems.

AMS Special Session on Mathematical Information in the Digital Age of Science, III 
Friday January 12, 2018, 9:00 a.m.-9:20 a.m.

Howard S. Cohl*, NIST 

 

Interactive Animations in MYMathApps Calculus. 

MAA General Contributed Paper Session on Mathematics and Technology 
Saturday January 13, 2018, 11:30 a.m.-11:40 a.m.

Philip B. Yasskin*, Texas A&M University 
Andrew Crenwelge, Texas A&M University 
Joseph Martinsen, Texas A&M University 
Matthew Weihing, Texas A&M University 
Matthew Barry, Texas A&M Engineering Experiment Station 

 

Applying Maple Technology in Calculus Teaching To Create Artwork. 

MAA General Contributed Paper Session on Teaching and Learning Calculus, II 
Saturday January 13, 2018, 2:15 p.m.

Lina Wu*, Borough of Manhattan Community College-The City University of New York

 

If you are attending the Joint Math meetings this week and plan on presenting anything on Maple, please feel free to let me know and I'll update this list accordingly.


See you in San Diego!

Daniel

Maple Product Manager

hello

How I can remove these errors?

Thanks

erorr.mw
 

NULL

 

 

restart; eq31g := diff(u(t), `$`(t, 2))+u(t)+mu[s]*(diff(u(t), t))^3 = (1-mu[s])*(diff(u(t), t))*(diff(u(t), `$`(t, 2)))

diff(diff(u(t), t), t)+u(t)+mu[s]*(diff(u(t), t))^3 = (1-mu[s])*(diff(u(t), t))*(diff(diff(u(t), t), t))

(1.1)

 

 

 

eq33a:=subs(t=tau/omega,value(subs(u(t)=u(omega*t),eq31g)));

diff(diff(u(tau), tau/omega), tau/omega)+u(tau)+mu[s]*(diff(u(tau), tau/omega))^3 = (1-mu[s])*(diff(u(tau), tau/omega))*(diff(diff(u(tau), tau/omega), tau/omega))

(2.1)

omgRule:=omega=1+add(epsilon^i*omega[i],i=1..2);

omega = epsilon^2*omega[2]+epsilon*omega[1]+1

(2.2)

uExpRule:=u(tau)=add(epsilon^i*u[i](tau),i=1..3);

u(tau) = epsilon*u[1](tau)+epsilon^2*u[2](tau)+epsilon^3*u[3](tau)

(2.3)

temp:=subs(uExpRule,omgRule,convert(eq33a,diff));

Error, invalid input: diff received tau/omega, which is not valid for its 2nd argument

 

eq33b:=convert(series(lhs(temp),epsilon,4),polynom)=0;

Error, invalid input: lhs received temp, which is not valid for its 1st argument, expr

 

eqEps:=seq(coeff(lhs(eq33b),epsilon,i)=0,i=1..3);

Error, invalid input: lhs received eq33b, which is not valid for its 1st argument, expr

 

The general solution of the first-order equation, eqEps[1], can be expressed as

sol1:=dsolve({eqEps[1],u[1](0)=a,D(u[1])(0)=0},u[1](tau));

Error, (in dsolve) not a system with respect to the unknowns [u[1](tau)]

 

eq33c:=subs(u[1]=u[2],lhs(eqEps[1])=lhs(eqEps[1]))-subs(sol1,0=lhs(eqEps[2]));

Error, invalid input: lhs received eqEps[1], which is not valid for its 1st argument, expr

 

Expanding the right-hand side of eq33c in a Fourier series using trigonometric identities yields

eq33c_RHS:=combine(rhs(eq33c));

Error, invalid input: rhs received eq33c, which is not valid for its 1st argument, expr

 

Eliminating the terms,  and , demands that . Then, the particular solution of eq33c can be expressed as

sol2:=combine(subs(_C1=0,_C2=0,dsolve(subs(omega[1]=0,eq33c),u[2](tau))));

Error, (in dsolve) expecting an ODE or a set or list of ODEs. Received eq33c

 

Substituting sol1 and sol2 into the third-order equation, eqEps[3], and using the fact that , we obtain

eq33d:=subs(u[1]=u[3],lhs(eqEps[1])=lhs(eqEps[1]))-subs(sol1,sol2,omega[1]=0,0=lhs(eqEps[3]));

Error, invalid input: lhs received eqEps[1], which is not valid for its 1st argument, expr

 

Expanding the right-hand side of eq33d in a Fourier series using trigonometric identities, we have

eq33d_RHS:=combine(rhs(eq33d));

Error, invalid input: rhs received eq33d, which is not valid for its 1st argument, expr

 

Eliminating the terms that lead to secular terms from eq33d_RHS demands that

omg2Rule:=omega[2]=solve(coeff(eq33d_RHS,cos(beta+tau)),omega[2]);

omega[2] = omega[2]

(2.4)

As discussed above, for a second-order uniform expansion, we do not need to solve for . Combining the first- and second-order solutions, we obtain, to the second approximation, that

combine(subs(sol1,sol2,uExpRule));

Error, invalid input: subs received sol1, which is not valid for its 1st argument

 

where

tau=subs(omega[1]=0,omg2Rule,subs(omgRule,omega*t));

tau = (epsilon^2*omega[2]+1)*t

(2.5)

``


 

Download erorr.mw

 

How do I take the square root of :

    X:= r2 (R + r cos(v))2

with the condition that R and r are positive and R>r and get:

r (R+ r cos(v))

I assume I need to use simplify with some assumptions, but I cannot figure it out.  

browsing on math.stackexchange I came across this maple code:

asympt(int(sqrt(-k^2+1)*exp(I*k*x), k = -1 .. 1), x, 2)

that gave the correct answer:

https://math.stackexchange.com/questions/532394/how-to-analyze-the-asymptotic-behaviour-of-this-integral-function

so I wondered would it not be great if maple done asymptotic expansion of integrals in general.

say as an example Li(x).  Can maple expand Li(x) and how?

 

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?

3 4 5 6 7 8 9 Last Page 5 of 1356