Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I want to know about some algorithms used by Maple, if there is a way to dig through the code.


 

``

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

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);

 

Let be given tetrahedron ABCD, where AB = BC = AC = a, AD = d, AD = e, CD = f. I know that, If the measure of angle of AB and CD equal to Pi/3, then we have d^2 - e^2 - a*f = 0. I tried:
ListTools[Categorize];
L := []; 
for a to 30 do for d to 30 do
for e to 30 do for f to 30 do
if abs(d-e) < a and a < d+e and abs(a-e) < d and d < a+e and abs(d-a) < e and e < d+a and abs(d-f) < a and a < d+f and abs(a-f) < d and d < a+f and abs(d-a) < f and f < d+a and abs(e-f) < a and a < e+f and abs(a-f) < e and e < a+f and abs(a-e) < a and a < a+e and -a*f+d^2-e^2 = 0 and igcd(a, d, e, f) = 1 and nops({a, d, e, f}) = 4
then L := [op(L), [a, d, e, f]] end if end do end do end do end do; 
nops(L); 
L;


Another way to find the length of edges of a tetrahedron knowing that the mesure angle of two opposite?

Hello Friends

I have a critical problem that I wish to solve it with maple

suppose we have a list like following: y_obs=(2,4,8,7,9,52,35,478,52) and corresponding variance σy=(.2,.3,.5,.87,.1.2,.22,.78,.99,1.5)
we know y as the function of x described such as y_theoric=x+p and minimizing X is

X=Sigma [(y_theoric-y_obs)^2]/σy which includes the sum of nine numbers...

the question is:

How we can find p from likelihood function and plot general behavior of y versus of x through two above series?

for example this solution used in article under the names Hubble parameter data constraints on dark energy by Yun Chen and Bhatra Ratra (Physics Letters B)

Thank you

 

Hello,

      I was trying to apply some assumptions to a pdsolve command and noticed a strange error. Here's a minimal working example.

restart():

pdsolve(diff(f(t,x),t) = 0, {f(t,x)}, ivars = {x, t}) assuming x::real:

returns

Error, (in simpl/relopsum) invalid terms in sum: diff(f(t,x),t) = 0

Is this indeed a bug, or is it expected behavior?

 

Hello

 

 

I have a problem with "Infinitesimals" for the system of equations. 

"Infinitesimals" Counts the system for (x, t) but shows an empty string for (x, y, z, t).

 

When I add to the equation (img 2) u [y, y], u [z, z] or simply y ^ 2, z ^ 2, Maple shows an empty string in Infinitesimal.

 

Thank you in advance.

Hello everybody,

I am quiet new to Maple and just have to program a small tool.

I need to show a conculison in a pop-up Window which should contain a matrix and a plot.

I tried different ways but they didn't work.

Thanks in advance

Hello,

I have a very simple problem. When Maple displays long outputs I can only see a part of them. Here there is an example

https://www.dropbox.com/s/ymp1vdsg80ewu1s/Untitled.jpeg?dl=0

On my previous versions of Maple I had a slider on the bottom of the page. How can I activate it in Maple 2016?

Thanks, Nicola

When I finished the following code, I can not export the .eps file for the densityplot

 

 

restart; t := 1; a[1] := 0; a[2] := 2; a[4] := 0; a[5] := 1; a[6] := -1; a[8] := 0; g := t*a[3]+x*a[1]+y*a[2]+a[4]; h := t*a[7]+x*a[5]+y*a[6]+a[8]; f := g^2+h^2+a[9]; a[3] := -(3*a[1]^3+a[1]*a[2]^2+3*a[1]*a[5]^2-a[1]*a[6]^2+2*a[2]*a[5]*a[6])/(3*(a[1]^2+a[5]^2)); a[7] := -(3*a[1]^2*a[5]+2*a[1]*a[2]*a[6]-a[2]^2*a[5]+3*a[5]^3+a[5]*a[6]^2)/(3*(a[1]^2+a[5]^2)); a[9] := (3*(a[1]^6+3*a[1]^4*a[5]^2+3*a[1]^2*a[5]^4+a[5]^6))/(a[1]*a[6]-a[2]*a[5])^2; u := (4*(2*a[1]^2+a[5]^2))/f-8*(g*a[1]+h*a[5])^2/f^2; with(plots); plot3d(u, x = -20 .. 20, y = -20 .. 20, axes = frame, labels = ["x", "y", "z"], labeldirections = ["horizontal", "horizontal", "horizontal"], labelfont = ["TIMES", 16], style = patchnogrid); densityplot(u, x = -10 .. 10, y = -10 .. 10, axes = frame, labels = ["x", "y"], labeldirections = ["horizontal", "horizontal"], labelfont = ["TIMES", 16], colorstyle = HUE, style = patchnogrid); contourplot(u, x = -5 .. 5, y = -5 .. 5, labels = ["x", "y"], labeldirections = ["horizontal", "horizontal"], labelfont = ["TIMES", 16])

Why does

MultiSeries:-series(LegendreQ(-1/2,x),x=-1))

not work?

series(LegendreQ(-1/2,x),x=-1))

seems to work, but does it give the correct result?

I actually thought there was a pole at -1.

Thx

PS: or is the cut between -1 and 1 with both logarithmic singularities?

I'm still wondering about the behaviour of MultiSeries

Hi I was hoping if someone could mark this proof for a lemma regarding the Euler totient functin for me.

 

Thanks in advance.

 

totient_lemma_proof.mw

I am working on problems in identifiability and I am interested in how many Lie derivatives of two kinds are required to get a full result for a simple system, and more interestingly a way of visualising what comes out when too few Lie derivatives are used. 

The method is simple, I use Lie derivatives my own program GTS2 to get relationships that must be conserved for the output for two parameter vectors to give the same output (you can find it along with everything else for this question here.

An example of a list of parameter relationships is: 

[{R = R, Rh = Rh, alpha = alpha, C[T] = C[T], Ch[T] = Ch[T], k[a1] = -(k[a2]*C[T]*R-kh[a1]*Ch[T]*Rh-kh[a2]*Ch[T]*Rh)/(R*C[T]), k[a2] = k[a2], k[d1] = k[d1], k[d2] = k[d2], kh[a1] = kh[a1], kh[a2] = kh[a2], kh[d1] = -(k[d1]*x[2]-k[d1]*xh[1]-k[d1]*xh[2]-k[d2]*x[2]+kh[d2]*xh[2])/xh[1], kh[d2] = kh[d2], x[1] = -x[2]+xh[1]+xh[2], x[2] = x[2], xh[1] = xh[1], xh[2] = xh[2]},{...},{...}]

i.e. they will show that there are multiple relationships that satisfy the Lie derivative conditions (each relationship is in a seperate set within the list) and within each set some parameters can vary freely (like R and Rh in the above) and others are determined by the ones that vary freely (like k[a1] and kh[a2]).
 
I want to count the numbers of parameters that have their relationships determined in three different ways so i can plot these numbers as the numbers of both types of Lie-Derivatives vary. These numbers are:
 

  1. N_i number of identifiabile parameters; parameters that in all solutions are of the form {p=ph or ph=p}
  2. N_l number of locally identifiable parameters; parameters that in all solutions take either the form {p=ph or ph=p} or {p=some function of the parameters with hs at the end of their names or ph=some function of exclusively the parameters without hs at the end of their names}
  3. N_u number of unidentifiable parameters; parameters that are neither identifiable or n locally-identifiable. 

    I think its nice to have a link to a worksheet at the end of a question, so here_it_is_again.

Acknowledgement: most of the code in the above was based on snippets written by @Carl Love in response to my previous questions.

EDIT: I had some teaching to do, so uploaded the question early as i was writing in a computer room- as a result the maple worksheet I originally included was confusing, the worksheet I've included in this edit is much easier to understand.

TLDR: i am looking a way to count the numbers of outputs of various types from a program that is built around maples solve feature, and stuck

Hi all, does anyone know why i can't export maple as a pdf file? I have tried saving as other type of files which works, but when pressing save as pdf nothing happens. 

 

I've used this guide, https://www.maplesoft.com/support/help/maple/view.aspx?path=worksheet/managing/exportPDF#bkmrk1

First 97 98 99 100 101 102 103 Last Page 99 of 2097