Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi,
I want to calculate the Taylor expansion of an expression with Maple, but there is an error. How can I fix it?
T.mw
Thanks

I would like to place a legend between the axes and the image, but there is no such place in the positions given by the software. How to do it?

restart;
with(plots):
_local(D):

EQ := proc(M, N) local eq; eq := (y - M[2])/(x - M[1]) = (N[2] - M[2])/(N[1] - M[1]); end proc;
     EQ := proc (M, N) local eq; eq := (y-M[2])/(x-M[1]) = 

        (N[2]-M[2])/(N[1]-M[1]) end proc


On considère un trapèze dans lequel une base est fixe l'autre base a une longueur constante et la somme des 2 autres côtés est constaante.
Trouver :
1-. le lieu des sommets mobiles.
A := [xA, 0]:
B := [xA + a, 0]:
D := [xD, yD]:
C := [xD + b, yD]:
EQ(B, C);
E := [xA + a - b, 0]:
Omega1 := (A + E)/2;
Application numérique :
Lieux des sommets C et D

xA := -5:
a := 13:#a>=b
b := 7:
c := -3:
xD := -6:
xC := xD + c:

A:
B:
C:
D:
Ll:=11:aa:= Ll/2: 
cc := (a - b)/2:
bb := sqrt(aa^2 - cc^2):
el1 := (x - Omega1[1])^2/aa^2 + y^2/bb^2 = 1:
sol := solve(subs(x = xD, (x - Omega1[1])^2/aa^2 + y^2/bb^2 = 1), y):
yD := sol[1]:
el2 := (x - Omega1[1] - b)^2/aa^2 + y^2/bb^2 = 1:
EL1 := implicitplot(el1, x = -9 .. 4, y = -6 .. 6, color = blue):
EL2 := implicitplot(el2, x = -9 .. 12, y = -6 .. 12, color = blue):
Trap := polygonplot([A, B, C, D], color = blue, filled = true, transparency = 0.9):
Points := pointplot([A[], B[], C[], C[], D[], E[], Omega1[]], symbol = solidcircle, color = [red], symbolsize = 6):
tex := textplot([[A[], "A"], [B[], "B"], [C[], "C"], [D[], "D"], [E[], "E"], [Omega1[], "Ω1"]], align = ["above", "right"]):
display([Trap, EL1, EL2, tex, Points], axes = normal, scaling = constrained):
Fig := proc(xD) 
local yD, D, C,Points,tex; 
global A, B, b, Omega, xA, xB, EL1, EL2; 
solve(subs(x = xD, (x - Omega1[1])^2/aa^2 + y^2/bb^2 = 1), y); 
yD := %[1]; D:= [xD, yD]; C := [xD + b, yD];
Points := pointplot([A[], B[], C[], C[], D[], E[], Omega1[]], symbol = solidcircle, color = [red], symbolsize = 6): 
tex := textplot([[A[], "A"], [B[], "B"], [C[], "C"], [D[], "D"], [E[], "E"], [Omega1[], "Ω1"]], align = ["above", "right"]):
display([polygonplot([A, B, C, D], color = blue, filled = true, transparency = 0.9), Points,tex,EL1, EL2], axes = normal, scaling = constrained); 
end proc:

Fig(2):Fig(-4):
Fig([seq(-6 + 3*i/10), i = 1.20], insequence = true);
Error, (in Engine:-Dispatch) badly formed input to solve: not fully algebraic
;I don't understand this error message. Thank you gfor your help.
 

I recently upgraded from Maple 2019.2 directly to Maple 2022.2. I now have a problem with any double or triple literal subscripted variable in old worksheets or in new ones under Maple 2022.2. Double and triple indexed subscripts work just fine under Maple 2019.2.

If in Maple 2022.2 I enter X__a I get a proper Xa.  If I enter Y__a,b I get 'Ya,b' Note the leading prime preceeding the Y and the trailing prime following the subscript b down at the subscript level. This behavior holds for triple literal subscripts.

On the other hand, indexed subscripts work just fine in Maple 2022.2. If I enter X[a] I get Xa. If I enter Y[a, b] I get Ya,b .

How do I fix this behavior? When did it start? My jump from Maple 2019.2 to Maple 2022.2 was due to changing companies during the Covid period. I am using Maple on a Mac.

I have not tested literal superscripts or combinations of literal subscripts and superscripts.

Any help will be greatly appreciated. I use literal double and triple suscripts all the time to distinguish between vector and matrix components in different coordinate systems.

Neill Smith

Hello everyone,

I am trying to solve a system of 4 ODEs that describe a physical system, however, I get the message:

Error, (in dsolve/numeric/bvp) matrix is singular

Any help is much appreciated. The initial conditions are such that to find solution in steady state, that means, v(0)=v(period) and so on with all variables.

Download LLCcircuit_SteadyState_numerical.mw

Hello everyone,

I want to solve a simple ODE numerically having a piecewise periodic function in the ODE.

The periodic piecewise function definition is taken from this  post.

When solving using "dsolve" numerical, I get this error:

Error, (in f) unable to store '100000*square_wave_periodic' when datatype=float[8]

restart;
d := .5;
fs := 100*10^3;
Vin := 10;
C := 10*10^(-6);
R := 10;
L := 10*10^(-6);

DEFINE PERIODIC FUNCTION
square_wave := proc (t) options operator, arrow; piecewise(0 <= t and t <= d/fs, Vin, d/fs < t and t < 1/fs, 0) end proc

square_wave_periodic := proc (t) options operator, arrow; square_wave(t-floor(t*fs)/fs) end proc

ode1 := L*(diff(i(t), t))+v(t) = square_wave_periodic
ode2 := C*(diff(v(t), t))+v(t)/R = i(t)
IC := v(0) = 0, i(0) = 0
sol := dsolve({IC, ode1, ode2}, {i(t), v(t)}, numeric)

LCRcircuit_transient_numerical.mw

Any help is much appreciated ! Thank you !

Good day. 

I have been looking into the time series features in Maple and was eager to apply the models to one specific example containing 47 data points (attached).

When I run the ESM routine, Maple provides a forecast based on a (A,N,N) configuration. You will notice that the forecast for the following 12 data points is a constant value. I have also noticed this for several other data set examples and I would have expected the predictions to vary across the next 12 data points.

Does the (A,N,N) configuration in Maple automatically provide an optimal forecast and can anyone advise me on how to specify all possible combinations of (error, trend, season) models?

Thanks you for reading.

MaplePrimes_TS_Example.mw

solve((&PartialD;(-    &nabla;(f) ))/(&PartialD; t)+((DotProduct(v[0],&nabla;f))*(1-e(DotProduct(B,Omega)))+(c[s0]^(2)*rho[1])/(rho[0])(1-e(DotProduct(B,Omega)))+e(CrossProduct(&nabla; f,B))*Omega-e((DotProduct(-&nabla;f,Omega))*(DotProduct(B,&nabla;)))*(-&nabla;f)+e(E)*(1-(DotProduct(B,Omega)))+e^(2)(DotProduct(E,B))*Omega-e*((CrossProduct(E,Omega))*(&nabla;(-&nabla;f)),rho[1]);

lis := SearchSmallGroups('order' = 10 .. 100, 'soluble'): 
seq(DrawSubgroupLattice(SmallGroup(g), 'highlight' = CompositionSeries(SmallGroup(g))), g in lis[10 .. 20])

I want to see if these red nodes are present in each layer and connected at each level, so I need to detect a large number of images. But if I put them in the same row, these images will be very small and I have to zoom in one by one with the mouse to see them. How can I set the size of these images?

ps:I'm currently using my eyes to determine if these red nodes are present at each layer and connected at each level, and I'd be happy if there was code to do this

I want to do some memory management in Maple for large arrays.

To clarify this question: What do I have to do in Maple to free memory allocated to an array? The indications I have are that memory probably is not freed, but rather a new variable of null is created that replaces the old one, but the old one is still sitting around.

The first day of Maple Conference 2022 is coming up on November 2 and it's not too late to register! Please go to our conference home page and click on the "Register Now" button. This is a free virtual event open to all.

The schedule is available on the conference agenda page.

Come join us to see recent developments in research, education and applications, find out about new and upcoming features in our products, talk to Maplesoft staff and other members of the Maple community and view (and vote on) Maple and Maple Learn artwork.

We hope to see you at the conference!

Is this a bug?

I was cleaning my code using mint. It told me that

             These names were used as global names but were not declared:  right

which is the direction used in a limit. When this happens, I just replace the name with 'right' to make it happy. This works for everything so far. But now limit fails with

      Error, (in assuming) when calling 'limit'. Received: 'invalid directional argument'

the strange thing this happens only when adding assuming after the limit.

It seems to me to be some parsing issue?  Attached is worksheet showing the problem.

Maple 2022.2 on windows 10. So for now I will remove the '' and let mint just complain.

interface(version)

`Standard Worksheet Interface, Maple 2022.2, Windows 10, October 23 2022 Build ID 1657361`

c:=0:
m:=1:
n:=0:
f:=1/4*x^2:
limit(diff((x-c)^m*f,x$(m-n)),x = c,right)/(m-n)!;
limit(diff((x-c)^m*f,x$(m-n)),x = c,'right')/(m-n)!;

0

0

limit(diff((x-c)^m*f,x$(m-n)),x = c,right)/(m-n)! assuming real;

0

limit(diff((x-c)^m*f,x$(m-n)),x = c,'right')/(m-n)! assuming real;

Error, (in assuming) when calling 'limit'. Received: 'invalid directional argument'

 

Download issue_with_limit_oct_31_2022.mw

Hi,

Since a couple of years ago,  SQLite has been enriched with a bunch of new math functions not existing in previous versions: acos, asin, atan, atn2, atan2, acosh, asinh, atanh, difference, degrees, radians, cos, sin, tan, cot, cosh, sinh, tanh, coth, exp, log, log10, power, sign, sqrt, square, ceil, floor, pi. 

Examples: In SQLite version 3.39.4 2022-09-29 15:55:41 we can invoke:

sqlite> select pi();
3.14159265358979

sqlite> select power(2, 3);
8.0

sqlite> select floor(2.35);
2.0

Package Database[SQLite] in Maple 2022.2 does not recognize these functions.

In oldest versions of Sqlite3 we were able to add these functions after loading an external extension with sqlite3 api function load_extension() (see  https://sqlite.org/contrib/download/extension-functions.c), but his option is blocked in Maple:

dbName := "d:/sq3_maple/etc.db":
sq3Extension := "d:/sq3_maple/extensions.sq3":

with(Database[SQLite]);
[Attach, Bind, ClearBindings, Close, ColumnCount, ColumnNames, 
  Execute, Fetch, FetchAll, FetchRow, Finalize, Open, Opened, 
  Prepare, RESULT_BUSY, RESULT_DONE, RESULT_ROW, Reset, Step]

conn := Open(dbName):
Execute(conn, sprintf("SELECT load_extension('%s')", sq3Extension));
Error, (in Database:-SQLite:-Execute) not authorized

Am I missing something? Any way to add these functions to SQLite in current version of Maple?

Thanks in advance.

César Lozada

PS: SQLite is updated in Mathematica 13.1

 

 

 

is a typical example of Maple output (in this case the natural frequency of a harmonic oscillator with m>0) where further simplification to text book notation is desired.

To get

the context menu did not help. On the command level, combine,radical (which I assumed is suitable) was also not effective.

Is there a better way to achieve the desired simplification than the one (found by trial and error) in the attachment?

If there is no better way: Would it make sense to improve the combine or any other command for such a case?

combining_radical.mw

How can these eight equations q[0]...q[7] be solved for the eight unknowns a1[0]...a1[7] and with the lowest CPU time

11.mw

First 144 145 146 147 148 149 150 Last Page 146 of 2097