Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi

The following code is time consuming. Please improve the code, if it is possible. Thanks for taking your time

restart;

T := time(): 
M := 50: 
Digits := 30: 
L := 500: 
R := (1/2): 
nu := 0.3: 
Em := 0.70e11: 
N := 1: 
Ec := 0.380e12: 
E:= Em*(1-(y/h+1/2)^N)+Ec*(y/h+1/2)^N: 
X :=(int(E*(z+(1/2)*R), [z = y-(1/2)*R .. 0, y = -(1/2)*R .. (1/2)*R]))/(int(E, [z = y-(1/2)*R .. 0, y = -(1/2)*R .. (1/2)*R])): 
beta := Pi^2/L^2: 
G := E/(2*(1+nu)): 
phi := add(b[n]*y^n, n = 0 .. M): 
Eq := diff(phi, y$2)+(diff(E, y))*(diff(phi, y))/E+((diff(E, y$2))/E-((diff(E, y))/E)^2)*phi-2*beta*(1+nu)*(phi-1): 
st := [seq(coeftayl(Eq, y = 0, j), j = 0 .. M-2)]: 
for k to M-1 do 
b[k+1] := solve(st[k], b[k+1]) 
end do: 
phi := subs(y = y-X, phi): 
phi := subs(solve({eval(phi, y = -(1/2)*R+X), subs(y = f, phi)}, {b[0], b[1]}), phi): 
f := piecewise(`and`(z >= -R, z <= 0), z+(1/2)*R+X, -z+(1/2)*R+X): 
Digits := 4: 
int(phi*G, [z = y-(1/2)*R .. 0, y = -(1/2)*R .. (1/2)*R], numeric)+int(phi*G, [z = 0 .. -y+(1/2)*R, y = -(1/2)*R .. (1/2)*R], numeric);

Time = Time()-T;

Note that the calculation of the integration requires alot of time. Both returns a similar result (calculation of an integration is sufficient)

Hello,

I'm trying to use a text editor (notepad++) to developp a code in Maple. 

Before creating a package, i would like to test step by step the different procedures that i create.

To do so, i would like to launch some procedures created in notepad++. I guess i have to call the maple kernel from notepad++. How can i do to call the maple kernel from a editor (in my case notepad++) ?

Next, would it be possible for me to test directly on a worksheet a procedure that i have been created in notepad and launched from notepad ?

I thank you in advance for your help.

hi! lately I'm thinking about animating complex phase portraits so I tried something like this:

restart;
with(plots);
f := (a, z) -> (z*a - 1)/(z^2 + z + 1);
display(seq(densityplot(proc(x, y) local res; res := evalhf(argument(f(1/100*a, y + x*I))); return res; end proc, -4 .. 4, -4 .. 4, axes = boxed, view = [-2 .. 2, -2 .. 2], restricttoranges, colorstyle = HUE, style = surface, grid = [201, 201]), a = 1 .. 200), insequence = true);
 

but this takes a long time to load. Do you how can we optimizate this code?

Hello,

In a maple code, i have the symbol dollar as an the last argument of a procedure.

What is the meaning of the use of dollar symbol as an argument in a maple procedure ?

Thank you for your help.

Hi,

I just upgraded to Maple 2021 and started getting strange results - similar calculations seemed to work in Maple 2020.

I am looking at correlated bivariate normal distributions. When doing a fully symbolic verification of the normalization, I get an incorrect result of infinity. I also get strange results when integrating over a circular region, but the normalization seemed to be a very elementary calculation.

Maybe someone can check this make sure I'm not losing my marbles. I've attached a worksheet.

Thanks.

Bivariate_Gaussian.mw

hi, do you know how can we plot analogy situation from this post:

https://mathematica.stackexchange.com/questions/100051/dynamic-epicycles/100108#100108

I really like simplicity and beauty of the idea from:

https://www.mapleprimes.com/posts/206167-Procedures-For-Two-Animations

and I wonder if it would be possible to add a third rolling circle similarly not including such long code from first page.

thanks in advance

Is there a reason that an angle theta from zero to pi/2 (0 to 90 deg) returns as invalid for an animation range?  I am trying to rotate a vector 2D for visualization.  This is build-up towards a 3d rotating vector in an animation.  

 

Here is the code: theta is the arrow tip rotation's location via cos(theta), sin(theta) coordinates in a 2D vector.

 

animate(arrow, [<cos(theta), sin(theta)>, width = [0.05, relative], view = [-1 .. 2, -1 .. 2], color = "blue"], theta = 0 .. Pi/2)

 

ErrorMessage:  

Error, (in plots/animate) 0 = 0 .. (1/2)*Pi  is an invalid animation range

 

 

Thanks In Advance,

Bill

How can this expression sorted in order of the symbol "y"? I want the terms with y locate at the beginnig.

restart:

f:=x^2+x^y+1-z

x^2+x^y+1-z

(1)

 

Download sort.mw

As the title, who can help me fix the problem like this

theta:= diff(arctan(y,x)):

W:= piecewise(

         theta>-Pi/2 and theta< -Pi/2+10, 1+A+B*cos(theta),

         theta>-Pi/2+10 and theta< Pi/2-10. 1-A+B*cos(thea)); 

there always plotout the undefined when acrtan(y,x)=Pi/2,

How can I ignore this undefined or define another value for W when acrtan(y,x)=Pi/2

    Dear Fellows
Hoped everything is fine with you. I plotted some contours for a flow model and i want to generate its dat file. Please help me in this regard. Thanks

Attached is a worksheet containing a simple assignment that gives an "illegal use of an object as a name" error. I created the superscripted name in the following way.

1)  type b.

2) click on the Insert|Typesetting|Superscript  item in the insert menu.

3) enter 1 at the cursor in the superscript position.

4)  the result is a name b with superscript 1, but this symbol does not constitute a valid name for an assignment.


 

Parse:-ConvertTo1D, "first argument to _Inert_ASSIGN must be assignable"

Error, illegal use of an object as a name

"b^1:=2+3;"

 

NULL


 

Download errorws.mw

How Would I fix that?

Hi 

I forgot how to display the output ar an array i.e. (r,u(r)) (table of data)

I am sure i will find answers here.

a:=-0.1:alpha:=0.2:

dsys:={diff(u(r),r,r)+((1-alpha)/r+r^(alpha-2))*diff(u(r),r)=a};

res1:=dsolve(dsys union {u(0.05)=0,u(1)=0},numeric);

 

 

How we can see steps of Laplace transform calculation?

First 414 415 416 417 418 419 420 Last Page 416 of 2224