MaplePrimes Questions

I apologize because this is not a technical question but I believe that the question and issue that I have is probably of interest to a wide range of Maple users.   I am a retired biophysicist and have been using Maple as a tool in my research since Maple 5.  I recently became aware of the amazing Maple Physics Package.  It seems to offer an incredible advance.  I say “seems” because its notation and complexity is a bit overwhelming.  What I was hoping to find was a complete course (or courses) in physics that used this package.  I was hoping that with such a course I could go through it in detail and could relearn physics and become proficient in using the package.  Unfortunately, after considerable search, I could not find such a course.  (There are some older brief tutorials that do not take advantage of the features in the new Physics package.)  I am sure that there must be some physics courses that are based around this Physics Package, certainly at the University of Waterloo or the Perimeter Institute.  I would like to suggest that these courses be made available online (with a fee if necessary).  If such courses were available I know that I would avidly use them as I am sure would many others.

Hi there,

            I am new to maple. I want to ask a simple question.

            If I have a array, and I want its each component to take natural logarithm. How can I do?

            Eg:[2 3 4]->[ln(2) ln(3) ln(4)]

            Thanks in advance.

Dirichlet

Simple test of GaussianElimination function

Why doesn't this work? 

Also can I just confirm that for GaussianElimination (according to the help this uses LUDecomposition function with the output=['U'] option) the input is the augmented matrix of the system, the coefficient matrix augmented with the RHS)

In a separate test I got an example working using this code, but I've never seen this syntax before for A Matrix (using << it seems?)

 

Thank you for your help.

 

 

ORIGINAL ATTEMPT

with(LinearAlgebra):

A := matrix(3, 3, [-3, 2, 1, 1, -2, 1, 1, 2, -3]);

Matrix(3, 3, {(1, 1) = -3, (1, 2) = 2, (1, 3) = 1, (2, 1) = 1, (2, 2) = -2, (2, 3) = 1, (3, 1) = 1, (3, 2) = 2, (3, 3) = -3})

(1)

GaussianElimination(A)

Error, (in LinearAlgebra:-GaussianElimination) invalid input: LinearAlgebra:-GaussianElimination expects its 1st argument, A, to be of type Matrix() but received A

 

``

 

Download gauss_elimination_2.mw

I wonder why the thole procedure becomes ... when converting from 1-D math to 2-D math.

It's funny how Maple automatically evaluates an expression, it can be frustrating at times, but suppose the user wants it entered the way he types.

a:=sin(-4-Phi)

                   - sin ( 4 + Phi)  #automatically evaluates the negative outside

b:=sin(x+y+z-Phi)

                   - sin (-x -y -z + Phi)

 

Even though both expressions are the same it seems Maple prefers -sin to +sin, in the second example above Maple has now 3 extra negatives. 

Is all we need just a double set of single quotes around our expression so that when we recall that variable it returns exactly how we entered it in?

b:= ''sin(x+y+z-Phi)''

           b:= ' sin(x+y+z-Phi) '

 

b;

      sin( x + y + z - Phi)

 

Would that work?  Where would that fail?  Is there a better way?

hi...please help me for solve this nonlinear equations with pdsolve

thanksoffcenter2.mw

La := .25; Lb := 0.1e-1

h := 0.4e-2

rho := 7900

E := 0.200e12

nu := .3

ve := 5

g := 9.8

M := .5

Z0 := 0.1e-2

K := 5/6

C := sqrt(E/rho)

NULL

 

PDE[1] := diff(u(x, t), x, x)+(diff(w(x, t), x))*(diff(w(x, t), x, x)) = (diff(u(x, t), t, t))/C^2

diff(diff(u(x, t), x), x)+(diff(w(x, t), x))*(diff(diff(w(x, t), x), x)) = 0.3949999999e-7*(diff(diff(u(x, t), t), t))

(1)

PDE[2] := K*(diff(phi(x, t), x)+diff(w(x, t), x, x))/(2*(1+nu))+(diff(w(x, t), x))*(diff(u(x, t), x, x))+(diff(u(x, t), x))*(diff(w(x, t), x, x))+(3/2)*(diff(w(x, t), x, x))*(diff(w(x, t), x))^2 = (diff(w(x, t), t, t))/C^2

.3205128205*(diff(phi(x, t), x))+.3205128205*(diff(diff(w(x, t), x), x))+(diff(w(x, t), x))*(diff(diff(u(x, t), x), x))+(diff(u(x, t), x))*(diff(diff(w(x, t), x), x))+(3/2)*(diff(diff(w(x, t), x), x))*(diff(w(x, t), x))^2 = 0.3949999999e-7*(diff(diff(w(x, t), t), t))

(2)

 

PDE[3] := diff(phi(x, t), x, x)-6*K*(diff(w(x, t), x)+phi(x, t))/(h^2*(1+nu)) = (diff(phi(x, t), t, t))/C^2

diff(diff(phi(x, t), x), x)-240384.6154*(diff(w(x, t), x))-240384.6154*phi(x, t) = 0.3949999999e-7*(diff(diff(phi(x, t), t), t))

(3)

 

 

#####################################

(4)

at x= La

PDE[a1] := diff(u(x, t), x)+(1/2)*(diff(w(x, t), x))^2-M*(g-(diff(u(x, t), t, t))-Z0*(diff(phi(x, t), t, t)))/(E*Lb*h) = 0

diff(u(x, t), x)+(1/2)*(diff(w(x, t), x))^2-0.6125000000e-6+0.6250000000e-7*(diff(diff(u(x, t), t), t))+0.6250000000e-10*(diff(diff(phi(x, t), t), t)) = 0

(5)

PDE[a2] := diff(phi(x, t), x)-12*M*Z0*(g-(diff(u(x, t), t, t))-Z0*(diff(phi(x, t), t, t)))/(E*Lb*h^3) = 0

diff(phi(x, t), x)-0.4593750000e-3+0.4687500000e-4*(diff(diff(u(x, t), t), t))+0.4687500000e-7*(diff(diff(phi(x, t), t), t)) = 0

(6)

PDE[a3] := w(x, t) = 0

w(x, t) = 0

(7)

NULL

############################################

``

at x=0 NULL

(8)

PDE[b1] := u(x, t) = 0 

PDE[b2] := w(x, t) = 0

PDE[b3] := diff(phi(x, t), x) = 0

diff(phi(x, t), x) = 0

(9)

################################################

at t=0 for x= [0,La]

u(x, t) = 0

u(x, t) = 0

(10)

w(x, t) = 0

w(x, t) = 0

(11)

phi(x, t) = 0

phi(x, t) = 0

(12)

diff(phi(x, t), t) = 0

diff(phi(x, t), t) = 0

(13)

diff(w(x, t), t) = 0

diff(w(x, t), t) = 0

(14)

diff(phi(x, t), t, t) = 0

diff(diff(phi(x, t), t), t) = 0

(15)

diff(w(x, t), t, t) = 0

diff(diff(w(x, t), t), t) = 0

(16)

######################################################

at t=0 for x= [0,La)

diff(u(x, t), t) = 0

diff(u(x, t), t) = 0

(17)

diff(u(x, t), t, t) = 0

diff(diff(u(x, t), t), t) = 0

(18)

###################################################

at t=0 for x=La

NULL

diff(u(x, t), t) = -ve

diff(u(x, t), t) = -5

(19)

diff(u(x, t), t, t) = g

diff(diff(u(x, t), t), t) = 9.8

(20)

NULL

NULL

 

Download offcenter2.mw

Hello all,

Thanks for having a look at my issue. I need to plot the solution to this particular equation called eq1 in my worksheet. The plot needs to be w against q. Any help is greatly appreciated! Thank you in advance!

Gambia ManTheoretical_Analysis_Attempt.mw

Can some one help me for converting three or two coupled pdes to odes using Lie group or any other method in maple

 

 

                                                                      

                                                                   

                                                                     

                                                                        

                                                                      

 

Hi everybody,

This is a notional example.
I create a variable MyColor of type string, which contains some correct specification of a known color.
Two examples are
    MyColor := "CSS Red";            
    MyColor := "Resene LaRioja":

In the ColorTools package there exist a few couples of (a priori) reciprocal functions, for instance NameToRGB24 and RGB24ToName.
So I can expect that composing one of this function with its reciprocal is a neutral operation.

But, if I apply first  NameToRGB24 to a well formed MyColor color and next thits reciprocal RGB24ToName , I do not recover MyColor ... or at least not all the time


Example 1 : 
with(ColorTools):
MyColor := "CSS Red";    
RGB24ToName ( NameToRGB24 (MyColor) ); 
     "Red"

Let us observe the loss of the palette name ...


Example 2 : 
MyColor := "Resene LaRioja";    
NameToRGB24 (MyColor) ); 
      [179, 193, 16]
RGB24ToName ( % ); 
     error, (in ColorTools) unknown RGB color [179, 193, 16]


It seems that RGB24ToName ( NameToRGB24 (MyColor) ); works correctly only if MyColor refers to a color from palette CSS. This seems consisttent with the loss of the palette name in example 1 and the presence of the word RGB (and not RGB24) in this error message.
More generally, for colors from other palettes than CSS the same kind of error is returned (I did not do intensive testing ...)

Is this an error,
   or some limitation I missed,
      or an improper use of RGB24ToName ?

I look forward to your response

 

 

 

Hi,

It might be a silly question but here it goes. I have a sin function in terms of sin(omega*(T0-T)+Phi) and i need to expand it by keeping omega*T0+phi as a single term. One way is by subs omega*T0+phi as a constant 'c' and then after expanding we can back substitute. But is there any option in expand function itself?

 

Regards

Sunit

Hi,

I have encountered some strange issue with symbolic summation. Would be grateful for any help.

Here is the code (inserted as image):

Symbolic summation of powers of sines & cosines

 

Code in text:

restart;
F:=(n,a,b)->sum(r^(a+b)*cos(2*Pi/n*j+t)^a*sin(2*Pi/n*j+t)^b,j=0..n-1);

F(n,2,2);
F(4,2,2); 

The issue is that symbolic summation produces the formula (for general n) which contradicts the particular case (n=4).

Could somebody explain why this is happening? Is it a bug or am I missing something here?

I have tried all versions of Maple downto 14 - same situation.
Also Mathematica givers the same answer.

Thank you in advance,
Pavel Holoborodko.

--
Multiprecision Computing Toolbox
http://www.advanpix.com/

Couple of questions actually,

writebytes("c:/testfile.txt","hello") in Maple 2016 doesn't create a file to write the bytes to unless the file already exists.  In Maple 12 if the file didn't already exist Maple would create it.  Is this a programming change for writebytes?

After writing to the file, if you open the file with notepad (or any text editor) there is nothing in that file.  It is only once you write in maple ..

     filepos("c:/testfile.txt",0)

.. that you can then see something in the edited file with an external editor. 

This is probably connected but how do get Maple to relinquish command of the file I've used writebytes on?  The error message I get is "The process cannot access the file because it is being used by another process" I would guess once Maple releases command on that file all data written to it will be visible regardless of what filepos I'm at. 

 

How can I limit the number of processors that are used by a multi-threaded operation? The help pages ?multithreaded and ?kernelopts both suggest, vaguely, that this can be controlled with kernelopts(numcpus). The following worksheet shows, however, that this doesn't work: While Maple does remember what you set numcpus to, this setting has no effect on the number processors used by Threads. And, if this doesn't work, what purpose is there in being able to set the value of numcpus?

restart:

First, warm-up and stretch the memory. Otherwise, the timings are invalid.

L:= RandomTools:-Generate(list(integer, 2^18)):

CodeTools:-Usage(Threads:-Mul(x, x= L)):

memory used=1.21GiB, alloc change=0.98GiB, cpu time=18.66s, real time=3.75s, gc time=27.54m

Now this is the actual test.

L:= RandomTools:-Generate(list(integer, 2^18)):

gc();

for n to kernelopts(numcpus) do
     print(kernelopts(numcpus= n));
     CodeTools:-Usage(Threads:-Mul(x, x= L), iterations= 4)
end do:

8

memory used=1.21GiB, alloc change=322.34MiB, cpu time=4.04s, real time=933.75ms, gc time=566.41ms

1

memory used=1.21GiB, alloc change=-2.00MiB, cpu time=4.22s, real time=859.50ms, gc time=656.25ms

2

memory used=1.21GiB, alloc change=-1.17MiB, cpu time=4.03s, real time=841.75ms, gc time=566.41ms

3

memory used=1.21GiB, alloc change=256.00MiB, cpu time=4.47s, real time=911.25ms, gc time=738.28ms

4

memory used=1.21GiB, alloc change=0 bytes, cpu time=4.33s, real time=852.50ms, gc time=605.47ms

5

memory used=1.21GiB, alloc change=0 bytes, cpu time=4.34s, real time=853.50ms, gc time=628.91ms

6

memory used=1.21GiB, alloc change=0 bytes, cpu time=4.27s, real time=826.75ms, gc time=535.16ms

7

memory used=1.21GiB, alloc change=0 bytes, cpu time=4.19s, real time=841.50ms, gc time=308.59ms

 

Download numcpus.mw

You'll get equivalent results if you replace Mul by Add and increase the size of L to about 2^24.

Hi There,

Im currently on using a trial version of maple for engineering students. I am looking to see how you can view a step by step method of solving equations. I can't seem to find a way of doing so and I keep just getting the final answer. Can you assist?

 

Also I can't find the quadratic equation option.

 

thanks,

 

stuart

I'm trying to solve vast system of differential equations (Hamiltonian equations of motions). 

I have this kind of error and don't know what to do with it:

Error, (in dsolve) found the independent variables {t} also present in the names of the functions of the system {(cos(varphi(t)))((3333333333/10000000000)/sin(theta(t))^2+(1/23)*cot(theta(t))^2/R(t)^2), (sin(psi(t)))((3333333333/10000000000)/sin(theta(t))^2+(1/23)*cot(theta(t))^2/R(t)^2)}

Here's the file:ClassicalTrajectoriesAr-CO2.mw

 

 

First 804 805 806 807 808 809 810 Last Page 806 of 2141