TechnicalSupport

Technical Support

610 Reputation

12 Badges

14 years, 135 days
Maplesoft
Waterloo, Ontario, Canada

MaplePrimes Activity


These are Posts that have been published by TechnicalSupport

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.

A user found that the behaviour of calling a command from a library with a long form command name which invoked another command from that library with the short form name was unexpected:

restart;
ScientificConstants:-GetValue(Constant(g))

Error, (in ScientificConstants:-GetValue) `Constant(g)` is not a scientific constant object

 

 

 

We suggested to either

[Edit May 13 after Acer's improvements]

A) import the package such that all short form names of commands from the package are available in the Maple session and use the short form of both commands:

restart;
with(ScientificConstants):
GetValue(Constant(g));

9.80665

(1)

Download scientificConstantsGetValueShortFormsWithPackage.mw

or

B) use long forms for both command names:

restart;
ScientificConstants:-GetValue(ScientificConstants:-Constant(g))

9.80665

(1)

Download scientificConstantsGetValueLongFormLongForm.mw

or

C) to test that a long form command and a short form command work together, import the package for the short form command:

restart;
with(ScientificConstants):
ScientificConstants:-GetValue(Constant(g))

9.80665

(1)

Download scientificConstantsGetValueLongFormWithPackage.mw

Further details can be found in the article ?UsingPackages

A user of ours came up with an interesting request: taking a procedure name as an argument and then within the procedure, return a set containing the names of all variables within the procedure. This task can be accomplished in one of two ways, one with local variables, one with global variables.

One method is:

find_vars_in_proc(f :: procedure, $)
  return {op(2, eval(f))};
end proc;

for variables that Maple unambiguously determines to be local variables. For global variables, a slight variation appears as:

find_vars_in_proc(f :: procedure, $)
  return {op(2, eval(f)), op(6, eval(f))};
end proc;

As always, typing ?procedure directly in the worksheet brings up the help guide containing more information on operands of a procedure!

Users often wonder how the length(expr) command works.

length(expr) returns the length of expr.

For more information, see the ?length help article in Maple, or Online Help version

 

A user wondered why an example of integration by parts from the Calculus Study Guide was immediately showing the final answer instead of the parts steps shown in the Guide. 

We suggest users pay special attention to the "Initialize" rows of the Guide example(s) where converting the integral to inert form is discussed. 

Using an inert form of the integral ensures that Maple does not evaluate the integral unexpectedly. 

restart

Int(exp(a*x)*cos(b*x), x)
"(->)"Q

with(IntegrationTools)

Parts(Q, exp(a*x)) = sin(b*x)*exp(a*x)/b-(Int(sin(b*x)*a*exp(a*x)/b, x))

 

Download CSGG-6-1-4.mw

1 2 3 4 5 Page 1 of 5