MaplePrimes Questions

Hello, I am using PDEtools to evaluate an equation but got system inconsistent in respect of a parameter used after the command map(pdsolve). I am afraid the result sebsequently given may not be correct, did I do something wrong?

Thanks.

 

test.mw

 

 

 

Hello

I'm preparing for my analysis exam but i'm having some trouble finding particular solutions for this differential equation. I used both the command to fully solve it and the command for particular solutions but neither gives me a proper result. Am I doing something wrong?

Thanks in advance

 

Hi everyone,

I'm tryng to find the equations of motion of a 5 DOF arm using Lagrange's method, but I'm pretty new at using Maple. So far, the code is:

restart:

#Método de lagrange
with(VectorCalculus):
with(LinearAlgebra):
#Origem

Orig:= <0|0|0>:
#Cinematica direta

T43:= Matrix([[1,0,0,0],[0,1,0,0],[0,0,1,L1],[0,0,0,1]]):
T76:= Matrix([[1,0,0,0],[0,1,0,0],[0,0,1,L2],[0,0,0,1]]):
R10:= Matrix([ [1,0,0,0] , [0,cos(q1(t)),-sin(q1(t)),0] , [0,sin(q1(t)),cos(q1(t)),0] , [0,0,0,1] ]):
R21:= Matrix([ [cos(q2(t)),0,-sin(q2(t)),0] , [0,1,0,0] , [sin(q2(t)),0,cos(q2(t)),0] , [0,0,0,1] ]):
R32:= Matrix([ [cos(q3(t)),sin(q3(t)),0,0] , [-sin(q3(t)),cos(q3(t)),0,0] , [0,0,1,0] , [0,0,0,1] ]):
R54:= Matrix([ [cos(q4(t)),0,-sin(q4(t)),0] , [0,1,0,0] , [sin(q4(t)),0,cos(q4(t)),0] , [0,0,0,1] ]):
R65:= Matrix([ [cos(q5(t)),sin(q5(t)),0,0] , [-sin(q5(t)),cos(q5(t)),0,0] , [0,0,1,0] , [0,0,0,1] ]):
Rr10:= Matrix([ [1,0,0] , [0,cos(q1(t)),-sin(q1(t))] , [0,sin(q1(t)),cos(q1(t))] ]):
Rr21:= Matrix([ [cos(q2(t)),0,-sin(q2(t))] , [0,1,0] , [sin(q2(t)),0,cos(q2(t))] ]):
Rr32:= Matrix([ [cos(q3(t)),sin(q3(t)),0] , [-sin(q3(t)),cos(q3(t)),0] , [0,0,1] ]):
Rr54:= Matrix([ [cos(q4(t)),0,-sin(q4(t))] , [0,1,0] , [sin(q4(t)),0,cos(q4(t))] ]):
Rr65:= Matrix([ [cos(q5(t)),sin(q5(t)),0] , [-sin(q5(t)),cos(q5(t)),0] , [0,0,1] ]):

#Coordenadas das juntas

A:= <0|0|0>:
Br:= R10.R21.R32.T43:

B:= <Br[1,4]|Br[2,4]|Br[3,4]>:
Cr:= R10.R21.R32.T43.R54.R65.T76:
C:= <Cr[1,4]|Cr[2,4]|Cr[3,4]>:

#Coordenadas dos centros de massa

TC43:= Matrix([[1,0,0,0],[0,1,0,0],[0,0,1,L1/2],[0,0,0,1]]):
MC1:=R10.R21.R32.TC43:
C1:=<MC1[1,4]|MC1[2,4]|MC1[3,4]>:
C1z := C1[3]:
TC76:= Matrix([[1,0,0,0],[0,1,0,0],[0,0,1,L2/2],[0,0,0,1]]):
MC2:=R10.R21.R32.T43.R54.R65.TC76:
C2:=<MC2[1,4]|MC2[2,4]|MC2[3,4]>:
C2z := C2[3]:

#Calculo da velocidade dos centros de massa

VPc1:= diff(C1,t):

VPc2:= diff(C2,t):


#Calculo da velocidade angular

wC1 := Transpose(Rr10.<v1,0,0> + Rr10.Rr21.<0,v2,0> + Rr10.Rr21.Rr32.<0,0,v3>):
wC2 := Transpose(Rr10.<v1,0,0> + Rr10.Rr21.<0,v2,0> + Rr10.Rr21.Rr32.<0,0,v3> + Rr10.Rr21.Rr32.Rr54.<0,v4,0>):

#Momento de inercia

Ic1:= (1/12)*m1*L1^2:
Ic2:= (1/12)*m2*L2^2:

#Energia cinética

Ec11:= (m1/2)*(VPc1.Transpose(VPc1)) + (Ic1/2)*(wC1.Transpose(wC1)):
Ec1:= simplify(Ec11):
Ec22:= (m2/2)*(VPc2.Transpose(VPc2)) + (Ic2/2)*(wC2.Transpose(wC2)):
Ec2:= simplify(Ec22):

#Energia potencial
Uc1:=m1.g.C1z:
Uc2:=m2.g.C2z:


#Energia cinetica - energia potencial

T1 := Ec1 + Ec2 - Uc1 - Uc2:

#T:= subs(diff(q1(t),t)=v1(t),diff(q2(t),t)=v2(t),diff(q3(t),t)=v3(t),diff(q4(t),t)=v4(t),diff(q5(t),t)=v5(t),diff(v1(t),t)=a1(t),diff(v2(t),t)=a2(t),diff(v3(t),t)=a3(t),diff(v4(t),t)=a4(t),diff(v5(t),t)=a5(t), T1):
T:= subs(diff(q1(t),t)=v1,diff(q2(t),t)=v2,diff(q3(t),t)=v3,diff(q4(t),t)=v4,diff(q5(t),t)=v5,q1(t)=q1,q2(t)=q2,q3(t)=q3,q4(t)=q4,q5(t)=q5, T1):

Eq11:=diff(T,v1):
#Tv1:=convert(Tv1,diff):


Eq12:=diff(T,q1):
#Tq1:=convert(Tq1,diff):


Eq13 := subs(q1=q1(t),q2=q2(t),q3=q3(t),q4=q4(t),q5=q5(t),v1=diff(q1(t),t),v2=diff(q2(t),t),v3=diff(q3(t),t),v4=diff(q4(t),t),v5=diff(q5(t),t), Eq11):

Eq14 := subs(q1=q1(t),q2=q2(t),q3=q3(t),q4=q4(t),q5=q5(t),v1=diff(q1(t),t),v2=diff(q2(t),t),v3=diff(q3(t),t),v4=diff(q4(t),t),v5=diff(q5(t),t), Eq12):

Eq15:= diff(Eq13,t):

Eqqqq16 := Eq15-Eq14=0:

##Lagrangiano

Eqqq16:=expand(Eqqqq16):
Eqq16:=convert(Eqqq16,diff):
Eq16:=collect(Eqq16,diff):

Eq21:=diff(T,v2):
#Tv1:=convert(Tv1,diff):


Eq22:=diff(T,q2):
#Tq1:=convert(Tq1,diff):


Eq23 := subs(q1=q1(t),q2=q2(t),q3=q3(t),q4=q4(t),q5=q5(t),v1=diff(q1(t),t),v2=diff(q2(t),t),v3=diff(q3(t),t),v4=diff(q4(t),t),v5=diff(q5(t),t), Eq21):

Eq24 := subs(q1=q1(t),q2=q2(t),q3=q3(t),q4=q4(t),q5=q5(t),v1=diff(q1(t),t),v2=diff(q2(t),t),v3=diff(q3(t),t),v4=diff(q4(t),t),v5=diff(q5(t),t),Eq22):

Eq25:= diff(Eq23,t):

Eqqqq26 := Eq25-Eq24=0:

##Lagrangiano

Eqqq26:=expand(Eqqqq26):
Eqq26:=convert(Eqqq26,diff):
Eq26:=collect(Eqq26,diff):


Eq31:=diff(T,v3):
#Tv1:=convert(Tv1,diff):


Eq32:=diff(T,q3):
#Tq1:=convert(Tq1,diff):


Eq33 := subs(q1=q1(t),q2=q2(t),q3=q3(t),q4=q4(t),q5=q5(t),v1=diff(q1(t),t),v2=diff(q2(t),t),v3=diff(q3(t),t),v4=diff(q4(t),t),v5=diff(q5(t),t), Eq31):

Eq34 := subs(vq1=q1(t),q2=q2(t),q3=q3(t),q4=q4(t),q5=q5(t),v1=diff(q1(t),t),v2=diff(q2(t),t),v3=diff(q3(t),t),v4=diff(q4(t),t),v5=diff(q5(t),t), Eq32):

Eq35:= diff(Eq33,t):

Eqqqq36 := Eq35-Eq34=0:

##Lagrangiano

Eqqq36:=expand(Eqqqq36):
Eqq36:=convert(Eqqq36,diff):
Eq36:=collect(Eqq36,diff):


Eq41:=diff(T,v4):
#Tv1:=convert(Tv1,diff):


Eq42:=diff(T,q4):
#Tq1:=convert(Tq1,diff):


Eq43 := subs(q1=q1(t),q2=q2(t),q3=q3(t),q4=q4(t),q5=q5(t),v1=diff(q1(t),t),v2=diff(q2(t),t),v3=diff(q3(t),t),v4=diff(q4(t),t),v5=diff(q5(t),t), Eq41):

Eq44 := subs(q1=q1(t),q2=q2(t),q3=q3(t),q4=q4(t),q5=q5(t),v1=diff(q1(t),t),v2=diff(q2(t),t),v3=diff(q3(t),t),v4=diff(q4(t),t),v5=diff(q5(t),t), Eq42):

Eq45:= diff(Eq43,t):

Eqqqq46 := Eq45-Eq44=0:

##Lagrangiano

Eqqq46:=expand(Eqqqq46):
Eqq46:=convert(Eqqq46,diff):
Eq46:=collect(Eqq46,diff):


Eq51:=diff(T,v5):
#Tv1:=convert(Tv1,diff):

Eq52:=diff(T,q5):
#Tq1:=convert(Tq1,diff):


Eq53 := subs(q1=q1(t),q2=q2(t),q3=q3(t),q4=q4(t),q5=q5(t),v1=diff(q1(t),t),v2=diff(q2(t),t),v3=diff(q3(t),t),v4=diff(q4(t),t),v5=diff(q5(t),t), Eq15):

Eq54 := subs(q1=q1(t),q2=q2(t),q3=q3(t),q4=q4(t),q5=q5(t),v1=diff(q1(t),t),v2=diff(q2(t),t),v3=diff(q3(t),t),v4=diff(q4(t),t),v5=diff(q5(t),t), Eq52):

Eq55:= diff(Eq53,t):

Eqqqq56 := Eq55-Eq54=0:

##Lagrangiano

Eqqq56:=expand(Eqqqq56):
Eqq56:=convert(Eqqq56,diff):
Eq56:=collect(Eqq56,diff):


##Substituicao de dados

Lagran1 := subs[eval](L1=1, m1=1, L2=1, m2=1, g=9.81 , Eq16):
Lagran2 := subs[eval](L1=1, m1=1, L2=1, m2=1, g=9.81 , Eq26):
Lagran3 := subs[eval](L1=1, m1=1, L2=1, m2=1, g=9.81 , Eq36):
Lagran4 := subs[eval](L1=1, m1=1, L2=1, m2=1, g=9.81 , Eq46):
Lagran5 := subs[eval](L1=1, m1=1, L2=1, m2=1, g=9.81 , Eq56):

## Solucao do sistema para encontrar as derivadas segundas ddqn/dt


ini:= q1(0)= Pi/10, q2(0)=0, q3(0)=0, q4(0)=0, q5(0)=0, eval (diff (q1(t), t), t=0)=0,eval (diff (q2(t), t), t=0)=0, eval (diff (q3(t), t), t=0)=0, eval (diff (q4(t), t), t=0)=0, eval (diff (q5(t), t), t=0)=0,eval (diff (q1(t), t$2), t=0)=0,eval (diff (q2(t), t$2), t=0)=0, eval (diff (q3(t), t$2), t=0)=0, eval (diff (q4(t), t$2), t=0)=0, eval (diff (q5(t), t$2), t=0)=0:


sol := dsolve({Lagran1, Lagran2, Lagran3, Lagran4, Lagran5, ini},{q1(t), q2(t), q3(t), q4(t), q5(t)}, numeric, output=listprocedure):

The problem is I'm stuck with the following error using dsolve:

Error, (in dsolve/numeric/process_input) unknown q1(t) present in ODE system is not a specified dependent variable or evaluatable procedure

Could someone show me what's wrong? 

Any help would be greatly appreciated, thanks in advance!

Hi,

I have this maple program, let's call it 1.mw. I need to import the data produced in 1.mw to another file, 2.mw and use it there, how do I go about this? Also how can I export the result produced in 2.mw to a different file (not necessarily a maple file). I am not sure about the right time to use, but maybe the question is, how do I get data from 1.mw to use in 2.mw, and then produce the result from 2.mw in another file?

 

Thanks,

Vic.

I wish to study the trend of medical consultations each day during six years. Thus I expect near 2200 datas to analyse.

But some parameters are to consider :

- I don't have yet the datas per day, but the mean is about 2 consultations per day

- as it is difficult to do more than 3 or perhaps 4 consultations during one day (9h30 am - 13h pm), the others if they exist will probably be seen the next day (aso if the next day 3 news consultations occured)

- then, I don't know actually (as I expect the datas or each day but don't have now these datas) if the better distribution will be simply follow a Poisson' law, or exponential, or negative binomial, ..

- do someone have a clue for the better law given what i said ?

 

Further, I don't have a stastic program especially used for time trend, excepting Systran 13, but I don't believe that this program can be used with a theoric model of distribution, I recall that it does usual tasks, autocorrelations, saisonnal adjustments, .. but with continuous distributions I believe, and a linear model (removing the basic frequencies)

As such program (study of temporal series) is usually sold about 3000$ in France, that I don't expect to be a trader, with only one calculus to do, could anyone tell me how to adjust the better model to the 2200 datas that could be expected ?

Thx for your help, friendly yours;

Milos

Has anyone had any luck integrating Maple TA and Ellucian Banner? Specifically storing the test scores in the banner SORTEST table using the Maple TA Web Services API?

More generally, has anyone had an luck pulling scored in to ANY system using the Web API? Care to share a sample of your code?

Thanks!

 

-Grant

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

 

 

 

First 971 972 973 974 975 976 977 Last Page 973 of 2308