Maple 2020 Questions and Posts

These are Posts and Questions associated with the product, Maple 2020

In your answer, please include the calculation of the lamina's area and the location of its centre of mass.

Lamina.mw

I have an expression  

product(q^(n -2)- q^i, i = 0 .. r )/product(q^(n-2) - q^(i+1), i = 0 .. r)

 

Obviously, it can be further simplified.

But in maple I can't do that, I use simplify and expand , all failed.

simplify(expand(%))

What should I do to get the simplified result I want?

 

I just noticed that Maple 2020.1 (but not plain 2020) has an issue with print to PDF if you have a plot3d on a page.

Anything after the plot3d output on the same page of the PDF file is simply not shown.

The issue seems to be with both Windows and Mac which makes me suspect its a Maple problem.

Any info on this? Any workarounds? We have students with written exams in a week so its a bit annoying.

I did not know about these before. Was looking at 

https://fr.maplesoft.com/support/help/Maple/view.aspx?path=repository/management

And wanted to display the actual values of $MAPLE,$TOOLBOX, $VERSION,$HOME gives about. 

But everything I tried does not work. 

anames('environment');
getenv("$MAPLE");
print("$MAPLE/toolbox/$VERSION/$TOOLBOX/lib")

Where are these things defined and how to display them from inside Maple to see where they point to?

 

Maple 2020.1 on windows 10

 

dAlembert ode has the form

https://fr.maplesoft.com/support/help/Maple/view.aspx?path=odeadvisor/dAlembert

Which also agrees with textbooks and Wikipedia

 

https://en.wikipedia.org/wiki/D%27Alembert%27s_equation

 

 

So the ODE should have   x  in there (the independent variable).  

Then why  in the following, when I give Maple ode of form   y=f(p)+g(p)  it says it is d'Alembert? notice that there is no x in there

restart;
ode:=y(x)=ln(cos(diff(y(x),x)))+diff(y(x),x)*tan(diff(y(x),x))

DEtools:-odeadvisor(ode)

I am not saying Maple is wrong, as I am not sure, but I am just trying to understand what is going on. All references I've seen so far say x should be there.  Otherwise, how did Maple determine it is dAlembert if not using the orginal form to check against?

The strange thing is calling dsolve on the ode, with no option gives different answer if calling dsolve telling it is is dAlembert:

dsolve(ode,[dAlembert]);

but

dsolve(ode)

Why it did not give the same result? 

 

I noticed the following. I have 2 worksheets. A.mw and B.mw.  From A.mw, it does something as follows

libname := currentdir(), libname
foo();

Where foo() is entry inside my say TMP.mla in currentdir(). This works fine with no problems and foo() executes and complete OK.

Now I make changes to the code foo.mpl, and need to update TMP.mla. currently I use LibraryTools. But i'd like to delete TMP.mla each time and create new one so I am sure there is no problem. So from B.mw I run this code

libname:= currentdir(),libname;
FileTools:-Remove("TMP.mla");
LibraryTools:-Create("TMP.mla");
read "foo.mpl";
LibraryTools:-Save('foo',"TMP.mla");

This all works well, except it fails at the Remove line, since "TMP.mla" could not be removed, since it was open before when running the A workseet, and it seems to be still open and Maple could not delete the file.

So each time this happens, I close all worksheets, close Maple, open Maple again, and now I can run the above code OK to update the mla.

Is there a better way to do all of this?

I worry if I do not delete the mla each time, I could end up with old code there I do not want, if I rename things in my code. That is why I like to start with fresh mla file each time.  But I always have to restart Maple now to update the mla.

 

Hello

Since my solutions are neither efficient nor concise, I wonder if someone could help me with the following problem. Suppose

 

L:=[[[],[],3,2,1,4],[1,4,[],5,8,[]],[5,6,7,8,[],1]]:

(Just a short and simplified version - L is a huge list). I need the elements to be rearranged as follows

newL:=[[1,5],[4,6],[3,7],[2,5,8],[1,8],[4,1]]:

that is, the first sublist of newL contains the first elements of all sublists of L without [], the second sublist of newL contains the second elements of all sublists of L without [] and so on.  

How can that be achieved without seq and remove?

Many thanks

Ed

PS. My solution 

newL:=[seq(remove(y->y=[],map(x->x[i],L)),i=1..nops(L[1]))]

The size of the sublists does not change.  

Example of problematic file:  Model050913.mw

Maple 2020 (either 32- or 64-bit), Maple 2019, and Maple 2017 cannot open a .mw file that I created in 2006.  These Maple versions display this .mw file from 2006 as a garbled mess and cannot work with the garbled mess.  In contrast, Maple 18 opens this file from 2006 without problems.  Did the .mw file format change some time after Maple 18?  Interestingly, Maple 2020 can open a .mw version of the problematic 2006 file that I save with Maple 18.  Can Maple 2020 be updated so that Maple 2020 can open old .mw files (e.g., 2006 and earlier)?  Is the inability of Maple 2020 to open files from 2006 and earlier a bug in Maple 2020?  I can workaround this problem by using Maple 18.  But correcting a bug in Maple 2020 that garbles old .mw files would be helpful.

im solving 2 ODe with boundary conditions.. i got this error Error, (in dsolve/numeric/bvp/convertsys) too few boundary conditions: expected 10, got 8
 

from help, it says 

The expression assuming property calling sequence evaluates the expression under the assumption property on all names in expression.

Then why 

restart;
expr := Sum((-1)^n - 1, n = 1 .. infinity):
simplify(op(1,expr)) assuming n::even;

does not simplify expr to zero, while

restart;
expr := Sum((-1)^n - 1, n = 1 .. infinity):
assume(n::even):
simplify(op(1,expr))

does simplify expr to zero.


I would have expected both to give zero. 

 

I am trying to customize the Venn Diagram generated by the VennDiagram command in the Statistics package. I would like to be able to shade just any of the regions. For example, if only two sets (A and B) are being displayed, I would like to be able to shade just A, just B, both A and B, or both A and/or B. Also, is it possible to have a rectangle surrounding the circles which represents the universal set? Could the circles be labeled with the letter "A" or "B" to be able to identify each set?

venn.mw

Why is pdsolve's 'generalsolution' option giving the particular solution u(x, y) = 0 instead of the general solution u(x, y) = A sin(x) sin(2 y) + sin(2 x) sin(y) for the attached problem?

Problem.mw

Is there a way to convert a Fourier series (from the OrthogonalExpansions package) automatically into the sum of odd/even terms if the even/odd terms are 0 respectively?


 

restart

with(OrthogonalExpansions)

FourierSeries(x-2*Pi, x = 0 .. 4*Pi, infinity, series = cosine); simplify(subs(i = n, %))

Sum(8*((-1)^n-1)*cos((1/4)*n*x)/(n^2*Pi), n = 1 .. infinity)

(1)

Sum((-16*cos((1/4)*(2*k-1)*x))*(1/((2*k-1)^2*Pi)), k = 1 .. infinity)

Sum(-16*cos((1/4)*(2*k-1)*x)/((2*k-1)^2*Pi), k = 1 .. infinity)

(2)

``

Download FourierSeries.mw

@Carl Love
@acer
Hi. 

This Carl code works

standings_DRAW.mw

Could someone please make my modified code work:

(Case D should be the same as P-Q=0 , when integer score P,Q is entered and P=Q)

standings_SCORE.mw

EDIT: corrected and reuploaded: should have been if P-Q <> 0 rather than P-Q=0. changes in purple.

(ps I don't want a substitution D when P-Q=0)

Is there a way to get the generalized Fourier series with respect to an arbitrary orthogonal system (instead of just sin, cos, exp, etc.) using the OrthogonalExpansions package or any other way in Maple?

First 40 41 42 43 44 45 46 Last Page 42 of 55