MaplePrimes Questions

how i can find order of convergence of newton method by expanding taylor series?? plz send me code???

 

i have runed below system of PDES as:



c := 3*10^8;
                           
hbar := 0.105457148e-33;
                             
kB := 0.13806503e-22;
                                
epsilon0 := 0.885418782e-11;
                                                        
timeunit := 1;
                             
g := 1*timeunit;
                            
t0 := 0.10e-4/g;
                           
k := 5/(0.1e10*g);
                                                          
td := 0.10e-4/g;
B := 1;
                            
L := 0.1e-2;
                           
OD := 0.1e7;
              
eta := g*OD/(2*L);
                                 
                       
Omegap0 := .1*g;
      

Omegac(z):=(1e7*B*g)/(sqrt(1+((z-L)/(0.2*L))^(2)));


                 
PDE1 := diff(rho31(t, z), t) = -(1/2)*g*rho31(t, z)+(.5*I)*Omegac(z)*rho21(t, z)+(.5*I)*Omegap(t, z);
                        
PDE2 := diff(rho21(t, z), t) = (.5*I)*Omegac(z)*rho31(t, z);
                                                          
         
PDE3 := diff(Omegap(t, z), t) = -c*(diff(Omegap(t, z), z))+I*c*eta*rho31(t, z);
       

IBC := {Omegap(0, z) = 0, Omegap(t, 0) = Omegap0*exp(-((t-t0)/k)^2), rho21(0, z) = 0, rho31(0, z) = 0};
 
                              
pds := pdsolve({PDE1, PDE2, PDE3}, IBC, numeric, time = t, range = 0 .. 0.1e-2);
                      

 

 

every things is ok but I don't know how can i plot rho31, rho21 and Omegap in 2D or 3D plot.

I have tried

but i see the bellow error:

Error, (in pdsolve/numeric/plot) unable to compute solution for t>INFO["failtime"]:
unable to store -37500000000000000*I when datatype=float[8]

Please help me to solve the error?

Thanks

Hi,

I would like to thank everyone who takes their time to respond to posts on this page. I have another question.

I have about 11 trillion lists that are of the form A shown below. The lists ofcourse have more elements than A (about 50 elements). What I want is to compute this value I call f, and the moment this value is found to be 1, we stop, and if all the values of f are 0, then we print(A). Here is my code, which has a problem and doesn't give me the result I want. How do I modify this so that if any value of f=1, then we stop, elif no 1 is found, we print just one value for A and not for every 0 produced?

with(ListTools);
A := [[1, 2], [1, 7], [5, 6], [1, 6], [1, 9], [6, 5], [9, 1], [2, 1], [7, 1], [6, 1], [5, 6]]; n := 9;
for i to n do for j to n do for k to nops(A) do if [i, j] = A[k] then a := Search([i, j], A); b := Search([j, i], A); if a < b then f := `mod`(b-a, 2); if f = 1 then break else print(A) end if end if end if end do end do end do;

Presently what I am doing is to Append all values of f into an Array and check that 1 is not an element of that Array. This is however very inconvenient since my lists are huge, and they are many, and we do not have to cpompute all the values of f once we come across a 1. Other than this, is there a way I can make my program run faster? Any suggestions are welcomed.

Thanks,

VIC.

How do I define this sequence a(n) in Maple?

a(n) = 1/n for n=odd, a(n) = -1/n^2 for n = even.

Thanks!

hi

please help me for dsolve this equation...

error_length.mw

dsys3 := {(63/20000000)*(diff(u(x), x, x, x, x))-120000000000*(diff(u(x), x, x))-60000000000*(diff(w(x), x, x)), -2.100000000*10^(-30)*(diff(w(x), x, x, x, x, x, x))-4.860000000*10^(-14)*(diff(w(x), x, x, x, x))-(2400*(diff(u(x), x, x)+(diff(w(x), x))*(diff(w(x), x, x))))*(diff(w(x), x))-(1/50000000)*(diff(w(x), x, x))*(120000000000*(diff(u(x), x))+60000000000*(diff(w(x), x))^2-120000000000), u(0) = 0, u(1/2000000) = 0, w(0) = 0, w(1/2000000) = 0, (D(u))(0) = 0, (D(u))(1/2000000) = 0, ((D@@2)(w))(0) = 0, ((D@@2)(w))(1/2000000) = 0, ((D@@4)(w))(0) = 0, ((D@@4)(w))(1/2000000) = 0}

{(63/20000000)*(diff(diff(diff(diff(u(x), x), x), x), x))-120000000000*(diff(diff(u(x), x), x))-60000000000*(diff(diff(w(x), x), x)), -0.2100000000e-29*(diff(diff(diff(diff(diff(diff(w(x), x), x), x), x), x), x))-0.4860000000e-13*(diff(diff(diff(diff(w(x), x), x), x), x))-2400*(diff(diff(u(x), x), x)+(diff(w(x), x))*(diff(diff(w(x), x), x)))*(diff(w(x), x))-(1/50000000)*(diff(diff(w(x), x), x))*(120000000000*(diff(u(x), x))+60000000000*(diff(w(x), x))^2-120000000000), u(0) = 0, u(1/2000000) = 0, w(0) = 0, w(1/2000000) = 0, (D(u))(0) = 0, (D(u))(1/2000000) = 0, ((D@@2)(w))(0) = 0, ((D@@2)(w))(1/2000000) = 0, ((D@@4)(w))(0) = 0, ((D@@4)(w))(1/2000000) = 0}

(1)

dsolve(dsys3, numeric, initmesh = 3024, abserr = 0.1e-4)

`[Length of output exceeds limit of 1000000]`

(2)

``


Download error_length.mw

 

hello!, How can i to plot the next data in a 2D plot?. it is the result of a loop for.... do....while. I had tried with pointplot anda dataplot, but must be something wrong!

with(plots);
for i from 1.73205080756887853 by 0.5e-2 while i < 2.87500000000000000 do roll := i; f1max := NLPSolve(f1, {f2 = i}, x1 = 0 .. 2, x2 = 0 .. 3, method = sqp, maximize = false); c := op([1], f1max), print(c, roll) end do; plot(roll, c);
Warning, limiting number of major iterations has been reached
            2.86923108976435204, 1.73205080756887853
                2.40562374977021154, 1.737050808
                2.36135298525774395, 1.742050808
                2.34703023482192563, 1.747050808
                2.33762023747274306, 1.752050808
                2.33074752039182975, 1.757050808
                2.32549269761476607, 1.762050808
                2.32138461334482216, 1.767050808
                2.31814359109128576, 1.772050808
                2.31558754335936889, 1.777050808
                2.31359008686494683, 1.782050808
                2.31205927196994354, 1.787050808
                2.31092573645557353, 1.792050808
                2.31013563350152307, 1.797050808
                2.30964617400063910, 1.802050808
                2.30942269107110354, 1.807050808
                2.30943663600124838, 1.812050808
                2.30966416809946962, 1.817050808

I have a simple algebraic problem, but Maple can't eliminate the exp(3P) in each term. Please help.

I get the following error:

Error, (in solve) cannot solve for an unknown function with other operations in its arguments


restart

R13eqn := -2*H*Ybar3*Zbar-H*Z1-H1*Z+H1*Zbar+H4*Ybar3-H41 = 0

-2*H*Ybar3*Zbar-H*Z1-H1*Z+H1*Zbar+H4*Ybar3-H41 = 0

(1)

H := exp(3*P)*(Z+Zbar)

exp(3*P)*(Z+Zbar)

(2)

H1 := 3*P1*exp(3*P)*(Z+Zbar)+exp(3*P)*(Z1+Zbar1)

3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z+Zbar)/(Z+Zbar)^2-(exp(P))^3*Z^3*Zbar1/(Z+Zbar)^2+(exp(P))^3*Zbar^3*Zbar1/(Z+Zbar)^2-(exp(P))^3*Z*Zbar(Z1+Zbar1)^2/(Z+Zbar)^2-(exp(P))^3*Z*Z(Z1+Zbar1)^2/(Z+Zbar)^2-(exp(P))^3*Z^4*Ybar3/(Z+Zbar)^2-(exp(P))^3*Zbar*Zbar(Z1+Zbar1)^2/(Z+Zbar)^2-(exp(P))^3*Zbar*Z(Z1+Zbar1)^2/(Z+Zbar)^2+(exp(3*P))(Z+Zbar)*Z(Z+Zbar)^2*Zbar1(Z+Zbar)/(Z+Zbar)^2+(exp(3*P))(Z+Zbar)*Zbar(Z+Zbar)^2*Z1(Z+Zbar)/(Z+Zbar)^2-3*(exp(P))^3*Ybar3*Zbar^4/(Z+Zbar)^2-2*(exp(P))^3*Z^3*Z1/(Z+Zbar)^2-3*(exp(P))^3*P1*Z^4/(Z+Zbar)^2+3*(exp(P))^3*P1*Zbar^4/(Z+Zbar)^2+3*P1(Z+Zbar)*(exp(3*P))(Z+Zbar)*Z(Z+Zbar)^3/(Z+Zbar)^2+3*P1(Z+Zbar)*(exp(3*P))(Z+Zbar)*Zbar(Z+Zbar)^3/(Z+Zbar)^2+3*(exp(3*P))(Z+Zbar)*Z(Z+Zbar)^2*Z1(Z+Zbar)/(Z+Zbar)^2+3*(exp(3*P))(Z+Zbar)*Zbar(Z+Zbar)^2*Zbar1(Z+Zbar)/(Z+Zbar)^2 = 0, P1)

Error, (in solve) cannot solve for an unknown function with other operations in its arguments

 

NULL

``


Download Help_Maple_divide_an_Exp_on_both_sides.mwHelp_Maple_divide_an_Exp_on_both_sides.mw

hello, i would like to know what am i doing wrong, if you can help me, ill be very grateful

ex

how we can solve an ode with boundaries by using RK4 and any other technique??

how we can solve an ode with exat soltuion n calculate the unknw constant which aries after solving an ode.???

Dear forum users/ admins, I have some questions regarding the wind turbine vibrations model based on the MapleSim gallery. I am a new user, went through some tutorials and am currently trying to understand how the system works.

 

I will try to deliver my questions based on the pictures shown below:

 

 

 

 1. After running the model, 2 results were shown. One is "Latest Results" and the other is "zeta=0.01". Based on the images above, there is a comment that the result was dated Feb 14 2013. Is this the result on which the day the model was created? If it is, is it programmed to be in the result file everytime the simulation runs?

 

 

2. If I untick "zeta=0.01", a red graph appears, which says Latest Result. But the graphs are not labelled. How can I label this graph in MapleSim? 

3. I would also like to ask, what type of vibrations are occuring in the model, and what does the Deflection-Time graph means. Why does the deflection occur highest at 120s and then drops? Is it because the tower becomes stabilized after a while?

 

 

4. I understand that the model is run by a signal and fed into a speed component. May I know what is the f(critical) is, and how it affects the system?

 

 

5. From the Ramp signal, there is a "height" value. The pre-set value is 10. After changing this value, to lets say 50, the maximum deflections occur at a an earlier time as shown in the figure below:

 

 

6. I would like to understand how does the ramp affect the maximum deflection time that occurs.

 

Thank you very much!

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.

First 1090 1091 1092 1093 1094 1095 1096 Last Page 1092 of 2428