MaplePrimes Questions

Hi

I will write a code that to take one matrix (for example A) and produce B matrix, how write this code in Maple? the A matrix is optional.

A:=Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]);

B := Matrix([[10, 11, 12], [7, 8, 9], [4, 5, 6], [1, 2, 3]]);

Tnx...


I am unable to replicate solution of problem 169 below.  Can you help me debug?

Melvin Brown

Schrdiff(o(t), t, t)dinger PDE on (x,y,t) with initial and boundary conditions. Zero potential: problem number 169

 

Here is the problem 169 specification and solution from the Nasser list:

restart

with(PDEtools); with(CodeTools)

x:='x';t:='t';y:='y';hbar:='hbar';

x

 

t

 

y

 

hbar

(1.1)

interface(showassumed=0);

1

(1.2)

pde:=I*diff(f(x,y,t),t)=-hbar^2*(diff(f(x,y,t),x$2)+diff(f(x,y,t),y$2))/(2*m);

I*(diff(f(x, y, t), t)) = -(1/2)*hbar^2*(diff(diff(f(x, y, t), x), x)+diff(diff(f(x, y, t), y), y))/m

(1.3)

ic:=f(x,y,0)=sqrt(2)*(sin(2*Pi*x)*sin(Pi*y)+sin(Pi*x)*sin(2*Pi*y));

f(x, y, 0) = 2^(1/2)*(sin(2*Pi*x)*sin(Pi*y)+sin(Pi*x)*sin(2*Pi*y))

(1.4)

bc:=f(0,y,t)=0,f(1,y,t)=0,f(x,1,t)=0,f(x,0,t)=0;

f(0, y, t) = 0, f(1, y, t) = 0, f(x, 1, t) = 0, f(x, 0, t) = 0

(1.5)

cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic,bc],f(x,y,t))),output='realtime'));

memory used=159.58MiB, alloc change=102.00MiB, cpu time=4.37s, real time=4.23s, gc time=452.40ms

 

4.233

(1.6)

with(plots); evalf(f(1, 2, 2))

f(1, 2, 2)

(1.7)

plot3d(f(x, y, 3), x = -1 .. 1, y = -1 .. 1)

Warning, expecting only range variables [x, y] in expression f(x,y,3) to be plotted but found name f

 

 

The problem seems to fail... Why?

``


 

Download TestCaseforMapleStaff.mw

Hi everyone. Thank you all in advance.

My question: is there a function for quotient and reminder for something like:

(22*Pi/3, Pi/2)

I tried frem, rem, quo. Neither of them worked.

I'm creating some graphs in another program that I want to then insert into the document side by side. However, since the plots are not created in Maple I'm not sure if I have the ability to position them side by side with the embed command. Any workarounds (other than creating the plots in maple)?

I am trying to derive Heisenberg's equation of motion for an observable given by two Fermionic operators. The Hamiltonian has both Fermionic and Bosonic creation and annihilation operators.  

H := sum(g[`qαβ`]*C[alpha]*v[beta]*b[q]-g[`qαβ`]*B[q]*V[beta]*c[alpha], `qαβ`)

When I take the commutator with 

A := C[nu]*c[nu]

and try to simplify down it will only go so far. I know the final answer and have checked what it gives by hand, but it will not sum over the different indexes. 

animate(plot, [fourier(f(x,t),x,w)/t,w=0..100], t=0.1..1, frames=100):

 

works fine, but use a scaling function for time(to get it to play nice) such as

 

animate(plot, [fourier(f(x,2^t),x,w)/2^t,w=0..100], t=0.1..1, frames=100):

 

and maple refuses to work well. It takes about 100 times longer if it plots at all. 2^t is just a scaling factor on f, it doesn't add any real algebraic complexity.

 

 

 

 

I'm doing a simple system of equations problem and for some reason fsolve doesn't give any answer. I know the system has a unique solution, it's actually pretty trivial to solve. This is what I have written:

 

sys = {1800*40+15*(300*30)-30*Biy = 0, -1800+Biy+Ciy-300*30 = 0};
      sys = {207000 - 30 Biy = 0, -10800 + Biy + Ciy = 0}
                       fsolve(sys, {Biy})

If I rewrite to manually solve one by one, like this:

fsolve(1800*40+15*(300*30)-30*Biy = 0);
                             6900.
fsolve((-1800)+6900+Ciy-300*30 = 0);
                             3900.


So obviously it can be solved. I want to know why it doesn't solve when put in the first way. By the way I know this is a really simple system, and obviously there is a way to work around this problem and get an answer. I'm asking because I want to understand better how solve works, and so I can avoid more difficult issues later.

I'm trying to plot the fourier transform of a function(a sigmoid) and maple refuses to plot it. It seems to try to compute it symbolically then craps out because it can't reduce it to a computable form. Of course trying to do some type of numerical evaluation is impossible because it substitutes the numerical value for the transform variable.

S := x->erf(x):

plot(abs(fourier(S(x),x,w)),w=0..100):

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

 

Just want to plot the transform, I do not understand why it is do difficult for maple to do numerically. It should fall back on a numerical routine instead of crapping out.

 

 

 

How does one sync two or more different animations? Ideally it would be something like display(..., synchronize=true)

Hi, I am trying to solve a recurrence with rsolve:

rsolve({f(1) = 1, f(n) = n + sum(f(i), i=1..n-1)}, f)

Unfontunately, maple just prints the same function without evaluation:

rsolve({f(1) = 1, f(n) = n + sum(f(i), i=1..n-1)}, f)

How to get the expected result 2^n - 1 from maple?

when evalhf is used it shows error. please help

 

evalhf.mw

Hello everyone, Greetings!

I am facing a really strange problem. I need to write an expression, however, maple out of nowhere assigns values to the variable used. only to those which are written inside sin (). In previous versions the out put is fine. Is there a new way to write expressions in maple 2019? I am not sure.


 

restart

96*sin(2*beta*y)*cos(2*beta*y)*beta^4 + 96*sin(2*beta*y)*beta^4

(0.525982730176588e-113+0.525982730176588e-113*I)*beta^4

(1)

``


 

Download strngmpl.mw

 

I get the following when MAPLE starts...

Warning, .hdb help databases are deprecated, 'C:\Program Files\Maple 2018\lib\OrthogonalExpansions.hdb' will not be used, see ?HelpTools,Migrate help page for more information

I have recently loaded an orthogonal expansions package created for earlier versions of MAPLE.

How can I remove the message?

MRB
 

Hello,

How I can take Laplace inverse?

Thank you

LAPLACE

Maple Worksheet - Error

Failed to load the worksheet //convert/LAPLACE
 

Download LAPLACE

 

Hi, im working on integration methods and i would like to make a routine that put to left side from a equation only the terms that have 'j+1'. So for example, we have the heat-conduction equation and we want to develope a approximated solution by an implicit method, so:

at this point i have tryed different ways in order to select only the terms that T [any,j+1], because we want T[i,j+1],T[i+1,j+1] and T[i-1,j+1] to the lhs of the equation and the rest to the rhs

I would like to make Maple read only the second index as a criteria to select or not. 

Someone have any idea on how to make maple deal with it?

First 694 695 696 697 698 699 700 Last Page 696 of 2431