MaplePrimes Questions

Why when trying to substitute a term in denominator, subs does not work, when this term is product. But it works when this term is single variable?

subs((x*y)=t,1/(x*y));

does not work. i.e. it does not return 1/t

But this works

subs(z=t,1/z);

and returns 1/t

algsubs does not work either on the first example above. 

Just wondering why, that is all.

 

I do not think Maple help on the subject is easy to follow as the exampels are not clear. I was hoping someone can give a very simple example.  

Now, I run long script, over say 1,000 problems. This takes long time each time I run it. Since each problem is completely independent of others, and there is no shared data at all (for each problem, its output is written to separate file), I am thinking of using the parallel programming in Maple, and hoping this will speed it up. I have an intel PC, with modern CPU. I think it has may be 10 or 16 cores, not sure now, so in theory it should be faster to complete.

For a very basic example, suppose I have this sequential program

foo:=proc(i::integer)
   return i^2;
end proc;

for i from 1 to 10 do
   foo(i);
od;

Where foo() is now called 10 times, one after the other. How would one change the above to make it run in parallel?

I know I need to call Threads:-Task:-Start and then use Threads:-Task:-Continue 

But I am not sure how to use Threads:-Task:-Continue to tell it to call foo in parallel passing each task 1,2,3,.... in turn, and wait until they are all done. This is the part not clear to me how to do even after looking at the help example under Task Programming Model

Could someone show how to do the above for this simple example?   

Since I have 1,000 problems, do I need to create 1,000 tasks at once, one for each problem and wait for them to all be done? what if I have 10,000 problems, creating 10,000 tasks at once might not work, would it? or will Maple handle this internally by queuing the creation of tasks as needed? This part is also not clear to me.

 

thanks

 

Hello!

I just want to try plot a conformal map for better understanding how it works.

For example, I want to plot a conformal map, so I do this:

restart;
assume(y, real);
assume(x, real);
f := z -> I + z*exp(1/4*I*Pi);
w := f(x + y*I);
u := Re(w);
v := Im(w);
A := array(1 .. 2);
A[1] := plots:-conformal(z, z = 0 .. 1 + I/2, grid = [16, 16], numxy = [16, 16], scaling = constrained);
A[2] := plots:-conformal(f(z), z = 0 .. 1 + I/2, grid = [16, 16], numxy = [16, 16], scaling = constrained);
plots:-display(A);

It works fine. But if I want to map more complecated region, I have lot's of problem. Could you help me please.

For example:

how to map a triangle [0,0], [1,0], [0,i] or half-plane Im z> 1, excluding the circle | z - 2i | <= 1.

Thank you!

Is there any possibility to update a DataTable, when the connected Array is expanded?

I've tried to change visibleColumns, but that doesn't show the content unfortunately.

Datatable.mw

Hey all, as before I need an interactive button that shows the result of tihs function Y=Ae^x

I've made two text area, one for A and one for x, then another text area to display the result. 

This is my code

Do(%Nume = evalf(Do(%Pop)*exp(Do(%Growth))));

but the results appears like this 0.244e4 and not as a whole number. am I doing something wrong?

Hi all, I'm trying to create a button on Maple that solve a simple function, I've set y=(ln(2))x, I have created a text area called Text where you can set the value of x, a button that solves the function and another text area called Result where you can see the result.

Here's my code

use DocumentTools in 
Do(%Result=ln(2)/Do(%Text));
end use; 

It doesn't work, if I set x=0.1 then on Result will appear this text 0.1e2*ln(2).

Can anybody help me? Thanks

I am going now into 3D with the conics 
Ax^2+BY^2 +Cz^2 +Dxy'..........................................(general formula quadric surfaces)

Is there a existing procedure in Maple for this. 
Perhaps also with different coordinate systems ?
Probably is this too much asked.

I followed the post about two intersected cilinders.

 

  

Maple seems to suffer from too many levels of recursion issues. Here is another just found

restart;
current_solution:=y(x)-3/2 = 1/(x+2)^4*(-(x+2)^5*RootOf(-2+(x^5*C[1]^5+10*x^4*C[1]^5+40*x^3*C[1]^5+80*x^2*C[1]^5+80*x*C[1]^5+32*C[1]^5)*_Z^25+(5*x^5*C[1]^5+50*x^4*C[1]^5+200*x^3*C[1]^5+400*x^2*C[1]^5+400*x*C[1]^5+160*C[1]^5)*_Z^20)^20*C[1]^5+1)/RootOf(-2+(x^5*C[1]^5+10*x^4*C[1]^5+40*x^3*C[1]^5+80*x^2*C[1]^5+80*x*C[1]^5+32*C[1]^5)*_Z^25+(5*x^5*C[1]^5+50*x^4*C[1]^5+200*x^3*C[1]^5+400*x^2*C[1]^5+400*x*C[1]^5+160*C[1]^5)*_Z^20)^20/C[1]^5;

candidate_sol := limit(current_solution,C[1] = infinity);

Error, (in depends) too many levels of recursion

The problem with these is that they can not be cought by a try/catch. So the whole program/script comes to halt since error can not be cought.

Similar ones I found can be found here

https://www.mapleprimes.com/questions/229988-Error-in-Toolsmap-Too-Many-Levels
Error, (in tools/map) too many levels of recursion

https://www.mapleprimes.com/questions/229872-Error-in-Discontzero-Too-Many-Levels
Error, (in discont/zero) too many levels of recursion

https://www.mapleprimes.com/questions/229951-Random-Error-Error-in-EngineDispatch
Error, (in Engine:-Dispatch) too many levels of recursion

 

I am  not sure why these happen too often. Maple 2020.1 on windows 10. Physics version 724

 

 

Hello!

I just want to plot a complex region:

abs(z - 1) > 1

abs(z + 1) > 1

Im(z) > 0

In Mathemactica it's really easy (ComplexRegionPlot[
 Abs[z - 1] > 1 && Abs[z + 1] > 1 && Im[z] > 0, {z, -5 - 5 I,
  5 + 5 I}])

But I like Maple and I want to use it. Could you help me please...

This way that I can found here not working:

ineq1 := 1 < abs(z - 1);
ineq2 := 1 < abs(z + 1);
ineq3 := 0 < Im(z);
plots[implicitplot]([eval(ineq1, z = x + y*I), eval(ineq2, z = x + y*I), eval(ineq3, z = x + y*I)], x = -10 .. 10, y = -10 .. 10, gridrefine = 3, scaling = constrained);

 

restart;
expr:=a^2*(2*a^2*p^3-a^2*((p^2+1)^2*(a^2-1))^(1/2)-((p^2+1)^2*(a^2-1))^(1/2)*p^2+2*p*a^2-2*p^3+((p^2+1)^2*(a^2-1))^(1/2)-2*p)/((p^2+1)^2*(a^2-1))^(1/2)/(p^3-((p^2+1)^2*(a^2-1))^(1/2)+p)/(a^2-p^2-1);
int(expr,p)

Gives

why does Maple give division by zero?

Here is the result from integration package on Mathematica

ClearAll[a, p];
expr = a^2*(2*a^2*p^3 - 
       a^2*((p^2 + 1)^2*(a^2 - 1))^(1/2) - ((p^2 + 1)^2*(a^2 - 1))^(1/
           2)*p^2 + 2*p*a^2 - 2*p^3 + ((p^2 + 1)^2*(a^2 - 1))^(1/2) - 
       2*p)/((p^2 + 1)^2*(a^2 - 1))^(1/
        2)/(p^3 - ((p^2 + 1)^2*(a^2 - 1))^(1/2) + p)/(a^2 - p^2 - 1)
<< Rubi`
Int[expr, p]

Which it can integrate. Result is a little long. (removed since looks too long)

But my question really is not why Maple could not integrate it, but why the division by zero? 

Maple 2020.1

I have loaded a series of worksheets into a help file using the makehelp command and installed in my toolbox package. Except for one of them, the worksheets appear in the help browser as worksheets instead of help files. Whenever I select one of them, it opens in maple as a worksheet. I would like to control whether a given help file opens as a worksheet or opens as a help.  I have read the helptools help and the help page for makehelp, but have been unable to identify the setting that determines which mode the help file operates in. Please advise what I am missing here.

Hi, 

I'm stucked in determining the intersection curve(s) of two (intersecting !) cylinders.
Plotting these curves can easily be done with plots:-intersectionplot, but I'm interested in finding the algebraic equations of this (these) curve(s).

I tried to do this while using either parametric or implicit representations of the two cylinders.

(For now on I'm using Maple 2015 and I wasn't capable to repoduce a few promising results I'd obtained at the office with Maple 2019 and parametric representations. So I mainly concentrated onimplicit representations).

If E(x,y,z) and E'(x,y,z) denote implicit representations of cylinders C and C', I had (naively) thought that simply solving 
E(x,y,z) = E'(x,y,z) with respect with x, y and z would have done the job.

Unfortunately, even for the simplest case of orthogonal circular cylinders of same radii, solve returns the couple of planes which contain the two intersection curves (ellipses) but not these ellipses themselves

Maybe there is a "simple" way to obtain the algebraic equation(s) of the intersection curve(s) but I wasn't capable to find it.
Instead of that I wrote a complicated stuff (please look to the attached file) which works well in some situations and not in others (see the last test case).

Could you please help me to answer this issue?

Thanks in advance

PS: no real need to consider tangent cylinders along a generatrix or one-point tangency. 

Intersecting_Cylinders.mw

Hi there,

Is there any way to fill a region/area with symbols (e.g, '+' symbols) or dashed lines etc, other than colour? 

restart; with(plots); with(plots, implicitplot);
pm2 := .5; dm2 := .14;

inequal({pm2 > dm2+am2}, dt = 0 .. 1, am2 = 0 .. 1, color = "SkyBlue", numpoints = 8000);


inequal_question.mw

 

something like:

 (I just made in Paint to show)

Thank you!

(Context: As part of a EU consumer watchdog report I've been asked to re-validate a number of publically stated APR rates for various consumer loan. )

(Apologize if this should have been posted to some bug-tracker but I was unable to find such a forum.)

System: MacOS 10.14.6, Maple 2020.1

Summary: Some simple exponential summations entered in 2D Input seems to crash the kernel and it is dependent on the numerical value of the exponent. The same expressions entered in 1D plaintext Maple Notation works fine. The numerically/expression evaluations are also significantly slower in 2D Input in a Document (x10) as compared to 1D Maple Notation in a Worksheet.

The attached worksheet is a "killer" worksheet and will on OSX 10.14.6 + Maple 2020.1 kill the kernel connection (crash the kernel).

kernel-crash.mw

Example:

A trivial example, entering 2D Math (assume PV & C are positive real numbers), say

will cause a lost connection to the kernel after 40-50s entering the epression and the UI being busy (unclear what it is doing since no real calculation is performed) which I assume is a sign that the kernel crashed. It seems to dependent on the exponent in the divisor. So for example the following variation will not crash the kernel

Doing the exact same calculation with a worksheet in old plain maple notation both varianta are both significantly faster in the numerical operation (solving for 'r') and assigning 'eq2' and never crashes (regardless of numerical value of exponent).

The workaround is of course obvious but it would be nice if this bug could be adressed.

It seems that whenever I try to give the 2D-UI a chance (since it is actally easier to visually view complex expressions)  something always comes back and bites me...

Update: The crash is only repeatable with the "sum()" command and not the "add()" command.

 

 

 

I working on wavelets method to solve fractional partial differential equations. The problem when I solved and create a system of algebraic equation using Newton itertaion method the system not solved becuase its appear as amtrix forum when I substitute a collcetion points as follows :


for i from 1 to N do           # calculate left side of equ. at a collection points
    for j from 1 to N do
        ll[i,j]:=eval(q(T[i],T[j]));
    end do:
end do:
ll:
sys := []:
                   # create the system of equations
for i from 1 to N do
    for j from 1 to N do
    l[i,j]:= eval(ual(T[i],T[j])+ ubet(T[i],T[j])+uth(T[i],T[j])+ uwt(T[i],T[j]));
    end do:
end do:

for i from 1 to N do
    for j from 1 to N do
    sys:=[op(sys),(evalf(l[i,j]-ll[i,j]=0 ))]: 
    end do:
end do:
sys;

Coefficients:= fsolve(sys);

 

the results appears as:

[Vector[column](1, [0.92016313e-1+.38891735*c[1, 1]-.24496159000000003*c[2, 1]-.3889173499999999*c[1, 2]+.24496159000000003*c[2, 2]]) = 0., Vector[column](1, [-.9381081886+1.24805825*c[1, 1]-.66648505*c[2, 1]-.4702235500000001*c[1, 2]+.17656187000000007*c[2, 2]]) = 0., Vector[column](1, [2.131874035+.76110696*c[1, 1]-.12722801999999994*c[2, 1]-.76110696*c[1, 2]+.12722802*c[2, 2]]) = 0., Vector[column](1, [.355172452+1.5700572*c[1, 1]+.3444861000000001*c[2, 1]-0.47843280000000044e-1*c[1, 2]-.59894214*c[2, 2]]) = 0.]

 

please can you help me fix this problem 

First 525 526 527 528 529 530 531 Last Page 527 of 2427