Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hej guys,

in some of my Maple worksheets I'm using Maples fit-function to obtain a rational function fit to some data, as I'm interested in the zeros of enumerator and denominator, I chose my fit function accordingly. Afterwards I need to extract the results (mainly the zeros) and do some more calculation steps with them. When evaluating rational functions of high degree, I noticed that my way of extracting the results (I'm using patmatch) becomes increasingly slow up to the point where it takes a couple of minutes to extract 10 numbers.
E.g. the following minimal example (download link at the bottom) takes more than 20 minutes on my machine (Maple 18.01 Build ID 935137; Red Hat Version 6.6 running on system with an i5-3570, 8 GB of RAM). Additionally, the calculation requires an unreasonable amount of RAM.
I can work around the problem to some degree by extracting the leading coefficient beforehand, resulting in a substantial speed up, still I think that there might be some error in the code or my usage of patmatch.

Is there another way to extract these numbers in a similarly simple fashion?

Cheers,

Sören


restart

a pathmatch with 9 variables requires roughly 200 MB of memory and takes about 7 s to finish on an i5-3570 CPU:

p := (1+x)*(2+x)*(3+x)*(4+x)*(5+x)/((11+x)*(12+x)*(13+x)*(14+x));

(1+x)*(2+x)*(3+x)*(4+x)*(5+x)/((11+x)*(12+x)*(13+x)*(14+x))

(1)

pattern := (a__1::realcons+x)*(a__2::realcons+x)*(a__3::realcons+x)*(a__4::realcons+x)*(a__5::realcons+x)/((b__1::realcons+x)*(b__2::realcons+x)*(b__3::realcons+x)*(b__4::realcons+x)); patmatch(p, pattern, 'la'); assign(la)

(a__1::realcons+x)*(a__2::realcons+x)*(a__3::realcons+x)*(a__4::realcons+x)*(a__5::realcons+x)/((b__1::realcons+x)*(b__2::realcons+x)*(b__3::realcons+x)*(b__4::realcons+x))

 

true

(2)

a__1; a__2; a__3; a__4; a__5; b__1; b__2; b__3; b__4

1

 

2

 

3

 

4

 

5

 

11

 

12

 

13

 

14

(3)

a pathmatch with 9 variables requires roughly 2.2 GB (!) of memory and takes about 20 min (!) to finish on an i5-3570 CPU:

q := 9*p;

9*(1+x)*(2+x)*(3+x)*(4+x)*(5+x)/((11+x)*(12+x)*(13+x)*(14+x))

(4)

a__1 := 'a__1':

(a__1::realcons+x)*(a__2::realcons+x)*(a__3::realcons+x)*(a__4::realcons+x)*(a__5::realcons+x)*a::realcons/((b__1::realcons+x)*(b__2::realcons+x)*(b__3::realcons+x)*(b__4::realcons+x))

 

true

(5)

a;

1

 

1

 

2

 

3

 

4

 

5

 

11

 

12

 

13

 

14

(6)

NULL

Download patmatch-breakdown.mw

I'm trying to plot the region bounded by the coordinate planes, the plane z=2-y and the cylinder x=4-y^2

This is what I have so far.  I want to know how to get rid of the portions of the planes and cylinder that are not enclosing the region.

restart;

with(plots);

xmin := 0;
xmax := 4;
ymin := 0;
ymax := 2;
zmin := 0;
zmax := 2;

a := plot3d([2-y], x = xmin .. xmax, y = ymin .. ymax, orientation = [40, 70], transparency = 0, color = green, filled = false, title = "");
%;

b := implicitplot3d([z = 0, y = 0, x = 0], x = xmin .. xmax, y = ymin .. ymax, z = zmin .. zmax, transparency = .5, axes = normal);
%;
c := implicitplot3d([x = -y^2+4], x = xmin .. xmax, y = ymin .. ymax, z = zmin .. zmax, transparency = .5, filled = true, axes = normal, color = blue, orientation = [45, 35]);


display(a, b, c);

A duck, pursued by a fox, escapes to the center of a perfectly circular pond. The fox cannot swim, and the duck cannot take flight from the water. The fox is four times faster than the duck. Assuming the fox and duck pursue optimum strategies, is it possible for the duck to reach the edge of the pond and fly away without being eaten? If so, how?

http://www.crazyforcode.com/fox-duck-puzzle/

there is an animation here

https://www.youtube.com/watch?v=Zw9cHEnhzWo

wonder if the equations of motion can be derived usingg maple and an animaton...?

Hallo. I'd like to make a loop for two variables. Let say:

for i from 1..10, j from 1..10

How to do it?

Thanks.

Hi everyone:

I have two functions in terms of theta variable, how can I expressed function Y(X)?

X :=(theta)->cos(theta)+0.8e-1*cos(3.*theta)

Y :=(theta)->-sin(theta)+0.8e-1*sin(3.*theta)

I will earn Y(X) infact.

Thanks alot...

Mehran.

 

 

 

How to calculate the integral

(symbolically or/and numerically) with Maple?

 

How can I stop this text from appearing in the worksheet output?

What is the purpose of this text as it's a GIANT DISTRACTION from my perspective?

 

SAMPLE EXECUTED WORKSHEET OUTPUT:

> with(plots);

> with(geom3d);

outputs lots of blue text...

 

[Archimedean, AreCollinear, AreConcurrent, AreConjugate,

  AreCoplanar, AreDistinct, AreParallel, ArePerpendicular,

  AreSkewLines, DefinedAs, DirectionRatios, Equation, FindAngle,

  FixedPoint, GlideReflect, GlideReflection, GreatDodecahedron,

  GreatIcosahedron, GreatRhombicuboctahedron,

  GreatRhombiicosidodecahedron, GreatStellatedDodecahedron,

  HarmonicConjugate, HexakisIcosahedron, HexakisOctahedron,

  InRadius, IsArchimedean, IsEquilateral, IsFacetted, IsOnObject,

  IsQuasi, IsRegular, IsRightTriangle, IsStellated, IsTangent,

  MidRadius, NormalVector, OnSegment, ParallelVector,

  PentagonalHexacontahedron, PentagonalIcositetrahedron,

  PentakisDodecahedron, QuasiRegularPolyhedron, RadicalCenter,

  RadicalLine, RadicalPlane, RegularPolyhedron,

  RhombicDodecahedron, RhombicTriacontahedron, RotatoryReflect,

  RotatoryReflection, ScrewDisplace, ScrewDisplacement,

  SmallRhombicuboctahedron, SmallRhombiicosidodecahedron,

  SmallStellatedDodecahedron, SnubCube, SnubDodecahedron,

  StereographicProjection, StretchRotate, TangentPlane,

  TetrakisHexahedron, TrapezoidalHexecontahedron,

  TrapezoidalIcositetrahedron, TriakisIcosahedron,

  TriakisOctahedron, TriakisTetrahedron, TruncatedCuboctahedron,

  TruncatedDodecahedron, TruncatedHexahedron,

  TruncatedIcosahedron, TruncatedIcosidodecahedron,

  TruncatedOctahedron, TruncatedTetrahedron, altitude, area,

  center, centroid, coordinates, cube, cuboctahedron, detail,

  dilate, distance, dodecahedron, draw, dsegment, duality, faces,

  facet, form, gtetrahedron, hexahedron, homology, homothety,

  icosahedron, icosidodecahedron, incident, intersection,

  inverse, inversion, line, midpoint, octahedron, parallel,

  parallelepiped, plane, point, polar, pole, powerps, projection,

  radius, randpoint, reflect, reflection, rotate, rotation,

  schlafli, segment, sides, sphere, stellate, tetrahedron, tname,

  transform, translate, translation, transprod, triangle,

  vertices, volume, xcoord, xname, ycoord, yname, zcoord, zname] [animate, animate3d, animatecurve, arrow, changecoords,

  complexplot, complexplot3d, conformal, conformal3d,

  contourplot, contourplot3d, coordplot, coordplot3d,

  densityplot, display, dualaxisplot, fieldplot, fieldplot3d,

  gradplot, gradplot3d, implicitplot, implicitplot3d, inequal,

  interactive, interactiveparams, intersectplot, listcontplot,

  listcontplot3d, listdensityplot, listplot, listplot3d,

  loglogplot, logplot, matrixplot, multiple, odeplot, pareto,

  plotcompare, pointplot, pointplot3d, polarplot, polygonplot,

  polygonplot3d, polyhedra_supported, polyhedraplot, rootlocus,

  semilogplot, setcolors, setoptions, setoptions3d, spacecurve,

  sparsematrixplot, surfdata, textplot, textplot3d, tubeplot]

 

Hello those who are in this maple primes.

I downloaded maple2015 for Mac, the newest version of the software, and tried to use it to draw a simple figure with plot3d.

But, in the end, I used gnuplot which I had happened to install though it was my first time of using it.

The problem of using my Maple was that it was too heavy and with my macbook, I found it impossible

to have it work properly. So, I am writing my question now.

 

I used terminal, but as I think it  might be easy to deal with to use editor not terminal itself

though I use the editor from the terminal, I want to know how I can use maple from the editor and what things I 

can do when I do so. In my image, I want to use it like using TeX from the editor.

As for coloring the code, is the best tool one for Maple V yet? And, how can I do after I wrote the code of Maple?

What can I do with emacs and Maple? Can I use emacs like IDE of TeXshop or TeXworks in LateX?

 

I am glad to hear from you the general concept or procedures of using it if I use emacs and Maple.

 

Thanks in advance.

Dear All,

Colud you please tell me how to obtain the answer f(b)-f(a), by manipulating the following expression in maple:

int(diff(f(x), x), x = a .. b)

Thank you very much. Best regards, Jand

Hello, I have a similary issue with the following post :

http://www.mapleprimes.com/questions/200835-Algsubs-With-Subscripts-And-Powers

In a constraint equation (in mechanics), I need to make these algebraic substitutions :

--> sqrt(xA1² + yA1²) =rF1 
--> arctan(abs(yA1)/abs(xA1)) = aF1
--> sqrt(xC1^2+yC1^2) = rBTP
--> arctan(abs(yC1)/abs(xC1))=a1

I try to do it with this code :

ListAlgsubs:={sqrt(xA1^2+yA1^2)=rF1,sqrt(xA2^2+yA2^2)=rF2,sqrt(xA3^2+yA3^2)=rF3, sqrt(xA4^2+yA4^2)=rF4,arctan(abs(yA1)/abs(xA1))=aF1,-arctan(abs(yA2)/abs(xA2))=aF2,pi+arctan(abs(yA3)/abs(xA3))=aF3,pi-arctan(abs(yA4)/abs(xA4))=aF4,sqrt(xC1^2+yC1^2)=rBTP,arctan(abs(yC1)/abs(xC1))=a1};
for i from 1 to nops(ListAlgsubs)
do Branch1Cons:=applyrule(op(i,ListAlgsubs),Branch1Cons)
end do:
Branch1Cons:= simplify(Branch1Cons);

I have tried with algsubs or applyrule but it wasn't successfull in both cases.

Do you have an idea how can I do to simplify my expressions ? and namely conduct a good use of applyrule function

I join an extract of my code in order to facilitate the troubleshooting.

example.mw

Thanks a lot for your help.

Dears, When I run calculation in Maple I found an error in matrices. See the file

 

Hi, I have 10 equation system and 10 unknown variables. I however, want to reduce the equations to 2 with two unknowns. I'm wondering how this could be done in maple. The variables are Y, q, yd, y*, yx, H,  pd, w, P and Pv. I intend to solve the equations for Y and w. 

Thanks in advance for your help. The maple file has also been attached.

 

Regards

Small_Open_Economy.mw

 

I am planning on getting Maple 18 Student Editon and I am wondering if the calculus palette is in Maple 18 student edition.

Thanks

Nick

Hi, I have a function as following:

50*tan(8*Pi/180)=(a1/(d2-d1))*ln(d2/d1)+(a2/(d3-d2))*ln(d3/d2)+((0.6-a1-a2)/(d4-d3))*ln(d4/d3)

where d1=0.01..0.06, d2>=d1, d3>=d2, d4>=d3, a1>0,a2>0, a1+a2<0.6.

I want to get  all the solutions of d1,d2,d3,d4,a1,a2, which satify the equation and the constrains, is there any way to solve this problem by using maple?

 

 

 

Hello, i got the following problem. I have a function, say u(h,e) whith multiple exponents ((u(h,e))^(1/a))^a. As long as Maple does not know that u(h,e) is positiv it won't make the simplification and return u(h,e) as expected. From my view i have two possibilites to solve this problem:

1) Define u(h,e) to be positive. Sounds intuitive, but i didn't manage to find the right definition

2) Give maple the function e.g. u:=e+h^2 and simplify the epression in uneval quotes with assumption positive for e and h.

Whereas I have solution 2, the problem is that i would need excessive amounts of uneval quotes '' at the start of my worksheet, not to run out of them.

 

I definitly need my epressions in unevaluated forms and would be happy to hear any ideas.

Greetings, Fabian

 

First 1252 1253 1254 1255 1256 1257 1258 Last Page 1254 of 2248