Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi, having two different arrays of the same length,  is there a command to associate every element of one to the other of the other array? Thanks



It means, to have an array compsed by ex := [[2, 3.584328599],[3, ...] ]
Attention : there's no correlation among elements!
Thanks a lot

I'm attempting to calculate eigenvalues of a 16 x 16 matrix (Vibronic_Model_Worksheet.mw) which contains a single variable "x".

However, this matrix contains 24 instances of imaginary numbers.

When I try to solve for any number other than x = 0, I get: "Error, (in LinearAlgebra:-Eigenvalues) expecting either Matrices of rationals, rational functions, radical functions, algebraic numbers, or algebraic functions, or Matrices of complex(numeric) values"

Eventually I want to be able to solve for multiple values of x simultaneously.

I'm still fairly new to maple, so I may have overlooked something.

Hello
What is the Problem

Hi,

Here is a set of simple instructions to illustrate the first problem :

restart:
fichier := TheNameOfSomeFile:
writeto(fichier):
printf("Hello\n"):
writeto(termional):

When executed from Maple 2015 or Maple 2016, the content of TheNameOfSomeFile is

Hello

When executed from Maple 2018 it becomes

> printf("Hello\n"):
Hello
> writeto(terminal):

 

Using interface(echo=0) changes nothing to the result obtained with Maple 2018.

Has anyone ever encountered this problem?
How can I fix it?


Thanks in advance


 

``

x1 := 0; -1; x2 := 0; -1; J2 := J1

J1

(1)

NULL

ec1 := (1/J3-1/J2)*M2*M3+m*g*(g2*x3-g3*x2) = 0;

(1/J3-1/J1)*M2*M3+m*g*x3*g2 = 0

(2)

ec2 := (1/J1-1/J3)*M1*M3+m*g*(-g1*x3+g3*x1) = 0;

(1/J1-1/J3)*M1*M3-m*g*x3*g1 = 0

(3)

ec3 := (1/J2-1/J1)*M1*M2+m*g*(g1*x2-g2*x1) = 0;

0 = 0

(4)

ec4 := g2*M3/J3-g3*M2/J2 = 0;

g2*M3/J3-g3*M2/J1 = 0

(5)

ec5 := g3*M1/J1-g1*M3/J3 = 0;

g3*M1/J1-g1*M3/J3 = 0

(6)

ec6 := g1*M2/J2-g2*M1/J1 = 0;

g1*M2/J1-g2*M1/J1 = 0

(7)

F1 := (1/J3-1/J2)*M2*M3+m*g*(g2*x3-g3*x2);

(1/J3-1/J1)*M2*M3+m*g*x3*g2

(8)

F2 := (1/J1-1/J3)*M1*M3+m*g*(-g1*x3+g3*x1);

(1/J1-1/J3)*M1*M3-m*g*x3*g1

(9)

F3 := (1/J2-1/J1)*M1*M2+m*g*(g1*x2-g2*x1);

0

(10)

F4 := g2*M3/J3-g3*M2/J2;

g2*M3/J3-g3*M2/J1

(11)

F5 := g3*M1/J1-g1*M3/J3;

g3*M1/J1-g1*M3/J3

(12)

F6 := g1*M2/J2-g2*M1/J1;

g1*M2/J1-g2*M1/J1

(13)

with(Groebner)

[Basis, FGLM, HilbertDimension, HilbertPolynomial, HilbertSeries, Homogenize, InitialForm, InterReduce, IsBasis, IsProper, IsZeroDimensional, LeadingCoefficient, LeadingMonomial, LeadingTerm, MatrixOrder, MaximalIndependentSet, MonomialOrder, MultiplicationMatrix, MultivariateCyclicVector, NormalForm, NormalSet, RationalUnivariateRepresentation, Reduce, RememberBasis, SPolynomial, Solve, SuggestVariableOrder, Support, TestOrder, ToricIdealBasis, TrailingTerm, UnivariatePolynomial, Walk, WeightedDegree]

(14)

G := {F1, F2, F3, F4, F5, F6};

{0, g1*M2/J1-g2*M1/J1, g2*M3/J3-g3*M2/J1, g3*M1/J1-g1*M3/J3, (1/J1-1/J3)*M1*M3-m*g*x3*g1, (1/J3-1/J1)*M2*M3+m*g*x3*g2}

(15)

B := Basis(G, tdeg(M1, M2, M3, g1, g2, g3))

Error, (in gcd/Freeze) arguments should be polynomials

 

IsBasis(B, tdeg(M1, M2, M3, g1, g2, g3))

Error, invalid input: Groebner:-IsBasis expects its 1st argument, G1, to be of type {list, set}, but received B

 

``

NULL


 

Download 418.mw

I have big expressions containing RootOf() which are however pretty simple.

For example something like

RootOf(x^2+1,x)

Is it possible to convert this later into the actual solution? e.g. +-*I ??

In Maple this works

my_list :=[1,2,3];
my_list[1]:=0;

But this does not

my_set:={1,2,3};
my_set[1]:=0;

gives error "Error, cannot reassign the entries in a set". I suppose it has to do with the fact that sets, mathematically speaking, do not have an "oder" per say? But the elements must be ordered internally as they show, right? So the first element in the set is "1" and the second element in the set is "2", etc...

Had to use the ugly and unatural notation of

my_set := subsop(1=0, my_set)

To change the element of a set. The above implifies an order as well. So why the first did not work, but the above works?

The question is why is this inconsistency of notation?   It is much more natural to write "A[i]:=something". 

If using "subsop(1=0, my_set)" is a must for some reason, then why Can't Maple make a short cut, where if a user types "A[i]:=something" where A is a "set", then it will internally get modified/replaced by "A:=subsop(i=something, A)", so that one can still use the more natural syntax instead?

But it would be better just removing this restriction of using A[i]:=something on a set.

i have a panel case here. Now I have got three 10 by10 data matrix which are x location, y location and z displacements respectively. How can i draw them into a surface plot? and 

how can i draw a displacement contour plot?

Hi all, is there a reliable way to hide/obfuscate the source code of a maple library file (*.mla) (e.g. if you want to redistribute it)?

From what I know, since it has to be into the archive, any not exported (or hidden) procedure can be easily viewed setting kernelopts(opaquemodules=false) or through LibraryTools:-Browse.

Hi all, how to write function to get cylic sum and symmetric sum

Example.

getSum(a, [a,b,c]) then return a + b + c,
getSum(a^2, [a,b,c]) then return a^2 + b^2 + c^2,
getSum(a^2b, [a,b,c]) then return a^2b + b^2c + c^2a,
getSum(a, [a,b,c,d]) then return a + b + c + d,
getSum(a^2b, [a,b,c,d]) then return a^2b + b^2c + c^2d + d^2a
getSum(ab, [a,b,c,d]) then return ab + ac + ad + bc + bd + cd.

Thank you very much.

If I try to plot the function piecewise(x < -2, 2, -2 <= x and x <= 5, 2*x+5, 5 < x, 1-sqrt(x-5)) which is discontinuous, why does the plot is continuous?

Any suggestions.

Thanks

 

Can someone help with the simplification of the result of this code? I am sure the "qs" in the final result should not appear.

Thanking you in anticipation of your positive responses

#k=1
restart:
P:=sum(a[k]*x^k, k=0..2):
assume(alpha>0,alpha <= 1):
Q:=fracdiff(P,x,alpha);
e1:=simplify(eval(P, x=q))=y[n]:
e2:=simplify(eval(Q,x=q))=f[n]:
e3:=simplify(eval(Q,x=q+h^alpha))=f[n+1]:
var:=seq(a[i], i=0..2):
M:=e||(1..3):

Cc:=eval(<var>, solve(eval({M}),{var}) ):
for i from 1 to 3 do
	a[i-1]:=Cc[i]:
end do:
Cf:=P:
E:=collect(Cf, [y[n], f[n], f[n+1]], recursive):
print():
#y[n+1]=collect(simplify(simplify(expand(eval(Cf,x=q+h^alpha)),size)), [y[n],f[n],f[n+1]], factor);
y[n+1]=simplify(eval(Cf, x=q+h^alpha)):
collect(%, [y[n], f[n], f[n+1]], recursive);

 

I want to solve the following algebraic equation system using solve command. But, it gives only the trivial solution. I want to find a,b and c in terms of k. k is a constant here. Thanks in advance.

Input:

solve({-6*c+(3/2)*c^2-2*b-3*b*c+(3/2)*b^2-3*a*c+(k^2)*b-b+(3/2)*(a^2)+(k^2)*a-a=0,
-2*b-3*b*c+3*(b^2)-6*a*c+2*(k^2)*c-2*c-9*a*b+3*(k^2)*b-3*b+6*(a^2)+4*(k^2)*a-4*a=0,
(3/2)*(b^2)-3*a*c+(k^2)*c-c-9*a*b+3*(k^2)*b-3*b+9*(a^2)+6*(k^2)*a-a=0, 
-3*a*b+(k^2)*b-b+6*(a^2)+4*(k^2)*a-4*a=0, 
(3/2)*(a^2)+(k^2)*a-a=0},{a,b,c});

Output:

{a=0, b=0, c=0}

 

I want to solve an ODE of second order with Adams-Bashforth method.

It seems the solution has convergence for a small range of requested interval.

Please download the file from link below and made your comment on it.

Thank you for taking your time

https://ufile.io/f9a0e

When I input the the following command line in Maple 2018.1

 > Int(1/(1+sqrt(x)),x=0..1)=int(1/(1+sqrt(x)),x=0..1);

the output is 

>Int(1/(1+sqrt(x)), x = 0 .. 1) = MeijerG([[0, 0, 1/2], []], [[1/2, 0], [-1]], 1)/Pi

which is not the desired result!  How can I get the desired result like this

>2-ln(2)

Thanks a lot.

 

First 792 793 794 795 796 797 798 Last Page 794 of 2219