Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hello MaplePrimes community,

We just created a Frequently Asked Question article that may address some Primes questions about updates to Physics in Maple 2022.2: 

Why does Maple 2022.2 throw an error executing Physics:-Version(latest)?

For searchability, the specific error in question is

Error, (in Physics:-Version) unable to determine the Physics Updates version, could you please report the problem to support [at] maplesoft [dot] com

 

  • Maplesoft will work to improve package updating in future versions of Maple.
  • In Maple 2022.2, the workaround is to install and/or update the Maplesoft Physics Updates using the MapleCloud toolbar.

Dear friends, 

If you import a table of 1-dimensional data assuming it normally distributed. Any command in Maple to generate the interval of normal distribution?

Hi everyone 

I have a question regarding an animation. The maple file is attached at the bottom. (parts of it are from tomleslie 12910

I have two spheres which move and rotate over time. Now I would like to show one ball at a certain time and the other one at a certain time and not both over the whole animation.

For example:

x1 should only be shown and visible from time -1 to 0 

x2  should only be shown and visible from time 0 to 1 

Because I want to show a kind of transition from x1 to x2 at the time 0 i cannot just start one animation at -1 and the other at 0 because then they would run at the sime time which is not the goal. 

has anyone an idea?

Thanks in advance!

how_transition.mw

Dear maple  whats wrong with the code that  maple cannot solve analytically pdes with initial conditions

restart:
sys:={diff(u(x, t), t)=0,diff(v(x, t), t)=0};
IBC:={u(x, 0)=exp((x))/(1+exp((0.5*x)))^2,v(x, 0)=1/(1+exp((0.5*x)))};
pdsolve(sys);
pdsolve(sys,IBC);

restart
EQ := proc(M, N) RETURN((y - M[2])/(x - M[1]) = (N[2] - M[2])/(N[1] - M[1])); end proc:
 with(plots):   
 with(geometry):   
_EnvHorizontalName := 'x':   _
EnvVerticalName := 'y':  
a := 7;  b := 5;  
c:=sqrt(a^2-b^2); 
 t:= (3* Pi)/(4):    
ellipse(el,x^2/a^2 + y^2/b^2 - 1 ): 
 point(M1, a*cos(t),b*sin(t)):  
point(F1,-c,0):point(F2,c,0):    
line( L1,[F1,M4]): 
point(M1, a*cos(t),b*sin(t)):  
EQ([a*cos(t),b*sin(t)],[-c,0]);  
solve(`%`,y);m:=coeff(`%`,x);   
line(L3,y=m*(x-c)); 
op(solve({x^2/a^2 + y^2/b^2 - 1 =0, y=m*(x-c)},{x,y},explicit)[2])[1]:xM2:=rhs(`%`):  
op(solve({x^2/a^2 + y^2/b^2 - 1 =0, y=m*(x-c)},{x,y},explicit)[2])[2]:yM2:=rhs(`%`):  
point(M2,xM2,yM2); 
line( tang1,x*xM2/a^2 + y*yM2/b^2 = 1);  
intersection(C1,L1,tang1);  
line(L4,[F1,M2]);  C1:=[ HorizontalCoord(C1), VerticalCoord(C1)]; 
 F1:=[-c,0];M2:= [ HorizontalCoord(M2), VerticalCoord(M2)];    
display( [ textplot( [[ -c, 0, "F1"],[ c,0, "F2"] ,                         
[ HorizontalCoord(M1), VerticalCoord(M1), "M1"],                          
[ HorizontalCoord(M2), VerticalCoord(M2), "M2"],                         
[ HorizontalCoord(C1), VerticalCoord(C1), "C1"] ],'align'={"above",'right'},                       [polygonplot([C1,F1,M2], color=blue,filled=true,transparency=0.9)]);     
draw( [ el(color=red),M1(color=black,symbol=solidcircle, symbolsize=16),
                      M2(color=black,symbol=solidcircle, symbolsize=16),                      
                      L1( color=black),L3(color=green),L4(color=green),                      
                      tang1(color=red), 
                      F1(color=blue, symbol=solidcircle, symbolsize=16),                      
                      F2(color=red, symbol=solidcircle, symbolsize=16),
                      C1(color=black, symbol=solidcircle, symbolsize=16),                     ],                                    axes=none ) ] );
Error, missing operator or `;` Many errors Icant corrected.  Thank you.

I formatted all the input math expressions with a different style and then exported them to create a style set called Mystyle1. However, when I load Mystyle1 and apply it to a document, the functions that were typed partially obey the style, but the expressions that were inserted through the palette do not; font and size are different and bold is not applied.
Does anyone know why this happens?

If anyone wants to test it, Mystyle1 and a simple document are attached.

Regards,

Oliveira

Example.mw

Mystyle1.mw

I was about to use a compact piece of code (subs(x =~ x(t), [d])) that makes names xi in an expression d functions of t (where i is a nonnegative integer); i.e. :
   xi -> xi(t)

The code works inside a procedure but not when passed as Maple input (see attachment).

What is the reason that it works at all?  Can my current way of replacing names by functions be improved?  

elementwise_equal.mw

How can we draw the pot function the same as in the attached figure (namely 'pot.png')? The values of V(x) may not be the same.

pot.mw

How to plot the following functions

plot(4*sqrt(L/g)*EllipticF(Pi/2, sin(theta0/2)), theta0 = 1 .. 20)

Hello

I am trying to calculate a definite integral of an absolute value function. I should get a positive result, but I end up getting a negative result. Why is this?

The line I am trying to run is this

ET2 := int(abs(1/(x - 2) + 0.5333 + 0.3333*x + 0.1333*x^2), x = -1 .. 1);

And the result I get is:
 ET2 := -0.056854377998556975271421429744140962019176108843917

What am I missing?

Hello;

Hope you are fine. I need to learn how can I call my code in the other file of maple, define new value for A and can get results. For this purpose, I just take an simple example as

questionmaple.mw

restart; A := 5; B := 10; AAA[0] := 10; for i from 0 while i <= A do AAA[i+1] := B*i*AAA[0] end do

5

 

10

 

10

 

0

 

100

 

200

 

300

 

400

 

500

(1)
 

``

Download questionmaple.mw

Is there a generalized compressibility chart in Maple?

Hello guys,

From time to time I use the procedure below to chain functions to the right of the expression to be evaluated.

`&/`:=()->args[-1](args[1],args[2..-2]):

For example:

(sin(x)^2+cos(x)^2)&/simplify                      1

For functions that work with just one argument, it's okay, but with functions that take more than one argument (like convert, subs), I don't know how to implement it.

0.76&/ convert(???,fraction)

(a*x+*x*b)&/simplify&/subs(a=2,b=3,???)

If someone more experienced can help, I'd be very grateful.

Oliveira

Let's say I have a file test.mpl file in the path ~/maple/Packages/MyPackage/test.mpl.

From the code in this file, I wish to save something to a file in the directory at the relative path ./Animations, which has absolute path ~/maple/Packages/MyPackage/Animations.

Now, on my machine, because I know the path to this directory I can easily save using the absolute path. 

What if I send this directory MyPackage (which is essentially a package) to someone else. Maybe they keep it in a different location such as ~/projects/maple-projects/MyPackage.

I would like that this person be able to run test.mpl and it will save the aforementioned something to a file in the relative location ./Animations, which on their machine is the absolute path ~/projects/maple-projects/MyPackage/Animations.

I am stuck on how to accomplish this.

I found out that if I am in a worksheet that is in the directory MyPackage then I can use interface(worksheetdir) to find out the path to the worksheet, so if everything were run from a worksheet contained in the MyPackages directory then I could use a relative path to the Animations directory. 

Problem is, the normal usage of test.mpl is to just create some new worksheet and read the file and use it. But a new worksheet like this is located in the home directory by default.

restart;

A:= Matrix();

A := Matrix(1, 0, {})

(1)

i_choices:= [seq(i,i=0..10,1)];

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

(2)

j_choices:= [seq(j,j=0..10,1)];

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

(3)

for i in i_choices do:
 for j in j_choices do:
   A[i,j] :=i+j;
   print(A[i,j]);
 od:
od;

Error, Matrix index out of range

 

Download test_Matrix.mw

First 136 137 138 139 140 141 142 Last Page 138 of 2097