MaplePrimes Questions

Search Questions:

Latest Questions Latest Questions Feed

Hi again,

 

I am lost... again. I worked with the Physics package and have obtained my result in form of a lengthy equation of commutators of non-commuting objects. So basically my problem is solved, except that I now want to compute some examples to see, if everything is correct. For that purpose I want to replace now the non-commuting objects with explicit matrices, compute the result and see if it agrees with numerical studies. However, I have no clue which command to use, because if I try it with subs, then the multiplication is of the wrong type and Maple won't multiply my matrices. I tried to use eval but wasn't successful.

Here is an exampe to see what I mean.

Test2.mw

 

Thank you for your time

 

NOh

The following MWE shows what I mean:

with(Physics):Setup(mathematical=true):

Setup(noncommutativeprefix={MX,MY,MZ});

test:=proc()

    local eq;

    eq:=-Commutator(MX,MY)-Commutator(MZ,MY);

    eq:=simplify(subs(MX=-MZ,eq));

    return eq;

end proc:

 

test();  # yields -[-MZ,MY] - [MZ,MY]

 

%  # yields 0

 

 

Any ideas how I can solve this? I would like to return the simplified version.

how to convert legendre polynomials into system of polynomials of 3 variables for drawing sphere with this ideal?

is possible to draw sphere from system of monomial polynomials?

Hello,

I wanted to get the following function integrated with Maple 17:

I used the following command to get a numerical solution for my choise of limits:

Unfortunately, I just get the Integral itself back. Also, taking pi/2 as the upper limit for x does improve anything. I also tried the AllSolutions option but it does not help as well as first trying to integrate only over y and leaving x as it is in order to get at least one integration done.

I hope someone can help. I do not necessarily need to solve it for myself, so if someone gets the result and posts it here, I'm okay with that. Anyway, being able to calculate it myself would be even better.

GAMMA and gamma...

October 17 2014 Aakanksha 15

Hello everyone.

need to know what is the difference between use of GAMMA and gamma in maple.

thanks.

Hi

I call the MeijerG function in the matlab: MeijerG([[-.3], []], [[.8, 1.3, -.8, -.3, -1.3], []], 1.), and it return an error as follows:

Error, (in evalf/MeijerG) the function is not defined: corresponding GAMMA poles must not coincide.

But when I change the first parameter from -0.3 to -1.3, I can get the result.

So, can you help to explain it? how can I fixed it?

 

I need to make two graphs.  1st take the equation y= ln3x+3 and graph it and it's derivative.  Then find the equation of the tangent line and the normal line to the given function at x=e   Then I need to create a single graph containing the function, the tangent line, and it's normal line.  Any pointers or help would be greatly appreciated.  I can graph the equation and it's derivative ok but I don't know how to make a graph with multiple stuff on it.  Thanks

Hi there,

I was trying to simulate the behaviour of a one-variable, discrete-time function having three parameters.

The function reads

M[n+1]=(b·theta^(m)·R[n])/(theta^(m)+R[n]^m)

defined for b, theta, m > 0

Say I want to simulate the function for the following values

b := [seq(1 .. 10, 1)];
theta := [seq(1 .. 5, 1)];
m := [seq(1 .. 2, 1)];

for n from 1 to 10.

 

I guess I need to build a 4-dimension array. But I was not able to find the right way to do this: should I use the Array strucutre? and if yes, how would I do it? As far as I've read, indexing would be an issue: should I create special indexing functions?

If I'm not wrong Maple matrices (Matrix) are just 2D.

 

Once the values of M computed, I would like to generate the corresponding plots, varying one parameter while the other two are fixed, and drawing the different M's in the same plot.

How can I achieve this?

Furthermore, if I would like to generate all possible combinations, I guess I would need to insert the solution given to the above question within a for loop. Will Maple display all plots or will it overlap/overwrite the preceding plot if used within a loop?

 

Thanks,

jon

Hi,

I have coded up a vector that is of my interest. The code runs witout any problem and gives me exactly what I want.

newtest.mw

All I want to know, is that if there are more efficient way to do so?

Any tricks, or better use of a particular function that I wasn't aware?

The only tiny bit of unsatisfactory is that, the (1-w) term is at the first term of the addition, is that possible to move it to the last term? Which is more conventional to read.

 

Thanks,

 

casper

Hi guys

 

I have an if statement inside a function. This function then get's called in a sum. However, the result is not correct as the if statement checks wether the argument equals 0, but since the sum passes only the summation index name, it doesn't work as intended.

How can I tell Maple, that it has to evaluate the index before passing it on? MWE appended.

 

Cheers

NOh

Comm := proc (n) options operator, arrow; `if`(n = 0, 1, 0) end proc;

proc (n) options operator, arrow; `if`(n = 0, 1, 0) end proc

(1)

Comm(0);

1

(2)

sum(Comm(j), j = 0 .. 0);

0

(3)

``

 

Download MWE.mwMWE.mw

In Maple, I want to define a set of functions by means of two for loops:

    printlevel:=2;

    # Node coordinates.
    N_x:=5;
    N_y:=4;
    N_elx:=N_x-1;
    N_ely:=N_y-1;
    h_x:=(x_e-x_s)/N_elx;
    h_y:=(y_e-y_s)/N_ely;
    x_n:=[seq(x_s+j*h_x,j=0..N_elx)];
    y_n:=[seq(y_s+j*h_y,j=0..N_ely)];

    # Partition of unity.
    for j from 2 by 1 to N_x-1 do
        for k from 2 by 1 to N_y-1 do
            phi[j,k]:=(x,y)->(x-x_n[j-1])*(x-x_n[j+1])*(y-y_n[k-1])*(y-y_n[k+1])/((x_n[j]-x_n[j-1])*(x_n[j]-x_n[j+1])*(y_n[k]-y_n[k-1])*(y_n[k]-y_n[k+1]));
        od;
    od;

However, this gives output in which the `[j,k]` vary but the `x_n[j-1]`, `x_n[j+1]`, `y_n[j-1]` and `y_n[j+1]` are not evaluated. But if I for instance input `x_n[3]` I correctly get 1/2 as answer.

How do I solve this?

I got a problem in using dsolve.
In my real question, some functions are quite complicated.
so here is a simple example.
F1:=x(t)^2;F2:=piecewise(t>=0,y(t)^3,t>=0.1,exp(y(t)));
eq1:=diff(x(t),t$2)=F1;eq2:=diff(y(t),t$2)=subs(x=y,F1)-F2;
ic1:=x(0)=1.2,D(x)(0)=0;ic2:=y(0)=MM(tf),D(y)(0)=NN(tf);
#tf is the point where x(tf)=30.
dsolve({eq1,eq2,ic1,ic2,x(tf)=30},numeric);

above command can't give an answer.

how to use dsolve solve this problem?

any ideas is appreciated.

Hi all

Can anybody suggest an algorithm allowing to detect, that two matrices of the same size can be obtained each from other by permutations of rows and columns? Maybe, such an algorithm there exists in LinearAlgebra package?

Hello Dears

I have this equation

                                          (Napla)^4 * F(x,y) + k^2 *  (Napla)^2 * F(x,y)= 0,      (1)

which may be written as a non-homgeneous Helmholtz equation as

                                          (Napla)^2 * F(x,y) + k^2 * F(x,y)= g(x,y),                (2)

where the function g(x,y) is a harmonic function and (Napla)^2 is the laplace's operator in two dimension.

Can Maple solve equation (1), it will be better. If not may be solve equation (2).

 

I have an integral that maple can not solve but I can solve it by hand. How can I add this to maple integration database?

f:=int(r^2*BesselJ(0,a*r)*BesselI(1,b*r),r)

Please see the file below.

Integral.mw

 

Many many thanks! :)

1 2 3 4 5 6 7 Last Page 2 of 1064