Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Could anyone help me with the syntax to create a Region Plot (Feasibility or Preference Map) that displays: Regions based on conditions like:

  • When   and  πR>πD ​ ​, then Strategy 1 is preferred.
    and  When ​, πR<πD then Strategy 2 is better.

 

  • When ​,πR<πD then Strategy 2 is preferred.

    and When ​,πR>πD then Strategy 1 is better.

I’d also like the plot to visually highlight the regions based on strategy​, and vice versa.

File : 
Regional_plot.mw

Hello everyone,
Could someone tell me how to insert an entry (empty cell) between two already filled entries or above an already filled entry in Document Mode?

Oliveira

As the following worksheet shows, Student:-NumericalAnalysis:-MatrixDecomposition cannot factorize the input matrix  and throws an error, but if we simply reorder or exchange the elements of , no error will be raised. (The reason for setting  is that LinearAlgebra:-LUDecomposition can be used for other methods.) 
 

restart

with(Student:-NumericalAnalysis, MatrixDecomposition)

m := Matrix([[3*(sqrt(3)+1)/8,-1/2,1/2,-(sqrt(3)+1)/8,-1/2,1/2,-(sqrt(3)+1)/8,-1/2,1/2,-(sqrt(3)+1)/8],

             [-1/2,sqrt(3)-1,-(sqrt(3)-1),-1/2,0,0,1/2,0,0,1/2],

             [1/2,-(sqrt(3)-1),sqrt(3)-1,1/2,0,0,-1/2,0,0,-1/2],

             [-(sqrt(3)+1)/8,-1/2,1/2,3*(sqrt(3)+1)/8,1/2,-1/2,-(sqrt(3)+1)/8,1/2,-1/2,-(sqrt(3)+1)/8],

             [-1/2,0,0,1/2,sqrt(3)-1,-(sqrt(3)-1),-1/2,0,0,1/2],

             [1/2,0,0,-1/2,-(sqrt(3)-1),sqrt(3)-1,1/2,0,0,-1/2],

             [-(sqrt(3)+1)/8,1/2,-1/2,-(sqrt(3)+1)/8,-1/2,1/2,3*(sqrt(3)+1)/8,1/2,-1/2,-(sqrt(3)+1)/8],

             [-1/2,0,0,1/2,0,0,1/2,sqrt(3)-1,-(sqrt(3)-1),-1/2],

             [1/2,0,0,-1/2,0,0,-1/2,-(sqrt(3)-1),sqrt(3)-1,1/2],

             [-(sqrt(3)+1)/8,1/2,-1/2,-(sqrt(3)+1)/8,1/2,-1/2,-(sqrt(3)+1)/8,-1/2,1/2,3*(sqrt(3)+1)/8]],

            'shape'='symmetric'):

MatrixDecomposition(m, 'method' = 'LDLt'): # this does not work 

Error, (in Student:-NumericalAnalysis:-MatrixDecomposition) a pivot element 0 is encountered, and the entries below it are not all 0; the factorization cannot continue

 

MatrixDecomposition(m([1, 4, 7, 10, 2, 5, 8, 3, 6, 9] $ 2), 'method' = 'LDLt'): # yet this works 

MatrixDecomposition(m([2, 3, 5, 6, 8, 9, 1, 4, 7, 10] $ 2), 'method' = 'LDLt'): # this also works 

randomize(5):

k := 0:
to 1e3 do
        try
                MatrixDecomposition(m(combinat:-randperm(10) $ 2), 'method' = 'LDLt')
        catch :
                k++
        end
od:
k/1e3;

.469

(1)


 

Download LDL_factorization_robustness.mw

The last instance above suggests that it only works on about half of the inputs (that are equivalent to each other). Although I tried changing the value of Digits, the failure rate remained high. Is Student:-NumericalAnalysis:-MatrixDecomposition not robust enough? 

I am learning how to use Maple for solving single and systems of linear PDE's using the Laplace transform (LT)method so the resulting solution in s space can be used to generate the moments of the resulting probability distribution.

When I take the LT of a term such as Uxx(t,x), I expect a second order ordinary derivative. Instead, it shows the Laplace transform operator.

Here is a simple test code  

with(inttrans):

with(DEtools):

rhs_pde := diff(u(x, t), x, x);

laplace_rhs_pde := laplace(rhs_pde, t, s);

I want to draw a circle in 2D as a point plot, given a center y1 and radius r1 using the animate command. 
I can do this for other functions, and I can create a plot of a circle, but I am doing something wrong when I attempt to combine them.  

Here is my code

with(plots):

y1:=<-1,1>;
r1:=15.;

This plot command for the circle works.  

plot([y1(1)+r1*cos(t),y1(2)+r1*sin(t),t=0..2*Pi],color=blue); [n];

But this attempt to animate it does not!!!

plots:-animate(plot,([[y1(1)+r1*cos(t),y1(2)+r1*sin(t)], t=0..T,color=blue]), T=0..2*Pi); plot([y1(1)+r1*cos(t),y1(2)+r1*sin(t),t=0..2*Pi],color=blue);

Thanks

I experience the following quirk using maple 2025 in worksheet mode: copy a formula and then paste it can often freeze the program. Termination only via ctrl-Alt-delete task manager. Has anybody similar problems or should i think that is happening only in my case?

I am working with two plots and need help in labeling,

Plot 1: I would like to display the intersection point of the two curves along with the corresponding value of δ (delta) at that point. Ideally, this can be highlighted using an arrow or annotation.

Plot 2: I would like to identify and mark the maximum point of the two curves. Specifically, I want to show the maximum value and the corresponding value of w at which this occurs.

Could anyone help with the syntax. Is there any method to improve the quality of figure to export it as jpeg?

Q_NEW_PLOT.mw

On maple I want solve this, is the best way plot angles by time?I put M,m,r,theta,phy and plot first and than the second equation?

We are pleased to announce that the registration for the Maple Conference 2025 is now open!

Like the last few years, this year’s conference will be a free virtual event. Please visit the conference page for more information on how to register.

This year we are offering a number of new sessions, including more product training options, and an Audience Choice session.
Also included in this year's registration is access to an in-depth Maple workshop day presented by Maplesoft's R&D members following the conference.  You can find an overview of the program on the Sessions page. Those who register before September 14th, 2025 will have a chance to vote for the topics they want to learn more about during the Audience Choice session.

We hope to see you there!

Greetings,

I have generated two random points in the unit square.  Each point has an x and y coordinate.  The density function for the (absolute) distance between each point is (2-2d) in both the x and y direction.  These distances are shown by the "f" and "g" functions attached.

The overall (rectilinear) difference is what I am after.  The attached worksheet shows the rectilinear distance as "h".  

My question is this...how can I obtain this rectilinear distance by using convolution and the "starting" density function of (2-2d) ? 

This is probably more of a mathematics function than a Maple question, but the "rules" of convolution, particularly setting the upper and lower boundaries of the integrals confuse me.

 

DensityFunction.mw

in here i did all steps but i know something is missing becuase in finding parameter all x and y and t must be remove but still one x is remain so something is wrong with my substitution for finding parameter where is mistake ?

n1.mw

f(a).b;            #ok
                           (f(a)) . b

op(0, f(a).b);     #ok
                               .

lprint(f(a).b);    #ok
f(a) . b

f(7).b;            #???
                             f(7) b

op(0, f(7).b);     #???
                               *

lprint(f(7).b);    #???
f(7)*b

 

Hi! I need a help for solve PDE problem (diffusion problem) in bipolar system coordinates. Actually, to begin with, I wanted to try to solve the homogeneous diffusion equation in a bipolar coordinate system with given boundary conditions. The process is not stationary, for simplicity, the diffusion coefficient is a constant (or linearly depends on η). The source function is also specified on the right side. The problem is that I cannot construct a correct exact solution, and the PDESolve function gives a very strange solution. The question is whether it is possible to solve a homogeneous and then a non-homogeneous solution automatically, or will it be necessary to manually specify parts of the general solution (homogeneous and particular solution)?

A document with a brief description and code for solving the equation is provided in the file. I ask for help with solving this problem, any valuable comments will be useful!

PDE.mw

====UPDATE===
I try to set Neumann conditions for solve this problem, but get error:
Error, (in PDEtools:-Library:-NormalizeBoundaryConditions) unable to isolate the functions {u(0,eta), u(xi,1.1), u(2*Pi,eta)} in the given boundary conditions {u(0,eta) = u(2*Pi,eta), u(xi,1.1) = 0}

PDE_upd.mw

For practice, I would like to solve the following problem. It is from "Steven Weinberg, Gravitation and Cosmology, p. 7" and was posed in a NG. I planned to define coordinates (x_i; y_i), apply the Pythagorean theorem, and enter the tediously long terms as term1 and term2, respectively. The final result should be term1-term2=0, or "is" should be used. I failed to enter the coordinates - the error message "error=Null" appears.

Question:
How are coordinates and their names of the type described meaningfully defined and entered as term1 and term2, respectively?

The four points P_1, P_2, P_3, P_4 lie in the Euclidean plane. Let
(ij) be the square of the distance between P_i and P_j. Then, it must be proven that

(12)(12)(34)+(13)(13)(24)+(14)(14)(23)+(23)(23)(14)
+(24)(24)(13)+(34)(34)(12)+(12)(23)(31)+(12)(24)(41)
+(13)(34)(41)+(23)(34)(42)
=
(12)(23)( 34)+(13)(32)(24)+(12)(24)(43)+(14)(42)(23)
+(13)(34)(42)+(14)(43)(32)+(23)(31)(14)+(21)(13)(34)
+(24)(41)(13)+(21)(14)(43)+(31)(12)(24)+(32)(21)(14)

I have a contour plot, and I need to make the following modifications. Could anyone please guide me on how to change the syntax accordingly?
 

  1. Remove grid lines (black lines) from my plot.

  2. Swap the axes so that s2  appears on the Y-axis, ranging from 1000 to 7000. Currently, s2 is shown on the X-axis from 1 to 7.

  3. Add a color scale (legend) for the contour values of stemp (with label), with formatted values like 1.47 × 10⁷ (scientific notation).

    Attaching my file with plot: S1_vs_s2_contour_plot.mw

I’ve attached (or described) a sample contour plot for reference.

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