Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

As you can see, if I want to simplify the following expression, I shall have to run the simplify command three times, and if I add some assumptions, the global simplify command will no longer work! 

:-simplify(2*(x^2+1)^(1/2)*(x+y+(x+y)/(x*y-1))^2/(((1/2)*(x+y+(x+y)/(x*y-1))*(2*x+(x+y)/(x*y-1)+y)/(x^2+1)^(1/2)-(1/2)*(2*x+(x+y)/(x*y-1)+y)*(y+(x+y)/(x*y-1))/(x^2+1)^(1/2)+(x+y+(x+y)/(x*y-1))/x)^2*x));


Download collect_and_recurse)_invalid_arguments_to_coeffs_.mws

But here either Physics[Simplify] or evala@Simplify works (with a slightly different result, though). Does anyone know why?

Vertex disjoint paths are paths that only share their first and last vertices.  In Maple, we can compute the maximum number of pairwise vertex disjoint paths from x to y by the function MaxFlow.  

For example:

with(GraphTheory):
with(SpecialGraphs):
g:=IcosahedronGraph():
HighlightVertex(g, {1,7},"DodgerBlue"):
DrawGraph(g);
g1:=MakeWeighted(g);
mxf:=MaxFlow(g1,1,7)

5

Matrix(12, 12, [[0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0], [0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0]])

So  we know that the maximum number  of vertex-disjoint paths between vertices "1" and "7" is 5. 

But can we obtain more information from MaxFlow, such as finding  five (i.e., the maximum number) vertex-disjoint paths between vertices "1" and "7" ? (These five paths may not be unique.)

Here is a set of five vertex-disjoint paths connecting vertices "1" and "7" that I observed manually, each marked with a different color.

Hi every one

Let F= [x^2-z^2, x*y+y*z, x*z-y*z, y^2+y*z,w^2] be a special list of monomials and binomials. How to convert F into the following list:

FF=[x^2=z^2, x*y=-y*z, x*z=y*z, y^2=-y*z,w^2=0]. Please note that the left side of each equation of FF is greater than the right side w.r.t. lex ordering plex(x,y,z,w). 

Thank you in advance.

I would like to simplify the following (very simple) expression:

e1:= -(b*(b^2 - 4*a*c)^(1/2) - 4*a*c + b^2)/(2*a*(b^2 - 4*a*c)^(1/2))

whis is exactly equal to

e2: = -(b + (b^2 - 4*a*c)^(1/2))/(2*a)
simplify(e1-e2)
0


But the "simplify" command is not able to produce expression "e2". Is there any general way how to enforce simplifying to get expected result?

Take the following expression:

Why does Maple simplify it to:

instead of the following, like the other math software does it:

While Maple uses , the other software does , which I find easier to read.

It's not a big difference, but I find positive expressions easier to read. Is there a way to change this behaviour or to work around it?

Creating Graph Equation of An Apple in Cartesian Space using single Implicit Function only run by Maple software

Enjoy...

Please click the link below to see full equation on Maple file:

2._Apel_3D_A.mw

 

Creating Graph Equation of A Candle on Cartesian Plane using single Implicit Function only run by Maple software

Enjoy...

3D_Candle.mw

Sea_Shells.mw

 

 

 

Today I'm very greatfull to have Inspiration to create Graph Equation of 3D Candle in Cartesian Space using single 3D Implicit Function only, run by Maple software.

Enjoy... 

Candle_1.mw

 

Today I got an inspiration to create graph equation of "Petrol Truck" using only with Single Implicit Equation in Cartesian space run by Maple Software

Maple software is amazing...

Enjoy...

 

CREATING 3D GRAPH EQUATION OF BACTERIOPHAGE USING ONLY WITH SINGLE IMPLICIT EQAUTION IN CARTESIAN SPACE RUN BY MAPLE SOFTWARE

MAPLE SOFTWARE IS AMAZING...

ENJOY...

 

GRAPH EQUATION OF A FEATHER

AND THE EQUATION IS:

ENJOY...

I like this Equation and post it because it is so beautiful...

Click this link below to see full equation and download the Maple file: 

Bulu_Angsa_3.mw

 

GRAPH EQUATION OF "383" CREATED BY DHIMAS MAHARDIKA

ENJOY...

with(plots):

DHIMAS MAHARDIKA EQUATION

plots:-implicitplot(15-8.*cos(y)^(79/2)-32.*cos(y)^(37/2)+96.*cos(y)^(33/2)-96.*cos(y)^(29/2)+4.*cos(x)^(61/2)+4.*cos(x)^(31/2)-12.*cos(x)^(27/2)+12.*cos(x)^(23/2)+24.*cos(y)^29-48.*cos(y)^27+16.*cos(y)^8-64.*cos(y)^6+96.*cos(y)^4-4.*cos(x)^(19/2)-6.*cos(x)^19-4.*cos(x)^(57/2)+32.*cos(y)^(25/2)+24.*cos(y)^25+8.*cos(y)^(75/2)-cos(x)^38+cos(y)^50-64.*cos(y)^2+4.*cos(x)^2-6.*cos(x)^4+4.*cos(x)^6-cos(x)^8+12.*cos(x)^21-6.*cos(x)^23, x = -15 .. 15, y = -15 .. 15, numpoints = 50000, thickness = 4, colour = blue)

 

NULL

Download 383.mw

 

Drawing Eifel Tower using Implicit Equation in Cartesian Space 

My world of trigonometric functions has a very simple structure: sin, cos and tan are what I need.

That's why I very much welcomed the simplification of sin/cos to tan recently introduced with Maple 2023.

What I neither need nor want is the simplification of 1/sin and 1/cos to sec and csc. I'm not used to that (and probably won't get used to it).

Can this simplification to sec and ccs be turned off (and preferably the simplification to tan be kept)?

Another very strange behavior.

res:= x^2 + x + 1 + 1/3*x^3 + 1/12*x^4 + 1/60*x^5 + 1/360*x^6 + 1/2520*x^7;
sort(res);

#and now
res

Without trying it, what do you expect the output of the last line above to be?  The same as the first one, right?  But that is not what Maple gives. Maple now changes res to always be sorted, even though I have not reassigned it.

Does this mean if one calls sort(), then all the variables that contains polynomials will also be sorted automatically?

Unable to upload worksheet. So here is screen shot

 


Download sort_problem.mw

These give errors

limit(y(0),y(0)=1)

limit(y(x),y(x)=1)

Error, (in limit) limit variable previously assigned, 2nd argument evaluates to y(0) = 1
 

One has to write 

limit(y,y=1)

But why? Is this because y(x) is not considered "algebraic" ? 

Mathematica has no problem with either one of these

I found this when I was trying to find the limit at initial conditions, when x=0 and y(0)=1 and wanted to take the limit on both x->0 and y(0)->1 

I can easily code around this, by renaming y(0) to say Y0 and then the limit will work.

It just seems to be unnecessary restriction of the limit() command parsing ability. 

What is the logic behind not allowing one to write limit(y(x),y(x)=1) ? 

My problem is as follows:

With the Statistics package (or whichever other package) I will do a PolynomialFit on some data. This will result in a function, e.g. x^2. How do I assign this output (which appears to be the function only, no other bells attached) to an actual function which I can later refer to (I want to do as follows):

with(Statistics)

f(x):=PolynomialFit(n, DATA, variable)

f(3) = 3^2

See the attached screenshot for what actually happens:

It appears as if it tries to run PolynomialFit but with a different argument when I do this.

Help would be appreciated as to how I can define the output of PolyFit as a function.

Many times, I can create the drawing for physics problems. But sometimes, it is just too lengthy to do. And the tools are limited. For example, you cannot draw an arc circle to represent the angle between two vectors. You can look at a simple drawing that I made (see included document). You will see that to draw the rotation vector that shows in what direction the axis rotate. I had to draw it with the pen and this is never beautiful. So if someone knows of a pretty good software (free is even better but at least not too expensive), I would really appreciate.

3-D_rotating_axes.mw

How should i remove all brackets and conditions, such that i can fetch only equation t2 = something. I am attaching the image below.  

Used to know, I think.  How do you convert a Matrix to an image?  I want to use the PadImage command from the ImageTools package.

Here is a notional example of a user defined  Probability Distribution:

  • One of the "attribute" or "property" (sorry but I don't know the correct word to use) in any known distribution (that is already implemented in Maple) is Parameters: an example is  provided for a Gaussian RV.
     
  • In a first stage I define a simple Distribution named MyDist and declare X as a random variable of distribution MyDist.
     
  • Then I decide to complete the definition of MyDist by adding the "property" Parameters.
    I get an error I don't know how to get rid of.

Does anyone has any idea to fix that ?

PS: I browse the Statistics library to try and understand how this "property" is defined for a known distribution but I couldn't find any clue.

Thanks in advance.

restart

with(Statistics):

G := RandomVariable(Normal(a, b)):

attributes(G)[3]:
exports(%);
(attributes(G)[3]):-Parameters;

Conditions, ParentName, Parameters, CharacteristicFunction, CDF, CGF, HodgesLehmann, Mean, Median, MGF, Mode, PDF, RousseeuwCrouxSn, StandardDeviation, Support, Variance, CDFNumeric, QuantileNumeric, RandomSample, RandomSampleSetup, RandomVariate, MaximumLikelihoodEstimate

 

[a, b]

(1)

MyDist := (mu, Sigma) -> Distribution(Mean=mu, Variance=Sigma):

X := RandomVariable(MyDist(m, V));
(Mean, Variance)(X);

_R1

 

m, V

(2)

MyDist := (mu, Sigma) -> Distribution(Mean=mu, Variance=Sigma, Parameters=[mu, Sigma]):

Y := RandomVariable(MyDist(m, V));

Error, (in Statistics:-Distribution) invalid input: too many and/or wrong type of arguments passed to NewDistribution; first unused argument is Parameters = [m, V]

 

m, V

(3)

 

Download RandomVariable_Parameters.mw

Hi every one

How do I automatically change the polynomial ring R=K[x1,...,xn] into the quotient ring R/I when I is a homogeneous ideal of degree d in R?

For example, let I be a polynomial ideal generated by [x-y, x^2+y^2+z^2] in R=K[x,y,z]. In the middle of the computations, the ideal B=[x-y] is computed and now we have to continue the calculation at the quotient ring R/B. How does change R into R/B automatically in Maple and then [x^2+y^2+z^2] changes into [2y^2+z^2] and K[x,y,z]/[x-y] ----> K[y,z]?

Thank you in advance.

First 95 96 97 98 99 100 101 Last Page 97 of 2097