Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

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 

Hi Everyone!



Considering the Figure (3_span_elastic_support) given by the paperwork (https://www.diva-portal.org/smash/get/diva2:837061/FULLTEXT01.pdf) I try to build the matrix based on the following references:
- https://www.sciencedirect.com/science/article/pii/S0045794913000138
- https://www.sciencedirect.com/science/article/pii/S0022460X07009017
- BOOK: Moving Loads - Dynamic Analysis and Identification Techniques_ Structures and Infrastructures Book Series, Vol. 8-CRC Press (2011)

My questions are:

- when I consider the coefficients kt = 4.881*10^9 and kr= 1.422*10^4 the following message appears. What Is the limit of MAPLE? 10^6?


- Because of this "fsolve" take to a long time to compute the values. If the message above appears I can trust in the "fsolve" values?

 

9_07_2020_Mode_shapes_matrix_12x12_Figure_3.23_artigo_2.mw

This is a programming question.

The goal is to solve an equation such as eq:=x^2+2*x-1=0; and obtain the solution as list with x= on each solution, like this

                       sol := [x = sqrt(2) - 1, x = -1 - sqrt(2)]

The command  to start with is sol:=solve(eq,x) which gives 

                       sol := sqrt(2) - 1, -1 - sqrt(2)

But to have x= show up, the command is modifed to be sol:=solve(eq,{x}) by adding {} around the variable to solve for, and now Maple gives 

                       sol := {x = sqrt(2) - 1}, {x = -1 - sqrt(2)}

Which is not yet the goal.. Changing the command to sol:=[solve(eq,{x})]  gives 

                       sol := [{x = sqrt(2) - 1}, {x = -1 - sqrt(2)}]

Which is still not the goal. Changing the command to sol:=solve(eq,[x])  gets closer to the goal.  it gives

                      sol := [[x = sqrt(2) - 1], [x = -1 - sqrt(2)]]

To remove the extra pair [ ] the list is Flattened like this

eq:=x^2+2*x-1=0;
sol:=solve(eq,[x]);
sol:=ListTools:-Flatten(sol)

Which gives me what I want, which is one list (not list of lists), and with x= in there

                             sol := [x = sqrt(2) - 1, x = -1 - sqrt(2)]

Is there a better way to obtain the above form of result than what I have above?

 

I like tweaking plots to get the look and feel I want, and luckily Maple has many plotting options that I often play with. Here, I visualize the same data several times, but each time with different styling.

First, some data.

restart:
data_1 := [[0,0],[1,2],[2,1.3],[3,6]]:
data_2 := [[0.5,3],[1,1],[2,5],[3,2]]:
data_3 := [[-0.5,3],[1.3,1],[2.5,5],[4.5,2]]:

This is the default look.

plot([data_1, data_2, data_3])

I think the darker background on this plot makes it easier to look at.

gray_grid :=
 background      = "LightGrey"
,color           = [ ColorTools:-Color("RGB",[150/255, 40 /255, 27 /255])
                    ,ColorTools:-Color("RGB",[0  /255, 0  /255, 0  /255])
                    ,ColorTools:-Color("RGB",[68 /255, 108/255, 179/255]) ]
,axes            = frame
,axis[2]         = [color = black, gridlines = [10, thickness = 1, color = ColorTools:-Color("RGB", [1, 1, 1])]]
,axis[1]         = [color = black, gridlines = [10, thickness = 1, color = ColorTools:-Color("RGB", [1, 1, 1])]]
,axesfont        = [Arial]
,labelfont       = [Arial]
,size            = [400*1.78, 400]
,labeldirections = [horizontal, vertical]
,filled          = false
,transparency    = 0
,thickness       = 5
,style           = line:

plot([data_1, data_2, data_3], gray_grid);

I call the next style Excel, for obvious reasons.

excel :=
 background      = white
,color           = [ ColorTools:-Color("RGB",[79/255,  129/255, 189/255])
                    ,ColorTools:-Color("RGB",[192/255, 80/255,   77/255])
                    ,ColorTools:-Color("RGB",[155/255, 187/255,  89/255])]
,axes            = frame
,axis[2]         = [gridlines = [10, thickness = 0, color = ColorTools:-Color("RGB",[134/255,134/255,134/255])]]
,font            = [Calibri]
,labelfont       = [Calibri]
,size            = [400*1.78, 400]
,labeldirections = [horizontal, vertical]
,transparency    = 0
,thickness       = 3
,style           = point
,symbol          = [soliddiamond, solidbox, solidcircle]
,symbolsize      = 15:

plot([data_1, data_2, data_3], excel)

This style makes the plot look a bit like the oscilloscope I have in my garage.

dark_gridlines :=
 background      = ColorTools:-Color("RGB",[0,0,0])
,color           = white
,axes            = frame
,linestyle       = [solid, dash, dashdot]
,axis            = [gridlines = [10, linestyle = dot, color = ColorTools:-Color("RGB",[0.5, 0.5, 0.5])]]
,font            = [Arial]
,size            = [400*1.78, 400]:

plot([data_1, data_2, data_3], dark_gridlines);

The colors in the next style remind me of an Autumn morning.

autumnal :=
 background      =  ColorTools:-Color("RGB",[236/255, 240/255, 241/255])
,color           = [  ColorTools:-Color("RGB",[144/255, 54/255, 24/255])
                     ,ColorTools:-Color("RGB",[105/255, 108/255, 51/255])
                     ,ColorTools:-Color("RGB",[131/255, 112/255, 82/255]) ]
,axes            = frame
,font            = [Arial]
,size            = [400*1.78, 400]
,filled          = true
,axis[2]         = [gridlines = [10, thickness = 1, color = white]]
,axis[1]         = [gridlines = [10, thickness = 1, color = white]]
,symbol          = solidcircle
,style           = point
,transparency    = [0.6, 0.4, 0.2]:

plot([data_1, data_2, data_3], autumnal);

In honor of a friend and ex-colleague, I call this style "The Swedish".

swedish :=
 background      = ColorTools:-Color("RGB", [0/255, 107/255, 168/255])
,color           = [ ColorTools:-Color("RGB",[169/255, 158/255, 112/255])
                    ,ColorTools:-Color("RGB",[126/255,  24/255,   9/255])
                    ,ColorTools:-Color("RGB",[254/255, 205/255,   0/255])]
,axes            = frame
,axis            = [gridlines = [10, color = ColorTools:-Color("RGB",[134/255,134/255,134/255])]]
,font            = [Arial]
,size            = [400*1.78, 400]
,labeldirections = [horizontal, vertical]
,filled          = false
,thickness       = 10:

plot([data_1, data_2, data_3], swedish);

This looks like a plot from a journal article.

experimental_data_mono :=

background       = white
,color           = black
,axes            = box
,axis            = [gridlines = [linestyle = dot, color = ColorTools:-Color("RGB",[0.5, 0.5, 0.5])]]
,font            = [Arial, 11]
,legendstyle     = [font = [Arial, 11]]
,size            = [400, 400]
,labeldirections = [horizontal, vertical]
,style           = point
,symbol          = [solidcircle, solidbox, soliddiamond]
,symbolsize      = [15,15,20]:

plot([data_1, data_2, data_3], experimental_data_mono, legend = ["Annihilation", "Authority", "Acceptance"]);

If you're willing to tinker a little bit, you can add some real character and personality to your visualizations. Try it!

I'd also be very interested to learn what you find attractive in a plot - please do let me know.

Hi Everyone

Just to put you in the context: during an internal turning operation, the overhang (ratio Length/Diameter of the tool [L/D]) is really important to guarantee the stability of the process (minimal vibration as possible). Having said that, it is desirable to increases the overhang to do deep holes, because of this the ratio L/D varies depending on the necessity and consequently the natural frequency of the tool will change.

As you can see in the attached Picture_A and B, I am trying to find the Eigenvalues when the overhang (ratio L/D) changes. Is it possible like in Figure 2 in the attached paper (link below)?

https://www.mdpi.com/2076-3417/9/15/2996/pdf

Consider:

L1 = ratio L/D (changeable);
L2 = Fixation of the tool (content)
L3 = the remaining part of the tool out of the fixation (changeable)

Tool length is content = L1 + L2 + L3

 

13_07_2020_Eigenvalues_3_span_beam.mw

How do I write this in logical notation in Maple? Is it even possible?

Show logical notation that expresses the following statement: If one dice shows an even number of spots and the second dice shows an odd number of spots, then the total for the pair is less than or equal to 9.

I've somehow understood that sequences are extremly powerful so far. However I have to admit that they are quite complicated to read and understand, and I still am a bit confused how to work with them properly.

The attached example shows a very simple sequence.

My question is - how can I use its results further on?

What I for example would like to have, is a plot, where the first results in the array are the x- values, and the second are used as the y-values. Before that I need to extract both of them into vectors.

Could this be done in one operation, or can I somehow iterate throught the members of the returned values?

exprseq.mw

First 400 401 402 403 404 405 406 Last Page 402 of 2097