Maple 2022 Questions and Posts

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

I recently upgraded to Maple 2022 just to use the new latex command. It seems I still can't export DataFrame types, I'm very disappointed. What am I doing wrong?

restart:
test:= DataFrame( [[1]], columns = [1] );
latex(test);

returns:

Error, (in DataFrame:-type) invalid input: subtype expects its 2nd argument, _t, to be of type type, but received And(symbol,satisfies(u -> substring(u,1 .. 9) = ('`\\mapleref`')))

Using File > Export As > LaTeX also doesn't work.
Printing the function call using printlevel := 100000: returns the following:

I've attached the worksheet for reference. Demo.mw
Does anyone know a workaround?

-Thanks for the Help

Irrespective of what help says, both series and taylor return series(...) rather that big-O expression

From help:

> series(x/(1-x-x^2), x=0);
series(1*x+1*x^2+2*x^3+3*x^4+5*x^5+O(x^6),x,6)
> taylor(sin(x),x=Pi);
series(-1*(x-Pi)+1/6*(x-Pi)^3-1/120*(x-Pi)^5+O((x-Pi)^7),x=-(-Pi),7)
 

I am using the method of alias(seq(c[k] = _C||k, k = 1..10)); for better latex of constants generated from solving an ode as recommended. See this for example. 

This works well 99.99% of the time. But now I noticed this in Maple 2022. Is this a display issue? When the constant is inside an inert Int it does not display the same as the other constant outside. Also the Latex is not the same. Even though lprint shows they are both correct.

This is the worksheet itself


 

restart;

interface(version);

`Standard Worksheet Interface, Maple 2022.0, Windows 10, March 8 2022 Build ID 1599809`

alias(seq(c[k] = _C||k, k = 1..10));
ode:=x*diff(y(x),x$2)-cos(x)*diff(y(x),x)+sin(x)*y(x)=2;
sol:=dsolve(ode);
lprint(sol)

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

x*(diff(diff(y(x), x), x))-cos(x)*(diff(y(x), x))+sin(x)*y(x) = 2

y(x) = (c[2]+Int((c[1]+2*x)/(exp(Ci(x))*x^2), x))*exp(Ci(x))*x

y(x) = (c[2]+Int((c[1]+2*x)/exp(Ci(x))/x^2,x))*exp(Ci(x))*x

latex(sol)

y \! \left(x \right) =
\left(c_{2}+\textcolor{gray}{\int}\frac{\mathit{c[1]} +2 x}{{\mathrm e}^{\mathrm{Ci}\left(x \right)} x^{2}}\textcolor{gray}{d}x \right) {\mathrm e}^{\mathrm{Ci}\left(x \right)} x

restart;

ode:=x*diff(y(x),x$2)-cos(x)*diff(y(x),x)+sin(x)*y(x)=2;
sol:=dsolve(ode);
lprint(sol)

x*(diff(diff(y(x), x), x))-cos(x)*(diff(y(x), x))+sin(x)*y(x) = 2

y(x) = (_C2+Int((_C1+2*x)/(exp(Ci(x))*x^2), x))*exp(Ci(x))*x

y(x) = (_C2+Int((_C1+2*x)/exp(Ci(x))/x^2,x))*exp(Ci(x))*x

 


 

Download april_25_2022.mw

 

 

Hi everyone! I'd really appreciate if I could get pointed in the right direction as I am a brand new maple user.

So im trying to solve this constrainted optimization problem (See picture) using Maple symbollically. I believe I should have a closed form solution given I can substitute the one constraint into the objective function. Specifically closed form solutions for the three phi variables.

Can someone point me in the right direction as to how I should go about this? I've already taken first order conditions and tried to using the solve() function to no avail, realizing my sytem of equations weren't linear );. 

I have problems with tasks.

If you have some usefull commands, you select them all, right-click and select 'create task'. You now get a button in the 'task'-pane in Maple you can use whenever you need to insert these commands- - - brilliant!!

But now I want to modify these tasks and delete the ones I don't use anymore or the ones I made by mistake.

Right-click on the task does nothing.

Selecting 'tools' from the menu and then 'tasks' allows me to see the tasks I have made, but not to modify them or delete them

How do I modify or delete a task??

 

/Rasmus Post

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

First 30 31 32 33 Page 32 of 33