# MaplePrimes Questions

Search Questions:

## Latest Questions Latest Questions Feed

### Calculate differential of commutators...

Yesterday at 9:34 AM
1 0

Hi,

I am trying to realize the following calculation in Maple.

$\left[\sum_{i=0}^n y_i(x) \partial_x^i , \sum_{j=0}^m z_j(x) \partial_x^j \right] \\ = \sum_{i=0}^n \sum_{j=0}^m \sum_{l=0}^i \binom il y_i(x) \left( \partial_x^{i-l} z_j(x)\right) \partial_x^{l+j} \\ - \sum_{j=0}^m \sum_{i=0}^n \sum_{l=0}^j \binom jl z_j(x) \left( \partial_x^{j-l} z_i(x)\right) \partial_x^{l+i} \ .$

Is there a way to make maple understand d/dx as a differential opperator and calculate with it? When i for example try to calculate diff(d/dx, x) it should give me d^2/dx^2 as a result. Unfortunately i don't know how to realize this.

Basic problem is i don't know how to realize operator expressions in maple like for example:

f(x) d/dx      ( f(x) is a smooth function of x here )

where when applied to a function h(x) it should result in f(x) d/dx h(x) .

Is that possible?

Thank you very much in advance.

### expand causing lhs to be zero...

Yesterday at 1:20 AM
0 2

I am trying to expand out the terms  of equation 13.  The expand command causes the lhs to be zero?

 (1.1)

 (1.2)

 (1.3)

 (1.4)

 (1.5)

 (1.6)

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

 (9)

 (10)

 (11)

 (12)

 (13)

 (14)

Why does the expand command cause the lhs to be zero?

### My second problem in optimization...

March 02 2015
0 4

I want to know with what x,y, z,  function f is minimum, whereas function g is constant.

regards

### My problem in optimization...

March 02 2015
1 6

Hi

I want to know with what x/y, z,  function f is minimum, whereas function g is constant.

regards

### Solve a symbolic inequality...

March 02 2015
1 5

Hello every one,

Is any one knows how to solve the following inequality with assumptions that all parameters are real positive and k<1 and delta > c*alpha

(1/2)*((alpha*k^2-3*alpha*k-2*beta)*sqrt(delta^2*(k-1)*(k-2)*(c*alpha-delta)^2)-k*delta*(alpha*k^2-3*alpha*k+2*alpha-2*beta)*(c*alpha-delta))/(delta^2*(alpha*k^2-3*alpha*k-2*beta))<0

I tried the following code but it  dosn't make sense:

u:=(1/2)*((alpha*k^2-3*alpha*k-2*beta)*sqrt(delta^2*(k-1)*(k-2)*(c*alpha-delta)^2)-k*delta*(alpha*k^2-3*alpha*k+2*alpha-2*beta)*(c*alpha-delta))/(delta^2*(alpha*k^2-3*alpha*k-2*beta))

solve({u < 0,alpha > 0, beta > 0, c > 0, delta > 0, delta > c*alpha, k > 0, k < 1, })

In fact I want to know under which circumastances the above inequality is negative.

THX

March 02 2015
0 2

### how to know which maple.ini was loaded when starti...

March 02 2015
1 5

Is there a command in maple that shows which files were read during start up? I am confused as to which maple init file is being read on my PC.  From http://www.maplesoft.com/support/help/Maple/view.aspx?path=worksheet/reference/initialization

it says

"Under Windows, the initialization file is called maple.ini.
If <Maple>\lib\maple.ini exists, it is loaded first (where <Maple> is your Maple installation directory). With a  network installation of Maple, the commands in this initialization file will be executed by all users on the network.
To execute a user's personal set of commands, only the first initialization file in one of the following paths will be loaded.
1) The binary directory of your current working directory (for example, "c:\Program_Files\Maple\bin.win\maple.ini")
2) The <Maple>\Users directory (for example, "c:\Program_Files\Maple\Users\maple.ini")
3) The user's personal profile directory (multiuser only) (for example, "c:\Documents_and_Settings\userid\maple.ini")

Maple reads and executes the network initialization file before the personal initialization file."

How do I find out, from inside Maple, which file(s) were read? Or make maple shows a trace of the loading process to see what files ini files it is reading?

Maple 18.2 on windows. btw, the above help page seems old. I am on windows 7, and I do not have "c:\Program_Files\Maple\" folder. And do not have "c:\Documents_and_Settings" folder. So the above help is not very useful. May be it was written during windows 95 times?

### how to make Maple display a large 4 by 4 matrix wi...

March 02 2015
1 0

Maple 18.02 on windows. A 4 by 4 matrix, does not display on the screen in nice formating when it has too many elements to fit current screen. But I'd like it to be displayed in 2D just like all the other 4 by 4 matrices and then use the horizontal scroll bar if needed to see the full matrix. Is this possible?

------------------------------------

restart;
z:=theta__1:
T01:=Matrix([
[cos(z),   0,   sin(z),   L*cos(z)],
[-sin(z),  0,  -cos(z),   L*sin(z)],
[0,         1,  0,          0],
[0,         0,  0,          1]]):

z:=theta__2:
T12:=Matrix([
[cos(z),    0,   -sin(z),   L*cos(z)],
[sin(z),    0,    cos(z),   L*sin(z)],
[0,         1,  0,          0],
[0,         0,  0,          1]]):

z:=theta__3:
T23:=Matrix([
[cos(z),    0,   -sin(z),   L*cos(z)],
[sin(z),    0,    cos(z),   L*sin(z)],
[0,         -1,  0,          0],
[0,         0,  0,          1]]):

T02   := T01.T12;
T03   := T02.T23;
LinearAlgebra[Dimension](T03);
------------------------------------------------

T02 above displays in 2D fine. But T03 does not on standard 100% zoom on my monitor. Screen shot:

When I changed the zoom to 50%, now it did format ok on the screen:

May be I need a way to activate the horizontal screel bar? I really do not want to keep changing zoom each time I want to see a larger matrix. All the matrices are 4 by 4, but some of them can end up with many terms in each entry.

### Set the variable of equation to be a Boolean compo...

March 02 2015
0 5

Hi all,

I have some "boolean variable" constraint equation like this:

a1*x1+a2*x2+...+an*xn>=b1*y1+b2*y2+...+bn*yn

where a1,a2,...,an and b1, b2, ..., bn are 1 or -1

These equations will be used in LPSolve or the other command to find a group of parameters which can fit them.

Now I used for-loop to deal with this kind of question, for example:

But there are more than 10 boolean variables in my case and It's very inefficient. On the other hand, using for-loop to determine the equation we solve in the command will lead to great confusion.

I think there should be some ways able to solve this kind of "boolean variables" question in Maple, such as, through assume command to define the type of "boolean variable".

But I have no idea how to do it.

### nested if statements...

March 01 2015
0 5

I have the following construct:
for i from 1 to 10 do
cubeprod:=i^3;
if irem(cubeprod,3)=0  and if(modp(cubeprod,2)<>0 then
cubesum(cubeprod);// I need both if statements to be true in order to invoke cubesum(). I've noticed that using an and between both if statements is incorrect but :

for i from 1 to 10 do
cubeprod:=i^3;
if irem(cubeprod,3)=0 then
if modp(cubeprod,2)<>0 then cubesum(cubeprod) fi;
end if;
end do;

gives me an error as well. What is the right syntax to achieve this?

### procedure whose input is an integer n and output i...

March 01 2015
0 1

I have the following procedure to do the above. It works but it returns [9,10],[10,9],[12,1] for n=1729(for example). How do I modify this to

a) to count 9,10 and 10,9 as the same and hence only show one of them

b) get 1,12 to show as a solution?

cubesum:=proc(n::nonnegint)
global listcub:=table();
local k:=0, x:=iroot(iquo(n,3),3),y:=x,x3:=x^3,y3:=y^3;
if 3*x3 <> n then x=x+1; x3:=x^3;y:=x;y3:=x3 end if;
while x3<=n do
y:=iroot(n-x3,3); y3:=y^3;
if(x3+y3 = n) then k:=k+1; listcub[k]:=[x,y]end if;
x:=x+1; x3:=x^3;
end do;
convert(listcub,list);
end proc:

### How do I assign an indexed variable λ to change fo...

March 01 2015
1 3

Hi
I have my question makes any sense. I am from Denmark and not used to write math in english.

I have an characteristic matrix with an variable λ that takes on differen values.

How do I write λ in the matrix so Maple knows that when I call out a row with the variable λ in it and asssign

λ to a specific value, Maple changes λ to the specific value.

Example (I was thinking something like this):

A:=Matrix(2,2,[(1-λ_i),2,3,(4-λ_i)])

λ_1:=2

λ_2:=4

A[1],λ_1               (1-2) 2

A[1],λ_2               (1-4) 2

A[2],λ_1               3 (4-2)

A[2],λ_2               3 (4-4)

### operational definition equations...

February 28 2015
2 13

Hi, I am an student and I am currently working on a system that sketches the relation of predator and prey of yellowstone's gray wolf and elk. I tried using the Lotka-Volterra model, but I wanted to add more parameters and add a carrying capacity for the system. Unfortunatley I cannot find a way to edit the Lotka model to my needs, and because I am new i do not know how to create my own model. This is the two equations I want to use: (D(x))(t) = alpha*x(t)-ax^2/k-b*x(t)*y(t)-gx(t), (D(y))(t) = -beta*y(t)+c*x(t)*y(t)-gy(t)

were k is carrying capacity.

Basically what I am asking is that if someone can help make the system workable on Maple and some steps of how to do it.

### Trouble getting Maple 18 interval arithmetic to do...

February 28 2015
1 0

What I tried is at

http://apfp.sourceforge.net/maple_interval_arith.pdf

I would like to be able to do comparisons of intervals.

At least take min or max - I thought I saw that on help pages but didn't get it to work.

Would also like to use with complex numbers - tried evalrC - but did not do what I expected.

### How to export a plot to PDF properly?...

February 28 2015
3 14

Is there a way to tell Maple to export a figure to PDF with a proper bounding box, like all of its other graphics export formats?

To export a graphics produced by Maple's plot(), I right-click on the plot, select Export, and then one of the several choices of graphics formats.  All options, other than the PDF, work fine—they produce graphics files whose bounding boxes correspond to the extents of the image.  Exporting to PDF misbehaves—it produces the equivalent of a 8.5''x11'' paper and inserts the graphics somewhere near the upper left corner.  I am absolutely at a loss to see the utility of that.  What in the world is the use of such an export?

Is there a configuration setting that tells Maple to save to PDF with a proper bounding box?  I looked around but couldn't find one.

 1 2 3 4 5 6 7 Last Page 2 of 1123
﻿