Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hello Friends.

I have created two piecewise functions: dx(t) and dy(t).  I then converted them to RandomVariables:  DX and DY.  When I try to perform a mathematical operation on the random variables, I get a Dirac function, which is unintended.  When I read about this issue, I learned that flawed (discontinuous) piecewise functions may be the problem.  However, my piecewise functions look ok to me.

Does anyone know why this is happening?  I do expect a lenghty result when I process the random variables, but not a Dirac function.  My code is below:

TriangleEuclidean.mw

I want to give my Tensor a the index i with define (a[i]) , but it is not allowed. Can anybody help ?

thank you !

Could someone please help me understand this

restart;
expr:=(A*x-1 )/x
eval(expr,x=infinity)
    # 0    why?

limit(expr,x=infinity)
   # A correct

How did Maple evaluate expr to zero when x=infinity? What math did it use to obtain this result? Did it may be just saw infinity in denominator and said the whole thing therefore is zero?  But there is infinity in the numerator also and infinity/infinity is not defined.

Maple 2026 and Maple 2025.5 on windows 10

Here is a minor nit regarding combining plots in Maple.

restart;

kernelopts(version);

`Maple 2024.2, X86 64 LINUX, Oct 29 2024, Build ID 1872373`

(1)

 

Plot the cardioids  1+`&+-`(cos*t) in polar coordinates:

pic1 := plot(1-cos(t), t=0..2*Pi, coords=polar);
pic2 := plot(1+cos(t), t=0..2*Pi, coords=polar);

 

 

 

When combining the plots, display() inherits the plotting range from the previous

plots, incorrecting taking it to be 0 .. 2*Pi
 

plots:-display(pic1, pic2, scaling=constrained);

 

To get the correct plot, we need to override the range determined by display():

plots:-display(pics, scaling=constrained, view=[-2..2,-2..2]);

 
 

 

Download mw.mw

I am trying to use the symbol Delta in front of a symbol to denote a change in the variable in Maple 2022.For exmaple Q':=Q+Delta_Q; But I can't figure out how to denote it: Delta_Q does not seem to work as it displays a literal "Delta_Q".

Maple 2026 can't solve this first textbook  ode. Book gives solution in the back which Mathematica gives, but for some strange reason, Maple dsolve can't solve it with the IC given. I also tried Maple 2025, it can't solve it.

ode:=diff(y(x),x)*sin(2*x) = 2*y(x)+2*cos(x); 
ic:=y(1/2*Pi) = 0; 
sol:=dsolve([ode,ic]);

No solution. returns ()

But this is the solution from book which Maple verfies is correct

book_sol:=y(x)=tan(x)-sec(x);
odetest(book_sol,[ode,ic])

gives [0,0]

Here is Mathematica also

Why Maple can't solve it? ofcourse it is not a bug not to be able to solve an ode, but Maple being the best ode solver in the world should have been able to solve it. I've also solved it by hand (it is just a linear first order ode) and got same solution. Maple can solve it without the IC. 

So the issue is in resolving constant of integration using IC is where the problem is.

May be someone could find why Maple can't solve for the constant of integration from the IC. Here is the solution without IC which Maple finds with no problem

ode:=diff(y(x),x)*sin(2*x) = 2*y(x)+2*cos(x); 
sol:=dsolve(ode);

Gabriel’s Horn is one of the most famous examples in calculus of how infinity can behave in ways that completely defy our intuition.

The horn-shaped object is created from a very simple curve: y = 1/x for x ≥ 1 (pictured below).

Now imagine rotating this curve around the x-axis. The resulting surface stretches infinitely far to the right while becoming thinner and thinner. Visually, it resembles a long trumpet or horn that continuously narrows to a thickness of zero.

At first glance, nothing about this shape seems particularly mysterious. As x grows larger, the radius 1/x becomes smaller and smaller. It seems reasonable that both the volume contained inside the horn and the area of its surface would remain finite (or at least if the volume was finite, then the surface area would also be finite). After all, the horn gets extremely thin very quickly.

Calculus allows us to test that intuition.

To compute the volume of the horn, we use the disk method. Each slice perpendicular to the x-axis forms a circular disk of radius r = 1/x, each with an area of π*r2 = π*(1/x2).



The total volume is the sum of an infinite number of these disc areas with thickness dx. As an integral,

V = π ∫₁^∞ (1/x²) dx.

This is a simple integral that converges to a value of 1. We could use the power or rule or our favourite computing software (I used Maple below).



Hence, V = π ∫₁^∞ 1/x² dx = π*1 = π. This means the horn contains only π cubic units of space, even though it extends infinitely far. 

Now let’s compute the surface area of the horn. For a surface of revolution, the surface area is

A = 2π ∫₁^∞ y √(1 + (y′)²) dx.

Since y = 1/x, we have y′ = −1/x². Substituting into the formula gives

A = 2π ∫₁^∞ (1/x) √(1 + 1/x⁴) dx.

Software like Maple can easily handle this integral. It tells us the integral diverges to infinity.

However, this is difficult to solve analytically. To understand what happens to this integral, notice that for large x, the square root term is very close to 1, since 1/x4 can be approximated as 0 as x grows large. This means the integrand behaves roughly like 1/x (it's actually slightly larger than 1/x). But

∫₁^∞ 1/x dx diverges, and ∫₁^∞ (1/x) √(1 + 1/x⁴) dx > ∫₁^∞ 1/x dx, so ∫₁^∞ (1/x) √(1 + 1/x⁴) dx must also diverge. As a result, the surface area of Gabriel’s Horn is infinite.

This leads to the famous, surprising conclusion:

  • The horn has finite volume.
  • The horn has infinite surface area.

In other words, it could be filled with a finite amount of paint, but it would require an infinite amount of paint to coat its inside surface.

Of course, real paint has thickness, so the paradox disappears in the physical world. Eventually, the horn would become thinner than the paint layer itself. But mathematically, the result is perfectly consistent.

The key idea lies in how quickly the function 1/x shrinks. The cross-sectional area of the disks scales like (1/x)² = 1/x², and the integral of 1/x² converges.

But the circumference of each slice scales like 1/x, and the integral of 1/x diverges.

So as the horn extends outward, the added volume decreases quickly enough to sum to a finite value, while the added surface area decreases too slowly and accumulates forever.

Gabriel’s Horn beautifully illustrates one of the central themes of calculus: infinite processes can produce results that feel deeply counterintuitive.

Volume and surface area seem closely related, but can behave in completely different ways when infinite limits are involved. A shape can stretch endlessly yet still contain a finite amount of space.

This strange object reminds me that mathematics isn’t just about calculating numbers, but is also about exploring the strange and fascinating consequences of simple ideas pushed to their limits.

According to the help text in Maple 2024.2, a number of classical integral equations can be solved using "intsolve". The Volterra equation of the first kind, with an upper limit of integration x, is of particular interest. A long time ago, I had to solve a similar equation. This one arose from a model of a real-world process, but instead of x, the upper limit of integration was the function y(x), which I had to calculate. I painstakingly solved it to a good approximation. Is there an algorithm in Maple that can at least calculate an approximate solution, or is a numerical solution, e.g., using Ritz, the only option?

edited: I forgot to upload an example

 test.mw

Hi,

I was running Maple 2022.2 on Windows 11 and now I am using Linux Mint. I ran into something today that doesn't work as expected on LM. I thought it did on Windows, but now I am not so sure.

At any rate, I am unable to browse large vectors or matrices with more than 10001 rows. I looked for a setting that lets me change it, but I can't find one. The data is there--I can plot it and export it, but I can't browse it.

Any thoughts? Thanks.

Cheers,

Jno.

There seems to be a regression in Maple 2026 in the XMLTools:-ParseFile function.

As Maple2026 is not yet in the list of products to be chosen, I have added it in the subject.

Error, (in XMLTools:-ParseFile) invalid input: too many and/or wrong type of arguments passed to XMLTools:-NSXML:-Parser:-ParseFile; first unused argument is prolog = true

The test file is right from the help related to ParseFile.
Test_XML.mw

Example: In the expression

expr:=1/sqrt(2)*(x+a);

I prefer the output

over

because it is shorter. To fix that I do

expr:=1/sqrt(2)*(x+a);
subs(sqrt(2) = 2/%sqrt(2), %)

The problem with that way is that all occurences of sqrt(2) are replaced, which I do not want. I only want to replace sqrt(2)/2.

I thought about selecting all products that contain 1/2 and sqrt(2) among others and apply the substitution only there.

How to do this in a (simple?) way?

Maybe there are other ways without subs.

Hi,

For a pedagogical purpose, I am trying to build an animation that illustrates the connection between:

  • the area under the curve of a probability density function, and

  • the cumulative distribution function of a random variable.

The idea is to let a bound x vary and show simultaneously:

  • the accumulated area under the density curve up to x;

  • the corresponding value of the CDF .

My goal is to obtain a visual representation that helps students clearly understand that the cumulative distribution function represents the accumulated area under the density function.

Do you have suggestions on how to organize this cleanly in Maple, possibly with synchronized animation or an interactive visualization?

Thank you very much for your help.

Q_CDF_PDF.mw

I could not find the style management straight away and asked Maples AI assistant. That did not work for the 2026 release since the format menu does not exist anymore (see below). My hope was that AI could scan the help system for me.

Thanks — with Maple 2026 on Windows the locations and menus are stable. Below are the exact places and step‑by‑step actions to find, install and manage user styles (stylesheets).
1. Open the Stylesheet manager (recommended)-1. In a worksheet choose the menu: Format → Stylesheet... (or Format → Manage Stylesheets in some builds).
-1. The dialog shows the current stylesheet and a list of available stylesheets (built‑in and user). From there you can Apply, Edit, Save As or Import a stylesheet.

2. Typical filesystem locations (Maple 2026, Windows)• Built‑in stylesheets (read‑only):
C:\Program Files\Maplesoft\Maple 2026\lib\stylesheets
• User stylesheets (per‑user area):
%APPDATA%\Maplesoft\Maple 2026\stylesheets — this expands typically to C:\Users\<YourUser>\AppData\Roaming\Maplesoft\Maple 2026\stylesheets.

3. Installing a custom stylesheet file-1. Method A (recommended): Open Maple, Format → Stylesheet → Import (or use the Stylesheet dialog’s Import button) and choose your stylesheet file. Maple copies it into your user styles folder.
-1. Method B (manual): Place the stylesheet file into the user stylesheets folder above. Then restart Maple (or use Format → Stylesheet → Refresh if available).
-1. If you want the stylesheet to be available to all users, copy it into the built‑in folder, but you will need administrator rights.

4. Creating / saving your stylesheet-1. Edit an existing stylesheet via Format → Stylesheet → Edit, then use Save As to store a copy in your user styles folder with a new name.
-1. Stylesheet files are XML/Maple worksheet fragments — you can back them up or share the file directly.

5. Opening a stylesheet file directly-1. Use File → Open in Maple and change the file type filter to Stylesheet (or choose the .mpl/.mws/.stylesheet file). This opens the stylesheet for inspection or editing.

6. Editing outside Maple (advanced)• Stylesheet files are XML/worksheet text. You may edit them in a text editor, but make a backup first. After editing, place the file in the user styles folder and restart Maple.
• Avoid corrupting the XML structure — if Maple fails to load the stylesheet, restore from your backup.

7. Troubleshooting• If your new stylesheet doesn’t appear, confirm it is in %APPDATA%\Maplesoft\Maple 2026\stylesheets and restart Maple.
• If you lack permission to save into Program Files, use the user styles folder instead.
• To remove a user stylesheet, delete its file from the user styles folder (Maple must be restarted to update the list).

If you like, I can (a) show the exact content structure of a simple example stylesheet you can paste into a file, or (b) give step‑by‑step screenshots (described) for the Format → Stylesheet dialog in Maple 2026. Which would you prefer?

Maple online help pages do not show which version of Maple the help pages for.

At the bottom or top of each help page there really should be something to tell the user which Maple version the help pages for.

For example, going to help on ?type and clicking details opens this page

https://www.maplesoft.com/support/help/Maple/view.aspx?path=type#bkmrk2

But I noticed this web page is different from the one I am looking at now on my installed Maple 2026. 

The above online page is missing new types. Here is screen side by side. Once the above web page opens, scolling down a little below where it shows "defined types" and you will see this difference:

You see, the online Maple help page is missing types shown in the installed version of the help page in Maple 2026.

And user has no clue looking at the web page, which version of Maple these help pages are for, as there is no indication any where on the page.

1) Why the web help pages are out of date?

2) Why is there no mention on the page, which Maple version there help pages represent?

Maple 2026 and 2025.2 can't solve this ode.  It actually hangs which is worst.

The ode is from a textbook

ode:=x*diff(y(x),x) = y(x)*cos(ln(y(x)/x)); 
dsolve(ode,y(x), singsol=all);

It just gets stuck.

But we see by just inspection that y(x)=x is a solution

odetest(y(x)=x,ode)

Gives zero. I solved this also by hand as HOMOGENEOUS and got y(x)=x

Trace shows Maple hangs in "trying homogeneous D" for some unknown reason

CPU is also running very high, which seems it is stuck in a LOOP internally.

Any one could shed more light what is happening here and why it hangs on this basic ode? I think the hang in loop could indicate a bug.

Any older version of Maple able to solve this?

1 2 3 4 5 6 7 Last Page 1 of 2245