Maple 2021 Questions and Posts

These are Posts and Questions associated with the product, Maple 2021
This is Maple 2021.1 on windows.

===================
restart;
expr:=x^(6+1/3);
res:=series(expr,x=0,6);
==============

gives
        O(x^(19/3))

But type of the above is not series:

===========
type(res,'series');
        false
===========

Yet convert(res,polynom) works

================
convert(res,polynom)
          0
================

Which is correct conversion. But help says that

"convert/polynom
convert a series to polynomial form"

Notice, it says "series" there.

So the input must be type series. But Maple says
O(x^(19/3)) is not type series. I think this is wrong. The
type returned should be series. Now the type returned is 'function'
from the series command.

What Am I overlooking here?

fyi;

Maple 2021.1 on windows 10.

Screen in worksheet displays this (correct)

But latex generated when compiled using lualatex from TEXLIVE 2021 shows this

code 

sol:=(Vector(2, [x(t),y(t)])) = (Vector(2, [8*c[1]*exp((1/2+1/2*89^(1/2))*t)/(-3+89^(1/2))-8*c[2]*exp((1/2-1/2*89^(1/2))*t)/(3+89^(1/2))+2/11*t^2-3/11*exp(t)-2/121*t+23/1331,c[1]*exp((1/2+1/2*89^(1/2))*t)+c[2]*exp((1/2-1/2*89^(1/2))*t)-1/11*t^2-15/22*exp(t)+12/121*t-17/1331])):

sol:=simplify(sol);

latex(sol)

`Standard Worksheet Interface, Maple 2021.1, Windows 10, May 19 2021 Build ID 1539851`

`The "Physics Updates" version in the MapleCloud is 1105 and is the same as the version installed in this computer, created 2021, November 8, 23:55 hours Pacific Time.`

zip file attached include the latex file and worksheet used.

issue_latex_nov_6_2021.zip

restart; p := .5; n := 10; nseq := 2; with(Statistics); randomize(); x1 := seq(Sample(RandomVariable(BernoulliDistribution(p)), n), i = 1 .. nseq); x2 := seq(convert(x1[i], list), i = 1 .. nseq)

[HFloat(0.0), HFloat(1.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(1.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(1.0)], [HFloat(0.0), HFloat(1.0), HFloat(1.0), HFloat(1.0), HFloat(0.0), HFloat(0.0), HFloat(1.0), HFloat(0.0), HFloat(0.0), HFloat(0.0)]

(1)

x2[1]

[HFloat(0.0), HFloat(1.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(1.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(1.0)]

(2)

whattype(x2[1])

list

(3)

numboccur(x2[1], {0.})

0

(4)

NULL

But, when I plugged the list at (2) it works...  

numboccur([0., 0., 1., 1., 0., 0., 1., 0., 0., 0.], 0.)

7

(5)

``

NULL

NULL

Download numboccur.mwnumboccur.mw

restart;In this code "add" is a trouble.
A := Matrix([[1, 2, 1, 3], [1, 1, 2, 1], [1, -2, 5, -11]]);
cs := LinearAlgebra:-ColumnSpace(A);
cnames := [seq(c || j, j = 1 .. numelems(cs))];
cvals := seq(solve([entries(A[() .. (), k] -~ add(`*`~(cnames, cs)), 'nolist')], cnames)[], k = 1 .. op([1, 2], A));
seq(add*rhs~(cvals[k]) *~ cs, k = 1 .. op([1, 2], A));
add does not play its role. Why. Thank you.

The timelimit command of Maple can be used to do a computation if it uses less than a given amount of time, otherwise generating an error message that can be cought by try ... catch. Now my question is that there exists any similar command, but with a limitation on memory usage, not the time usage. I don't mean what datalimit in kernelopts can does, because I am not going to limit the memory usage of the whole Maple session, but just a command which may be used inside a larger procedure etc.

Universidad Metropolitana de Ciencias de la Educación
Santiago de Chile

Derivative operator on vectors of real variable (R3): applied to curvilinear motion with Maple and MapleSim

In the present work it will be demonstrated how the derivative operator acts in functions of real variable in the movement of a particle that performs a curvilinear trajectory; using the scientific software of the Maplesoft company known by the names Maple and MapleSim, because nowadays most university teachers (higher education) do not visualize the movement of the particle in real time as well as the results of the calculations of speed and acceleration simultaneously. The objectives achieved are to use the vector operator with the help of these programs. As a theoretical tool we will use the three-dimensional vector spaces of real variable with Newton's notation. The methodology we have used was native syntax and embedded components using block diagrams. For the case of particle motion we use the graphical programming proposed by MapleSim. Viable results were achieved for motivational effects and time reduction in complex calculations without neglecting innovation in physical sciences, for teachers in higher education and university students. This work is self-sustaining via Maple Cloud.

Lenin Araujo Castillo

Ambassador of Maple

I try to find kernel and image of a application whose i know the matrix.
restart;
with(LinearAlgebra);
A := Matrix([[1, 1, 1, -1], [-1, 1, -1, -1], [1, -1, -1, -1], [-1, -1, 1, 3]]);
k := op(NullSpace(A));#kernel
MatrixVectorMultiply(A, k);#check
C := op(ColumnSpace(A));
X := <x, y, z, t>;
F := MatrixVectorMultiply(A, X) - a*C[1] - b*C[2] - c*C[2];
G := op(convert(F, list));
solve({seq(G[i] = 0, i = 1 .. 4)}, {a, b, c}); why there is no solution ? Thank you.

simplified_MPH_to_RPM_to_engineering_units.mw

Good Morning,

I don't know why I have such difficulties with rotational units, esp the 2*pi conversions with radians and revolutions. 

   We are often back solving from MPH of the vehicle back to RPM of the wheel (revolutions per minute [or seconds]) to Rad/sec for engineering units such as torque*RPM calcs for power - kW.   

Almost everytime I try to use units to convert the units the worksheet will revert to "atomic" units.   I quote "atomic" as this is what I appears to be.:  See graphic (also simplifiied worksheet attached)

The unit length(radius) seems to be a factor that is not well documented.   It also seems the earlier rplies include extra work to use convert and possibly "symbolic = true") as an extra step per Acer in an earlier posting several years ago.   

When running calcs the convert, or simplify (to cancel length units m and inches out) the cancelations and the unit combinations seem to work awkwardly in this particular area.



 

Hello, dear members! I try to solve the 1-D Wave Equation with initial and boundary conditions. And I have a problem when I'm trying to find the coeffs of Fourier series, that they depend on initial conditions. This is my code for Maple:
 

restart;
with(PDETools);

# set the PDE, ic(initial conds) and bc (boundary conds)
pde := diff(u(x, t), t, t) = a^2*diff(u(x, t), x, x);
ic := u(x, 0) = 0, D[2](u)(x, 0) = psi(x);
bc := u(0, t) = 0, u(l, t) = 0;
psi := piecewise(0 <= x and x <= l/2, x, l/2 <= x and x <= l, l - x);

# using Fourier method for solving (I require use this methods)
res := pdsolve(pde, HINT = T(t)*X(x));

ode1 := op(1, op(1, op(2, res)));

ode2 := op(2, op(1, op(2, res)));               

ode2 := subs(_c[1] = -lambda, ode2);
              

# solve 2 ODE
# equation rely X(x)
dsolve({ode2, X(0) = 0}, X(x));

sin(sqrt(lambda)*l) = 0;

solve(%, lambda, allsolutions);

lambda := (Pi*n/l)^2;

X := (x, n) -> sin(Pi*n*x/l);


# equation rely T(t)
ode1 := subs(_c[1] = -lambda, ode1);

dsolve({%, T(0) = 0}, T(t));

T := (t, n) -> C1[n]*sin(Pi*n*a*t/l);

# write the general solutions
Un := (x, t, n) -> T(t, n)*X(x, n);

# find the coeffs series
simplify(subs(t = 0, diff(u(x, t), t)) = psi);

((2/l)*l/(Pi*n*a)*int(psi*X(x, n), x = 0 .. l) assuming (x < l))
simplify(%) assuming n::posint;
combine(%);
C1[n] := factor(%)

But I got it:



How to find this C1 coefficient and solve this equation? Maple doesn't work now. This command does not give the result.
I attached mws files, so pdeLR_11.mw is another code for solving, but it is not working so((! 

Maybe I use this command wrong, or step-function is not convenient for maple?

Any helpful advice would be very cool. I am grateful in advance!

https://drive.google.com/file/d/1VznAvxcpF3ME9MMBjfKKifsbrbOb9uSY/view?usp=sharing

https://drive.google.com/file/d/15D7BCRwHliYb2OseH81i81RjQP7NRFgS/view?usp=sharing

 

I know that the "rotate" can rotate image of a function, but we see that the coordinate axes don't change as much. For example:

with(plots):
with(plottools):
p:=plot(sin(x),x=0..2*Pi):
r := rotate(p, Pi/4):display(p, r)

Although someone seems to have asked a similar question a long time ago, it was far from what I needed.

https://www.mapleprimes.com/questions/97812-Flip-Plot-Exchange-X-And-Yaxes

What I want to do is rotate the axes and the image at the same time rather than just flip axes.  The schematic diagram is as follows.

Recently I have wanted to add some questions/answers to "Favourites" . I added some posts a few years ago. Now I can't figure out how do do it. A good example is this evenings question on setting up a library. How to install a library on Maple? - MaplePrimes

The answer has useful links. And this is a particular topic I tend to have difficulty with.

Hey!

Student here, and I'm currently using a few year old laptop (amd a4-9125  2-core, 8gb ram) running latest stable ubuntu, and maple keeps crashing on me seemingly out of nowhere, even on very simple tasks, like copy-pasting equations and calculating integrals. This doesn't happend all the time, but when it does, it just shuts the program. I checked the logs and found Maple got this error message:
: free(): invalid next size (normal)
: Aborted (core dumped)

I checked a bit online, and it might be a memory issue.
Is my computer just too old for this program, or is it something fixable?

My forced spring mass system is 4x"+4x'+3x=sin(wt). I calculated my w=w* value that maximizes the amplitude (0.5) and my initial conditions are x(0)=x'(0)=0. I need to graph x(t) when w= w* and when w=w*/2. How am I supposed to input this information into maple to create a graph? 

I drew a polygon using some point coordinates combined with the pointplot.

c1 := <0, -2>:
c2 := <1, 2>:
c3 := <2, 2>:
c4 := <0.5, 6>:
c5:=<1, 4>:
with(plots):
p1:=pointplot([c1, c2, c3, c4,c5, c1], color = red, connect = true);

I ‘d like to add  label  of endpoints to polygons, although I did this via textplot, but it didn't feel very neat. I hope when the polygon is drawn, labels of  every endpoints appear . These labels are the names of the assignment variable for the coordinates of the endpoints.

c1 := <0, -2>:
c2 := <1, 2>:
c3 := <2, 2>:
c4 := <0.5, 6>:
c5:=<1, 4>:
with(plots):

t1 :=textplot([0, -2, 'typeset'("c1")], 'align' = 'above'):
t2 :=textplot([1, 2, 'typeset'("c2")], 'align' = 'above'):
t3 :=textplot([2, 2, 'typeset'("c3")], 'align' = 'above'):
t4 :=textplot([0.5, 6, 'typeset'("c4")], 'align' = 'above'):
t5 :=textplot([1, 4, 'typeset'("c5")], 'align' = 'above'):
p1:=pointplot([c1, c2, c3, c4,c5, c1], color = red, connect = true):
display({p1, t1,t2,t3,t4,t5});

 

I think  DrawGraph command  in graph theory package  is very good to achieve this in a sense. 

How do I find with maple's help  for which parameter m does the equation:

x^2+2*m*x-6*x=m^3 have one of its roots equal to the square of the other root?

Thanks!

First 21 22 23 24 25 26 27 Last Page 23 of 35