Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I have attached a maplework please check it. I want to solution graph by using RK 4th order with shooting technique or RK Fehlberg method. help.mw

Maple Worksheet - Error

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

Download help.mw

 

Let S be a set of sets.
Let T be a set of sets such that:
1. For every t from T and s from powerset of S the intersection of elements of (s union {t}) is either {} or t.
2. Every two elements of T are disjoint.
What is S -> T?

 

Hi MaplePrimes team,

 

I am aware that Maple is not designed for CAD and I am not here for you to help me build any advanced system like the example below.

 

Figure 1: Trimmed surface of fuselage to create airplane windows.

 

Here I my problem. Even using the adaptmesh option, creating serious trimmed surfaces requires large numbers of grids like for example [3000, 3000] and even beyond, which makes a mesh unnecessary on most of the surface and especially where we don’t need high resolution.

While if we limit the display volume with the Maple’s view command (view = [x1..x2, y1..y2, z1..z2]), the edges are always smooth regardless of the coordinates system or the type of mesh of the surface to be treated.

 

And so, the reason I’m writing this message is to ask you why creating trimmed surface with plot3d surface wouldn’t use Maple view’s algorithm to get smooth edges?

 

Future Alternative Solution:

I also take this opportunity to ask you when would it be possible to update the Maple’s grid option such that the point space will variable in term of surface variable. For example:

plot3d(<x(s,t), y(s,t), z(s,t)>, s = s1..s2, t = t1..t2, grid = [m(s,t), n(s,t)] )

 

I am sure that this solution, which for me does not seem to be difficult to implement, could be an alternative to enrich the mesh where we really need it and therefore a better control. What do you think?

 

Thank you in advance.

 

Best.

 

Guy.

In worksheet mode, when typing only the first 3 letters of the command piecewise, the command completion popup shows and I can hit TAB to have it automatically complete which is nice since I always makes typos tying this command

  >pie

When when I wanted to get help on the same command, I have to type 5 letters now before the popup shows to help me complete the command

 >?piece

Why is that? I would have expected the same 3 letters to be enough, as I assume Maple is smart enough to notice this.

Here is a movie to illustrate. This is Maple 2021.1 on windows 10

   

I am trying to export a 3D plot from Maple (2021) in a vector format that can be imported into Adobe Illustrator without too much trouble. The graphic artist says the PDF files are not useful (“at the base of every PDF is an image file, inside layers and layers of clipping paths; not helpful”). “SVG does not appear to produce usable vectors – well, maybe not, but the one you sent me was super difficult to wrangle”. She had hoped that EPS would be useful, but she was unable to open the EPS file I created (not enough memory).

Here is the example that I have been using as I've asked others for help with this question.

restart;
with(plots);
with(plottools);

T := torus([0, 0, 0], 1/2, 1/2);
C0 := spacecurve([cos(t), sin(t), 0], t = 0 .. 2*Pi, color = red, thickness = 9);
C1 := spacecurve([0.5*cos(t), 0.5*sin(t), 0.5], t = 0 .. 2*Pi, color = red, thickness = 9);
C2 := spacecurve([0.5*(1 + cos(t)), 0, 0.5*sin(t)], t = 0 .. Pi, color = blue, thickness = 9);
C3 := spacecurve([0.5*(-1 + cos(t)), 0, 0.5*sin(t)], t = 0 .. Pi, color = blue, thickness = 9);
Fig9510 := display([T, C0, C1, C2], view = [DEFAULT, DEFAULT, 0 .. 1/2], scaling = constrained, transparency = 0.75);

Direct links to the worksheet and the PDF, EPS, and SVG files on DropBox are provide below in the hope that something will be useful to somebody. (MaplePrimes links are provided for the MW and PDF files are also provided - but EPS and SVG files are not permitted.)

  1. 3DPlotExample.mw: https://www.dropbox.com/s/mx1hg1ntuqihnu3/3DPlotExample.mw?dl=0
  2. Fig9510.pdf: https://www.dropbox.com/s/bnzfqrh060gw84g/Fig9510.pdf?dl=0
  3. Fig9510.eps: https://www.dropbox.com/s/h9bjyn0uwm8w5ct/Fig9510.eps?dl=0
  4. Fig9510.svg: https://www.dropbox.com/s/u2xfntnqvbhu810/Fig9510.svg?dl=0

This question has been asked for more than ten years. The best solution to has been to use the command-line-interface version of Maple.

  1. Is the command-line interface still the best/only option for vector-based graphics output?
  2. If so, how do i access the command-line version of Maple 2021 on MacOS?

The attached worksheet is a stripped down version of some notes I am creating concerning the solution of vector equations in geometric algebra.  For the purposes of explanation it is best to show the math in its conventional typeset form before showing how to solve the equations in maple. The non-excutable math is in the text which is contained in a paragraph inserted before the execution group. In the first instance, the typesetting engine seems content to leave the text alone, but in the second case (which I created in the same way) it insists on parsing the equations and generating errors. I have tried repeatedly to make the second set of equations non-executable (since in maple terms they are nonsense) to no avail.
Can anyone suggest how I can use maple's text features to make the explanatory text inert.

Note that I have included the calls to my geometric algebra module in case they have some relevance to the problem, but they will not execute without the module.

Sample worksheet:  nonexecmatherror.mw

We consider a triangle ABC, its circumscribed circle (O), of radius R, its inscribed circle (I) of centre I. We designate by α, β, γ the points of contact of BC, CA, AB with the circle (I), by A', B', C' the points of meeting other than A, B, C, of AI, BI, CI with the circle (O), by the media of BC, CA, AB.
.Establish that there is a conic (E), focus I, tangent to βγ, γα, αβ.
My code : 

restart;
with(geometry);
with(plots); _local(gamma);
_EnvHorizontalName := x; _EnvVerticalName := y;
alias(coor = coordinates);
point(A, -5, -5); point(B, 7, -1); point(C, 1, 5);
triangle(ABC, [A, B, C]); circumcircle(_O, ABC, 'centername' = OO); incircle(_I, ABC, 'centername' = Io);
line(lBC, [B, C]); sol := solve({Equation(_I), Equation(lBC)}, {x, y}); point(alpha, subs(sol, x), subs(sol, y));
line(lCA, [C, A]); sol := solve({Equation(_I), Equation(lCA)}, {x, y}); point(beta, subs(sol, x), subs(sol, y));
line(lAB, [A, B]); sol := solve({Equation(_I), Equation(lAB)}, {x, y}); point(gamma, subs(sol, x), subs(sol, y));
line(lAO, [A, OO]); intersection(Ap, lAO, lBC);
line(lBO, [B, OO]); intersection(Bp, lBO, lCA);
line(lCO, [C, OO]); intersection(Cp, lCO, lAB);
midpoint(l, B, C); midpoint(m, A, C); midpoint(n, A, B);
triangle(T, [alpha, beta, gamma]);
dr := draw([ABC(color = blue), _O(color = red), _I(color = magenta), lAO(color = black), lBO(color = black), lCO(color = black), T(color = red), alpha, beta, gamma, Ap, Bp, Cp, l, m, n], printtext = true);
display([dr], axes = normal, scaling = constrained, size = [800, 800]);
How to find the Equation of (E); Thank you.

Why is the minus sign so weak even in the bold font case? My students sometimes miss it in online tests.
How do we make the minus sign bolder?
Thank you!

mapleatha

 

There seems to be an "issue" when using a indexed name (say x[4]) as the loop index in a seq() mul() or add() command - the indexed name is assigned once the command exits!!

This never(?) happens if the loop index is not an indexed name. A bug??

See the attached which illustrates the issue for the add() command, where x[4] is assigned on exit from add(). The same thing happens if add() is replaced with seq() or mul()

  restart;

#
# x[4] should not be assigned on exit from add() !!
#
  add( u(x[4]), x[4]=1..10);
  x[4];
#
# x__4 is not assigned on exit from add()
#
  add( u(x__4), x__4=1..10);
  x__4;
#
# j is not assigned on exit from add()
#
  add( u(j), j=1..10);
  j;

u(1)+u(2)+u(3)+u(4)+u(5)+u(6)+u(7)+u(8)+u(9)+u(10)

 

10

 

u(1)+u(2)+u(3)+u(4)+u(5)+u(6)+u(7)+u(8)+u(9)+u(10)

 

x__4

 

u(1)+u(2)+u(3)+u(4)+u(5)+u(6)+u(7)+u(8)+u(9)+u(10)

 

j

(1)

 


 

Download aBug.mw

 

 

My PC is dual-booted (Win10 and Ubuntu 20.04+KDE). After creating a plot (even the simplest one) and enabling Probe Info as described in  https://www.maplesoft.com/support/help/maple/view.aspx?path=worksheet%2Fplotinterface%2Fpointprobei I do not see tooltip with cursor position. All other tooltips (Palettes, Toolbar etc.) work fine, it is only the probe Info tooltip that does not work. The same plot done while running Maple on Win10 works as expected - tooltip is visible. 

Can someone confirm whether it works for them using Linux? I wonder whether this could be Java-related problem when running on Linux KDE with compositing and using Nvidia driver (e.g. color of tooltip is white on white, or rendering does not work as expected).

I do not remember whether it ever worked on Linux. At this moment I am using Maple2021 but for testing purposes I reinstalled Maple2020 and the problem is the same.

Thanks,

Alex

I have plain text file generated, where each line has mixed numbers and strings. Some of the strings are latex. So they have "\" in them. The data is rectangle. same number of fields on each line, separated by commas.  I use CSV format to read the data to Maple.

I simply want to read this file using Import , which reads it into a matrix (using CSV format), and export it back right away using either ExportMatrix or Export and end up with the same exact file.

But Maple always adds extra "\" each time I export the matrix back to the file. So if I have initially "\sin x" in the file, after reading/writing the file 5 times without touching the data inside Maple, I end up with something like "\\\\\\\\\\\sin x" in the file at the end.

I could ofcourse not use ExportMatrix nor Export and write the data back to the file manually using fprintf using correct format for each field. But it is easier if I can get ExportMatrix to work since there are many fields some are integers, some are real and some are strings.

Here is a simple MWE which shows the problem. Originally I have this file on disk. Called test.txt and has 2 lines in it

1,"\sin x"
2,"this is second line"

Now after doing the following

data:=Import("test.txt",format="CSV",output=Matrix):  
ExportMatrix("test.txt",data,target=csv);

The file on disk now becomes

1,"\\sin x"
2,"this is second line"

And repeating the above one more time, the file becomes

1,"\\\\sin x"
2,"this is second line"

This ofcourse breaks all the latex strings in there.

Is there a way to prevent Maple from doing this? I looked at all the options in help, but do not see on so far.  I also tried Export but that did not work at all. So I'd like to see if ExportMatrix can do it, without adding an extra "\", otherwise, will have to use fprintf directly to export the data back to file.

edit

fyi, I ended up using fprintf to write the data back to disk. May be if there is a solution using ExportMatrix, will change back. This is what I ended up doing

File before

1,"\sin x"
2,"this is second line"

Now run this code

data:=Import("test.txt",format="CSV",output=Matrix):  
file_id := fopen("test.txt",WRITE):
nRows:=LinearAlgebra:-RowDimension(data);
for n to nRows do
    if n<nRows then
       fprintf(file_id,"%d,\"%s\"\n",data[n,1],data[n,2]);
    else
       fprintf(file_id,"%d,\"%s\"",data[n,1],data[n,2]);
    fi;
od;
fclose(file_id);

File after

1,"\sin x"
2,"this is second line"

Now the file is exactly the same as before reading it.

My actual data is more than the above two fields, but that makes the format string longer, that is all.

 

Hi 

As the titel states: It is possible to create a asymptotic bode plot in maple?

I know how to do a normal bode plot with the DynamicSystem package. But is it possible to get a straight line approximation/ asymptotic bode plot instead?

I discovered the MRB constant (CMRB) while using Maple. Since then, I've found many formulas related to it, including its integrated analog the MKB constant (MKB). They're both found in Google scholar!

However, I am stuck on proving the following.