Maple 2022 Questions and Posts

These are Posts and Questions associated with the product, Maple 2022

Maple apparently has managed to destroy the last working piece of code in the Units package in the 2022 release.

This code is working in Maple 2021, but not in 2022 anymore.

with(Units[Simple])

[`*`, `+`, `-`, `/`, `<`, `<=`, `<>`, `=`, Im, Re, `^`, abs, add, arccos, arccosh, arccot, arccoth, arccsc, arccsch, arcsec, arcsech, arcsin, arcsinh, arctan, arctanh, argument, ceil, collect, combine, conjugate, cos, cosh, cot, coth, csc, csch, csgn, diff, eval, evalc, evalr, exp, expand, factor, floor, frac, frem, ln, log, log10, log2, max, min, mul, normal, piecewise, polar, root, round, sec, sech, seq, shake, signum, simplify, sin, sinh, sqrt, surd, tan, tanh, trunc, type, verify]

(1)

alpha := 45*Unit('degree')

45*Units:-Unit(arcdeg)

(2)

NULL

if alpha = 0 then

Error, cannot determine if this expression is true or false: 0 < 1/4*Pi

evalf(sin(alpha))

.7071067810

(3)

NULL

Download UnitsSimple_alpha.mw

Very often it happens that using solve alone, gives huge expressions that can't be used. The simplest thing to do is to wrap it inside an evalf. But then sometimes, even your system only has real solutions, you may get some complex numbers. When this evalf(solve()) being used inside an algorithm, then disastrous consequences may arise! If the system consists of a single equation of a single variable, then you may have some more tools. But if you have a system of several equations in several variables, you have less options. I am mostly interested in polynomials, I know several approaches to use and code to solve and get only the real solutions, but my codes might be not very optimized. In Maple 2022, one predefined command which is nice is RootFinding:-Isolate but it has one issue and it is that this command only likes numeric coefficients which means integers, fraction of integers and float numbers, so no square root or other real numbers of this shape in the coefficients. I thought it might be a good idea to have a list of all solving commands in Maple that only return the real solutions or have the options to restrict to only real solutions. fsolve is not very ideal, because it only returns one solution.

Hi there.

There is some floating bug in Thread-Seq.

Maple is crashing sometimes (not always, 50/50) after running the script below:

thread-seq_error.mw

What's going on?

Hi,

I am a newbie in Maple. I have the following code

with(LinearAlgebra):
w := (2*Pi)/14
v := Vector([1, sin(w*t), cos(w*t)])
simplify(sum(v . (Transpose(v)), t = k .. k + 13))

Even with some less advanced CAS I get that the result is a diagonal matrix with constant elements. However, I failed to properly tune the simplify command to get such a result. What I am doing wrong?

Hi, 

I installed syrup within Maple 2022 according to the procedure described in syrup's README file. The installation seems to run normally. After that I restarted Maple. When I now enter

with(Syrup);

it shows

[Draw, Library, Print, Solve, ToModelica, ToSpice, Version]

instead of 

[deindex, makecheckttable, printdeck, reindex, syrup]

as described in the application center: https://www.maplesoft.com/applications/Preview.aspx?id=4680

Also the example which is decribed there doesn't work:

syrup(divider, dc, 'curr');

delivers no result.

I'm working on Windows 10 64 bit.

Could it be that syrup is not yet prepared for Maple 2022, as it seems not to be updated for a long time? Or is the description in the application center not up to date?

Many thanks for your help!

Best regards,

Michael

 

Hi,all

I am new in Maple,when I execute the "InversePlot" command ,all functions were correct except for exp(x), error occurs as follows, can anyone tell me what mistake I took?

Tks in advance!

restart;
with(Student[Calculus1]);

InversePlot(exp(x), -1 .. 1);
Error, (in Student:-Calculus1:-InversePlot) module does not export `IsTrigProc`

 

Tks for all you guys. 

I have uninstall Maple and deleted the installed directory ,clear the register,reinstall Maple 2022, now all works well.

I think the problem is I installed Maple 2022 in the old directory of 2021for keeping my configuration,this caused much unexpected problem

I want to create a variable that is made up of a letter and an arrow on top. How to do that?

Also, how can I create a variable that is bold? I tried to type it as bold and then assign. But when I hit return it returns a normal symbol.

How to distinguish between a scalar variable and a vector variable in Maple?

I upgraded to Maple 2022 and some of my old sheets from Maple 2021 don't work anymore. When I plot a histogram with a legend I get an error saying: Error, invalid input: Statistics:-Histogram expects value for keyword parameter legend to be of type list, but received data set 1.

OK so maybe Histogram changed in 2022 although I didn't think it did. I ran it in Maple 2021 and I received no such error message. I chose to comply with the error message and the plot is output without an error message, however the legend labels carry extra characters I don't want to be there.  My attempt at a solution was to first use square brackets to make the object a list, then use the typeset command to typeset the label.  Strangely, the typeset command was not recognized.

What am I doing wrong? All I want is to plot a histogram with a legend labelled by a string which I have done many times in the past. I have attached below, a maplesheet which explicitly shows the problematic behaviour.

Thanks,
N

restart

NULL

with(Statistics)

with(LinearAlgebra)``

with(plots)``

NULL

NULL

Define Random Variable

X := RandomVariable(Normal(1, 2))

_R

(1)

Sample that variable and plot a histogram.

s := Sample(X, 1000)

NULL

Maple 2022 as opposed to Maple 2021 does not consider this a valid way to define the legend. It want's it defined in a list as requested in the pink error message.

Histogram(s, legend = "data set 1")

Error, invalid input: Statistics:-Histogram expects value for keyword parameter legend to be of type list, but received data set 1

 

NULL

NULL

Maple 2022 as opposed to Maple 2021 does not consider this a valid way to define the legend. It works fine in Maple 2021. Maple 2022, want's it defined in a list. This works but, the square brackets and quotation marks appear when I don't want them to. The legend shouldn't have these extra quotations and brackets, just the desired name.

Histogram(s, legend = ["data set 1"], size = [300, 300])

 

I tried the typeset command. It doesn't seem to be recognized anymore.

 

Histogram(s, legend = [typeset("data set 1")], size = [300, 300])

 

What am I doing wrong? All I want is to plot a histogram with a legend labelled by a string.   

Download legend_as_list.mw

Hi,

I'm trying to solve the attached system but I don't know how to proceed.

d := 0.3e-1

NULL

omega := Vector(2, {(1) = m[1, 1], (2) = m[2, 1]}) = Vector[column]([[20.33], [61.10]])NULL

NULL

f := proc (x) options operator, arrow; d+(-1)*.5*(alpha/beta-beta*x) end proc

NULL

`~`[f](omega) = Vector[column](%id = 36893628861525817332)NULL

NULL

solve(`~`[f](omega) = 0, {alpha, beta})

 

Any ideas?

Thanks very much in advance.

Best regards,

Download maple_problem.mw

I am trying to find the minimum of a function TF defined by a procedure over an interval. The function depends on variable x and fixed parameters x0, L, k, alpha_0, alpha_L. Here is the function

TF := proc(x, x0, L, k, alpha_0, alpha_L) if x0 <= x then evalc(abs(cos(k*(x - L) - alpha_L)*cos(k*x0 + alpha_0)/(cos(alpha_L)*cos(k*x0 + alpha_0)))); else evalc(abs(cos(k*(x0 - L) - alpha_L)*cos(k*x + alpha_0)/(cos(alpha_L)*cos(k*x0 + alpha_0)))); end if; end proc;

When I use

Minimize('TF'(x, 0, 0.03, 55.11566060, Pi/2, Pi/4), x = 0 .. 0.03);

I get an error "Error, (in Optimization:-NLPSolve) cannot determine if this expression is true or false: 0 <= x". What is my mistake ?

Thanks.

> with(LinearAlgebra) :
> a:=<<.1,.2>|<.3,.4>>:
> ScalarMultiply(a,.1);

INTEL MKL ERROR: /home/jet08013/maple2022/bin.X86_64_LINUX/libmkl_gf_lp64.so: undefined symbol: mkl_blas_cdgmm_batch_strided.
Intel MKL FATAL ERROR: Cannot load libmkl_gf_lp64.so.
maple: fatal error, lost connection to kernel

This is EXTREMELY inconvenient.

NULL

Programm zur Brechnung der Kreisteilungspolynome_2022-04-05 Ki

 

NULL

restart; with(Algebraic); with(NumberTheory)

n := 6

6

(1)

 

cyclo_poly := Vector[row](1 .. n, 0)

Vector[row](%id = 36893489967244295332)

(2)

i := 1; cyclo_poly[1] := X-1

1

 

X-1

(3)

NULL
c_poly := proc (i, kt_poly) local j, hz1, hz2, X; j := i+1; hz1 := X^j-1; hz2 := kt_poly; kt_poly := Quotient(hz1, hz2, X) end proc

cyclo_poly[2] := c_poly(i, cyclo_poly[i])

Error, (in c_poly) illegal use of a formal parameter

 

i := 1; kt_poly := X-1

1

 

X-1

(4)

j := i+1; hz1 := X^j-1; hz2 := kt_poly; kt_poly := Quotient(hz1, hz2, X)

2

 

X^2-1

 

X-1

 

X+1

(5)

NULL

Download Programm_zur_Brechnung_der_Kreisteilungspolynome_2022-04-05_Ki.mw

Good morning

Why doesn't Quotient(x,y,z) not work within a procedure whereas it works well standing alone? See example.

Greetings  Heinz

Hi,

While playing with this, I got:

> sum(Beta(k,1/2)/(2*k+1)^2,k=1..infinity)
Error, (in SumTools:-DefiniteSum:-ClosedForm) summand is singular in the interval of summation

I don't see how this can be singular, as Beta(k,1/2) is trivially bounded for k>=1, and sum(1/(2*k+1)^2) is absolutely convergent.

Maple is still able to evaluate numerically the inert sum (I get 0.3361376233). If I replace Beta with the expression with GAMMA, I get a result with MeijerG, that doesn't seem to help much for numerical evaluation, as it takes a long time and gives the wrong result -1.966769953*10^10 - (6.886827095*10^8)*I.

I have no reason to expect a closed form for this sum, but the error is surprising. And I don't know MeijerG well enough to explain the numerical error either. It fails with Maple 2020, 2021 and 2022.

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

First 36 37 38 39 Page 38 of 39