Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi! I have a variable polynomial expression and I want to cut off all the terms of order 3 and more, for every product of variables.

For example consider the polynomial P = x + y + a*x^2 + b*x^3 + c*x*y + d*x^2*y + e*x*y^2 + y^2, I want an operation who returns me a*x^2 + c*x*y + y^2

(terms for which the sum of exponents in x and y exceeds or less two are being deleted)

Is it possible?

 

Is there a way to define forms with anticommuting functions? I've tried without success:

> with(Physics):
> Setup(anticommutativeprefix={alpha,beta}):
> with(DifferentialGeometry):
> DGsetup([x, t], M):
> (alpha*dx+beta*dt) &wedge (alpha*dx+beta*dt);

                             (0 dx) ^ dt

> (f*dx+g*dt) &wedge (f*dx-g*dt);

                           -(2 f g dx) ^ dt

 

Thanks. Jose Carlos

hi..

how i can write this line ''for'' in maple?

thanks..

for.mw
 

TopEdge = "C";
BottomEdge = "C";
LeftEdge = "C";
RightEdge = "C";

"For[i = 1, i < m + 2, i++, w[i, 1] = 0; w[i, n + 1] = 0];  For[j = 1, j < n + 2, j++, w[1, j] = 0; w[m + 1, j] = 0];  If[TopEdge == "C", For[i = 1, i < m + 2, i++, w[i, 0] = w[i, 2]],    If[TopEdge == "S", For[i = 1, i < m + 2, i++, w[i, 0] = -w[i, 2]],     "Invalid Input Data!"]]  If[BottomEdge == "C",    For[i = 1, i < m + 2, i++, w[i, n + 2] = w[i, n]],    If[BottomEdge == "S",     For[i = 1, i < m + 2, i++, w[i, n + 2] = -w[i, n]],     "Invalid Input Data!"]]  If[LeftEdge == "C", For[j = 1, j < n + 2, j++, w[0, j] = w[2, j]],    If[LeftEdge == "S", For[j = 1, j < n + 2, j++, w[0, j] = -w[2, j]],     "Invalid Input Data!"]]  If[RightEdge == "C",    For[j = 1, j < n + 2, j++, w[m + 2, j] = w[m, j]],    If[RightEdge == "S",     For[j = 1, j < n + 2, j++, w[m + 2, j] = -w[m, j]],     "Invalid Input Data!"]]  w[0, 0] = w[2, 2]; w[0, n + 2] = w[2, n]; w[m + 2, 0] = w[m, 2];   w[m + 2, n + 2] = w[n, m];"

``


 

Download for.mw

 

If binary constraints are imposed on an optimization problem and LPSolve presents a solution, is it possible to extract the variables that have zero or one assigned to them? This would be most useful if there are many variables, for example...

If a solution is returned that looks like ...

[x[001]=0, x[101]=1, x[201]=0, x[301]=1, ....], how can I filter those solutions that equal zero?

Thanks for reading!

Is there a method to relate groebner bases with monomials ideals

How to plot magnetic field of maxwell equations like vector field

I am debugging a Maple program (and I cannot contact its author). Allegedly, the program ran under some old version of Maple, but it does not run under my Maple 2015 or Maple 9. I am trying to make it run under Maple 2015. I found a place where the program does not do what it is expected to do, but don't know how to make it do what I want:-)

I inserted a DEBUG statement at some place in the program, and the debugger window opens when the program comes to that statement. I execute  the following statement in the debugger:  traperror(Groebner:-NormalForm(g,AA,matermorder)); if I get some benign result, such as 0, I push "continue" in the debugger, and the program runs until it gets to the DEBUG statement again. I repeat these two operations several times until the traperror statement gives the following: polynomials must be members of the algebra" (my comment: only one quotation mark).

So I would like to amend the program to process the exception differently from how it is done now, but I don't know how to get access to the result of the traperror statement. For example, when I am trying to execute the following operators in the debugger: adebug:= traperror(Groebner:-NormalForm(g,AA,matermorder));adebug; , I only get the following diagnostics: Warning, extra characters at end of parsed string  So I don't understand what adebug contains and how I can introduce some logic based on the contents of adebug to handle the exception differently.

I suspect I am missing something simple due to my lack of experience with Maple. I tried to put the result of traperror into a parse statement, but did not get any satisfactory results.

 

Thank you 

hi .in substuting in ode equation i encounter with error

Error, (in eval/diff) invalid input: diff received (f1[i+1, i]-2*f1[i, i]+f1[i-1, i])/h^2, which is not valid for its 2nd argument

please help me

thanksh_2.5_eq4.mw
 

 

restart; with(DEtools); with(plots); interface(rtablesize = 25); ode1 := -P1*(diff(f1(x, y), x, x, x, x, x, x)+diff(f1(x, y), y, y, y, y, y, y)+3*(diff(f1(x, y), x, x, x, x, y, y))+3*(diff(f1(x, y), x, x, y, y, y, y)))+P2*(diff(f1(x, y), x, x, x, x)+diff(f1(x, y), y, y, y, y)+2*(diff(f1(x, y), x, x, y, y)))-N_x*(diff(f1(x, y), x, x))-N_y*(diff(f1(x, y), y, y)); F1xx := i, proc (j) options operator, arrow; (f1[i+1, j]-2*f1[i, j]+f1[i-1, j])/h^2 end proc; F1yy := i, proc (j) options operator, arrow; (f1[i, j+1]-2*f1[i, j]+f1[i, j-1])/hy^2 end proc; F1xxxx := i, proc (j) options operator, arrow; (f1[i+2, j]-4*f1[i+1, j]+6*f1[i, j]-4*f1[i-1, j]+f1[i-2, j])/h^4 end proc; F1yyyy := i, proc (j) options operator, arrow; (f1[i, j+2]-4*f1[i, j+1]+6*f1[i, j]-4*f1[i, j-1]+f1[i, j-2])/hy^4 end proc; F1xxxxxx := i, proc (j) options operator, arrow; (f1[i+3, j]-6*f1[i+2, j]+15*f1[i+1, j]-20*f1[i, j]+15*f1[i-1, j]-6*f1[i-2, j]+f1[i-3, j])/h^6 end proc; F1yyyyyy := i, proc (j) options operator, arrow; (f1[i, j+3]-6*f1[i, j+2]+15*f1[i, j+1]-20*f1[i, j]+15*f1[i, j-1]-6*f1[i, j-2]+f1[i, j-3])/hy^6 end proc; F1xxyyyy := i, proc (j) options operator, arrow; (f1[i-1, j-2]-4*f1[i-1, j-1]+6*f1[i-1, j]-4*f1[i-1, j+1]+f1[i-1, j+2]-2*f1[i, j-2]+8*f1[i, j-1]-12*f1[i, j]+8*f1[i, j+1]-2*f1[i, j+2]+f1[i+1, j-2]-4*f1[i+1, j-1]+6*f1[i+1, j]-4*f1[i+1, j+1]+f1[i+1, j+2])/(hy^4*h^2) end proc; F1yyxxxx := i, proc (j) options operator, arrow; (f1[i-2, j-1]-2*f1[i-2, j]+f1[i-2, j+1]-4*f1[i-1, j-1]+8*f1[i-1, j]-4*f1[i-1, j+1]+6*f1[i, j-1]-12*f1[i, j]+6*f1[i, j+1]-4*f1[i+1, j-1]+8*f1[i+1, j]-4*f1[i+1, j+1]+f1[i+2, j-1]-2*f1[i+2, j]+f1[i+2, j+1])/(h^4*hy^2) end proc; eq := simplify(eval(ode1, {diff(f1(x, y), x, x) = F1xx(i, j), diff(f1(x, y), y, y) = F1yy(i, j), diff(f1(x, y), x, x, x, x) = F1xxxx(i, j), diff(f1(x, y), y, y, y, y) = F1yyyy(i, j), diff(f1(x, y), x, x, x, x, x, x) = F1xxxxxx(i, j), diff(f1(x, y), x, x, x, x, y, y) = F1yyxxxx(i, j), diff(f1(x, y), x, x, y, y, y, y) = F1xxyyyy(i, j), diff(f1(x, y), y, y, y, y, y, y) = F1yyyyyy(i, j)}))

Error, (in eval/diff) invalid input: diff received (f1[i+1, i]-2*f1[i, i]+f1[i-1, i])/h^2, which is not valid for its 2nd argument

 

NULL

 

expand(%)

i

(1)

simplify(4*h^4*f3[i]*f4[i]*%)

4*h^4*f3[i]*f4[i]*i

(2)

diff(f1(x, y), x, x, y, y, y, y)

diff(diff(diff(diff(diff(diff(f1(x, y), x), x), y), y), y), y)

(3)

``

``

NULL


 

Download h_2.5_eq4.mw

 

Hello all

 

I am new to Maple, and I am solving a system of two coupled partial differential equations using pdsolve, but I am having a hard time retrieving the solution evaluated at some point from the output. The output of pdsolve is a module, which appears to have different "methods" on it, including "plot3d" and "value". I can easily get a plot of my solution by using plot3d, but I don't know how to get a meaningful value out. For instance, if my solution is (f(x,y), g(x,y)), I would like to define H(x,y) = (f(x,y), g(x,y)), and be able to type H(10,10) into Maple to have my solution evaluated at that point. The result should be (1,1).

Here is a toy example:

firstEq := diff(f(x, y), x)+diff(f(x, y), y) = f(x, y)+g(x, y);
secondEq := diff(g(x, y), x)+diff(g(x, y), y) = 2*f(x, y)+g(x, y);
pdsystem := {firstEq, secondEq};

bv11 := f(10, y) = 1;
bv12 := f(x, 10) = 1;
bv21 := g(10, y) = 1;
bv22 := g(x, 10) = 1;
bvs := {bv11, bv12, bv21, bv22};
 
pdsolution := pdsolve(pdsystem, bvs, numeric, time = x, range = 0 .. 10);
 
pdsolution:-plot3d(x = 1 .. 10, y = 0 .. 10);
pdsolution:-value(10, 10);
Error, (in pdsolve/numeric/value) got additional unknown arguments {2}
 

Best regards.

 

hello im currently working on a project and im fitting some non-linear data with the follwing model:

model:= 1.*10^5*exp(-t*k-*t/B)

where B and k are the unkown parameters.

i have the following data:

X=<0,2,4,6,8,10>

Y := <100000, 86089.76983, 74114.4849, 63804.98946, 54929.56828>

if i do the fit like this: fit(model,X,Y,t) i get a fit that looks like this:

100000*exp(-0.520664970792415e-1*t) which i alright. however when i try to get the parameters i get something like this

fit(model,X,Y,t,output=[parametervalues])

[B = .999563650781966, k = -.948370042622550] - when i define k=0.05 however i get [B = 483.910474528817], which is the right parameter.

insereting the two different sets yields:

1) k=0.05, B = 483.910474528817 -> 100000*exp(-0.520664970792415e-1*t) (good aprox to the fit)

2) B = .999563650781966 and k = -.948370042622550 -> 100000*exp(-0.5206649794e-1*S) (way off)

how is this possible anyone able to help, been sitting with this for days now?

 

 

I have to calculate a sort of trend line, but I don't know how it works with maple.
I tried with Excel.

Do you think the method is right? How can I replicate it on maple?

Thanks in advance

Hi Everyone!

The differential geometry packege of Maple allows one to compute Lie brackets of vector fields in coordinates.

I wonder if it is possible to compute Lie brackets in a more abstract fashion. For instance, I wish to define X,Y,Z as elements of a Lie algebra and a,b,c to be constants. For them I want to compute (= expand and simplify) expressions like [[aX+bY,cZ],[cY,[bX+cZ]]] using only basic properties of Lie brackets (skew-symmetry + Jacobi identity), without going to coordinates. Is it possible?

Thanks,

Dmitry

Hi everyone.

I'm using Maple 15 to try to give random values to a matrix with some columns fixed, the problem is that it has to be unitary, so I managed to create a system of equations (with 36 linear equations and 24 variables) which should give me the information i require.

I have been trying with fsolve, etc. but i haven't been able to solve it yet, as I usually get the error: "Error, (in fsolve) number of equations, 36, does not match number of variables, 24"

Is there any way to find out which equations are neccesary and get rid of the rest of them? Or can Maple give ramdon values to some of the variables and calculate the others?

Thanks in advantage!

Hallo,
I got problem with starting maple 2016, when I click on the app files, it thinks for a second then nothing happens, I have tried to uninstall and install again, but no defference. I am not getting any error at any point, that is why it is hard to fix. maybe it has to do with java, jre or PATH?

Thanks for your help.  

https://www.dropbox.com/s/zpj7kudgn3gikfa/INS%20-%20Bygninger%20energibehov.mw?dl=0

https://www.dropbox.com/s/vj0t0p3r9stoy3c/INS%20-%20F%C3%B8ringsveje%20og%20indeklima.mw?dl=0

"There were problems during the loading process. Your worksheet may be incomplete."

I have seen threads where this has been solved, but i do not know how to do it.

It happened to both files, after restarting my computer.

Are anyone willing to help me?

First 990 991 992 993 994 995 996 Last Page 992 of 2215