MaplePrimes Questions

Greetings folks,

 

I need to perform Gauss Jordan Elimination on a 7x10 Matrix, returning the row reduced echolon form. The matrix entries itself are sums of several variable products, where the variables itself are sometimes exponential. The link provides an excerpt of said matrix for illustration.

https://www.dropbox.com/s/p9lyg8tmk0hpbbj/polyGLS7rows.png

I tried solving this with MatLab Mupad, but to no avail, at some point the calculation runs out of memory. Simplification of the expressions didn't help either.

Tried the same with Maple. It doesn't run out of memory but looses connection with the kernel at some point.

I'd be glad about some suggestion about how to solve this problem. Basically I want to reproduce the process of the following paper: http://www.inf.ethz.ch/personal/pomarc/pubs/FraundorferECCV10.pdf

The paper itself cites using the Gröbner basis package of Maple for reaching a solution so maybe I am missing something out.

Any help is greatly appreciated

Regards,

JCR

 

Edit: Exponential functions reside in the lower part of the matrix. Path to Maple Worksheet https://www.dropbox.com/s/xb99xlddba57cs7/GLSPoly7rows.mw

Hi,
can you please help me solve that?
I want to write maple procedure that checks if a number is prime or not and I need to do it so that it doesn`t take forever to give an answer.
I wrote a procedure that works good with small numbers but when I put bigger numbers eg.9999971 it is taking far too long (5min) to get the answer, I tried to modify it and I think I find out something that could be modified to make it more efficient, like for example in the line:   for j from 2 to n-1 do     (I changed it to: ) for j from 2 to n-1  by n do    - it tooks 9.953 second to get the answer   (or I changed it to: ) for j from 2 to (n-1)/2  do   - it tooks 262.062 second I also tried many things and I always get an answer after long time excepte when I changed the line to for j from 2 to (n-1)/n  do   - it tooks 0 second but I didn't find any explanation why should I devide it by n as j from 2 to ((n-1)/n) = 1-(1/n) which is less than 2 as it make no sence....
But it still not efficient enough, because if for example I use the maple command isprime,then I got the result in less than 1 second.
In the program I used other procedure that I think will make it quicker which is a floor function procedure. please see bellow :  

> flr:=proc(a,b)

      local n:

      n:=0:

      while a>=b*(n+1) do

         n:=n+1:

     od:

       n;

   end:

 


> Isprime:=proc(n)        

         local j, p:      

         p:=true:               

         if n=2 then

            p:=true;       

        else

             for j from 2 to n-1 do 

                  if (n/j-flr(n,j))=0 then

                       p:=false:

                  fi:

              od:

         fi:

     p:

     end:

 

>zeit:=time():

Isprime(9999971); 

time()-zeit,`second`;

                                                                   true

                                                                    309.558, second

 

Please reply and thank you in advance

Maple crashed while saving and now there is nothing in my file. Lost a bunch of work, any way to fix it?

Thanks
EquationSheet357.mw

(x+y)(x2+y2) = 5500

(x-y)(x2-y2) = 352

Dear all;

Please Have some one an idea to transform or convert 2nd order ODE to system of First ODE ( of course using maple).

Thanks

 

Hi,

I wrote the following code which is properly run

 


restart:

# parametrs

MUR:=(1-phi)^2.5:
RhoUR:=(1-phi+phi*rho[p]/rho[f]):
RhoCPR:=(1-phi+phi*rhocp[p]/rhocp[f]):
BetaUR:=(phi*rho[p]*beta[p]+(1-phi)*rho[f]*beta[f])/(RhoUR*rho[f])/beta[f]:

dqu3:=diff(h(x),x$1)-RhoUR*BetaUR*T(x);
dqu2:=5*diff(T(x),x$2)+k[f]/k[nf]*Pr*RhoCPR*f(x)*diff(T(x),x$1);
dqu1:=5/(MUR)*diff(f(x),x$3)
+ 2*(diff(h(x),x$1)*x-h(x))
+RhoUR*(3*f(x)*diff(f(x),x$2)-diff(f(x),x$1)^2);
rho[f]:=998.2: cp[f]:=4182: k[f]:=0.597:   beta[f]:= 2.066/10000:
rho[p]:=3380: cp[p]:=773: k[p]:=36:   beta[p]:= 8.4/1000000:

k[nf]:=((k[p]+2*k[f])-2*phi*(k[f]-k[p]))/((k[p]+2*k[f])+phi*(k[f]-k[p])):
rhocp[nf]:=rho[p]*cp[p]*phi+rho[f]*cp[f]*(1-phi):
rhocp[p]:=rho[p]*cp[p]:
rhocp[f]:=rho[f]*cp[f]:

phi:=0.00:
binfinitive:=6: Pr:=7: lambda:=0:


with(plots):
pppe:=dsolve( {dqu1=0,dqu2=0,dqu3=0,T(0)=1,T(binfinitive)=0,f(0)=0,D(f)(0)=lambda,D(f)(binfinitive)=0,h(binfinitive)=0}, numeric );
-pppe(0);
print(odeplot(pppe,[x,diff(f(x),x)],0..binfinitive,color=black,numpoints=400));
print(odeplot(pppe,[[x,diff(f(x),x)]],0..binfinitive,color=black,numpoints=400));
print(odeplot(pppe,[[x,T(x)]],0..binfinitive,color=black,numpoints=400));


However, in some range of parameters, I must increase the value of binfinitive (for example binfinitive=50). however, my code is doesnt converge for higher values of 10 (at most). Can anyone change this algorithm in a way that it insensitive to the value of binfinitive?

Many thanks for your attention in advance

 

Amir

Could someone show me how to solve the following equations for real x, y and z.

Thanks

x^2 + 2yz^2 = 0,

y^2  - 3xz = 0, 

1/3*x*y^2 + 2*y*z^3 = 0,

-1/3*y^4 - 6yz^4 = 0.

 

hi,i want to take differential with respect to another differential using physics package,but using D instead of diff,could anyone help me do that ? for example :

restart; with(Physics):
A1 := -(1/24)*1*rho*((diff(phi[1](x, t), t))^2)*(h^3)-(1/2)*1*rho*((diff(u[ref](x, t), t))^2)*h-(1/2)*rho*((diff(w(x, t), t))^2)*h+(1/24)*1*1*((diff(phi[1](x, t), x))^2)*(h^3)+(1/2)*1*(1*((diff(u[ref](x, t), x)+(1/2)*(diff(w(x, t), x))^2)^2)+K*1*((diff(w(x, t), x)+phi[1](x, t))^2))*h-1*q*w(x, t):

A2:=-diff(diff(A1,diff(u[ref](x,t),x)),x);

here i want to compute A2 using D command,not diff and i do not want use convert command ! i just need to calculate A2 directly using D command. tnx for your help.

 

Using worksheet mode. It is a strugle to add a new paragraph on its own group so I can document some code.

I open new worksheet, and type a Maple command. say

x:=10; and hit return.

Now the screen looks like

------
|>x:=10;
|                        x:=10
----
|>     curser is here now    (1)

Now I want to make new paragraph, on its own group, before I type new command. (I need it on its own group, to fix another Maple latex export issue) i..e I want it to look like

------
|>x:=10;
|                        x:=10
----
|   this is pargraph I wanted to create
-----
|>     curser is here now    (2)

However, this is not possible using one command.  when in (1) above, if I tell Maple to insert paragraph->Before cursor, it does this:

------
|>x:=10;
|                        x:=10
----
|  it created a paragraph- here, but this is still in the same group as (1) below
|>     curser is here now    (1)

Only way I found to do it is this: create an execution group before the cursor. Then go back to that execution group. Then do insert paragraph->Before cursor, then delete the execution group just created, leaving the paragraph on its own group:

Step 1

------
|>x:=10;
|                        x:=10
----
|> create this as execution group
----
|>

Step 2

------
|>x:=10;
|                        x:=10
----
|   create paragraph here
|>
----
|>

step 3, delete the execution group, leaving the paragraph

------
|>x:=10;
|                        x:=10
----
|   leaving paragraph on its own here
----
|>

there got to be a simpler way? I am using Maple 18 on windows 7. (64 bit)

 

Maple 18, windows 7.

When I export this to Latex

x:=1/y;

The latex comes out as x:=y^-1 instead of using 1/y as it displays. I prefer 1/y and not  y^-1

i.e. instead of generating {y}^{-1} it should use \frac{1}{y}, just as it appears on the screen. Is there a configurration option one can use for this?

I also like to know if one can insert latex markup directly in Maple text paragraphs?

For example, if I add a text paragraph, (Menu->Insert->Paragraph) and would like to type some math in there, I can't just write $\sin(x)$ as this will not render as math when exported to Latex, as it is in a Maple normal group in the Latex file. 

Is there another way to typeset math in text area of a document? I only use worksheet mode. Not interested in using document mode.

thank you

 

 

   

AOA... I want to convert system of equations into matirx form.

F[0] := u[0, n]-u[0, n-1]+u[1, n]-u[1, n-1]+u[2, n]-u[2, n-1]+u[3, n]-u[3, n-1]

F[1] := u[0, n]-u[0, n-1]-u[1, n]+u[1, n-1]+u[2, n]-u[2, n-1]-u[3, n]+u[3, n-1];

F[2] := u[0, n]/P-u[0, n-1]/P-.7071067810*u[1, n]/P+.7071067810*u[1, n-1]/P+.7071067810*u[3, n]/P-.7071067810*u[3, n-1]/P+0.4549512860e-1*exp(-1.*t)-.3431457508*u[2, n]+.3431457508*u[2, n-1]+1.556349186*u[3, n]-1.556349186*u[3, n-1] = 0;

F[3] := u[0, n]/P-u[0, n-1]/P-.7071067810*u[1, n]/P+.7071067810*u[1, n-1]/P+.7071067810*u[3, n]/P-.7071067810*u[3, n-1]/P+0.4549512860e-1*exp(-1.*t)-.3431457508*u[2, n]+.3431457508*u[2, n-1]+1.556349186*u[3, n]-1.556349186*u[3, n-1] = 0;

I want to export the above system of equation in to matrices of as

AU[n]+BU[n-1]-C = O;

where*U[n] = Typesetting[delayDotProduct](Vector(4, {(1) = u[0, n], (2) = u[1, n], (3) = u[2, n], (4) = u[3, n]}), a, true)*n*d*U[n-1] and Typesetting[delayDotProduct](Vector(4, {(1) = u[0, n], (2) = u[1, n], (3) = u[2, n], (4) = u[3, n]}), a, true)*n*d*U[n-1] = (Vector(4, {(1) = u[0, n-1], (2) = u[1, n-1], (3) = u[2, n-1], (4) = u[3, n-1]})), Help me plz;

Help_Constrct.mw

how to transform

Matrix([[1,0,0],[1,0,0],[0,0,0]])

to

Matrix([[0,0,0],[0,0,1],[0,0,1]])

 

 

so we have to Write a maple function with -> that takes an integer N and a boolean function

F: {(i,j) l 0<= i,j<= N} -> {true,false} 


and returns a list containing all [i,j] such that F(i,j). A procedure that does this
would be


proc(N,F) local i, j, RV;
RV:=NULL;
for i from 1 to N do for j from 1 to N do
if F(i,j) then RV:=RV,[i,j] ; end if ;
end do ; end do ;
return RV ;
end proc ;


The problem is to do this inline, i.e. you have to write
(i,j)-> ...

 

please help...

int(sin(x)^cos(x),x= 0 .. Pi)

with Maple? A closed-form answer is also welcome.

Thank you for your help with this question. I found what I was looking for. 

First 1452 1453 1454 1455 1456 1457 1458 Last Page 1454 of 2426