MaplePrimes Questions

How do I get the line number of where the error occurred? 
The errors messages in maple tell you nothing.

p.s. How do I get the debugger to keep the display of code after it hits an error? 
 Where does the copy results on exit copy to? 
How do I know where I am in the code? (e.g. the matlab debugger just goes into the code you wrote  but when do outfrom it's not clear where I am now  )
How do I view variable values whilst debugging? How do I quit the debugger and save variables?  Can I set a procedure to quit and return variables? 

can I set a break in a procedure to quit and keep variable values?

I have 4 ode equations. i just want to know can i use any option or simplification to have a analytical solution or NOT? Thanks in Advance

 

``

restart:

ode1 := -2*diff(lambda(t),t)*y1(t) - lambda(t)*diff((y1)(t),t)-0*diff(eta(t),t) - diff((y1)(t),t$3) + diff((y1)(t),t)*(y1(t)^2 + y2(t)^2) +4*y1(t)*sqrt(y1(t)^2 + y2(t)^2)*diff(sqrt(y1(t)^2 + y2(t)^2),t)+diff((y1)(t),t)/r^2
+ y1(t)^2*diff(y1(t),t) + y1(t)*y2(t)*diff(y2(t),t) - 2*diff(y1(t),t)/r^2 ;

 

-2*(diff(lambda(t), t))*y1(t)-lambda(t)*(diff(y1(t), t))-(diff(diff(diff(y1(t), t), t), t))+(diff(y1(t), t))*(y1(t)^2+y2(t)^2)+2*y1(t)*(2*y1(t)*(diff(y1(t), t))+2*y2(t)*(diff(y2(t), t)))-(diff(y1(t), t))/r^2+y1(t)^2*(diff(y1(t), t))+y1(t)*y2(t)*(diff(y2(t), t))

(1)

ode2 := diff((lambda)(t),t$2) + lambda(t)*(y1(t)^2 + y2(t)^2) - 2*y1(t)*diff((y1)(t),t$2) - y1(t)^2*(y1(t)^2 + y2(t)^2) - y1(t)^2/r^2 - diff((y1)(t),t)^2 - 2*diff(sqrt(y1(t)^2 + y2(t)^2),t)^2 - 2*sqrt(y1(t)^2 + y2(t)^2)*diff(sqrt(y1(t)^2 + y2(t)^2),t$2) - diff((y2)(t),t)^2 - 2*y2(t)*diff((y2)(t),t$2) - y2(t)^2*(y1(t)^2 + y2(t)^2)

diff(diff(lambda(t), t), t)+lambda(t)*(y1(t)^2+y2(t)^2)-2*y1(t)*(diff(diff(y1(t), t), t))-y1(t)^2*(y1(t)^2+y2(t)^2)-y1(t)^2/r^2-(diff(y1(t), t))^2-(1/2)*(2*y1(t)*(diff(y1(t), t))+2*y2(t)*(diff(y2(t), t)))^2/(y1(t)^2+y2(t)^2)-2*(y1(t)^2+y2(t)^2)^(1/2)*(-(1/4)*(2*y1(t)*(diff(y1(t), t))+2*y2(t)*(diff(y2(t), t)))^2/(y1(t)^2+y2(t)^2)^(3/2)+(1/2)*(2*(diff(y1(t), t))^2+2*y1(t)*(diff(diff(y1(t), t), t))+2*(diff(y2(t), t))^2+2*y2(t)*(diff(diff(y2(t), t), t)))/(y1(t)^2+y2(t)^2)^(1/2))-(diff(y2(t), t))^2-2*y2(t)*(diff(diff(y2(t), t), t))-y2(t)^2*(y1(t)^2+y2(t)^2)

(2)

ode3 := 2*diff((lambda)(t),t)*y2(t) + lambda(t)*diff((y2)(t),t) - y1(t)*y2(t)*diff((y1)(t),t) - 4*y2(t)*sqrt(y1(t)^2 + y2(t)^2)*diff((sqrt(y1(t)^2 + y2(t)^2)),t) - y2(t)^2*diff((y2)(t),t) - (y1(t)^2 + y2(t)^2)*diff((y2)(t),t) - diff((y2)(t),t$3) ;

2*(diff(lambda(t), t))*y2(t)+lambda(t)*(diff(y2(t), t))-y1(t)*y2(t)*(diff(y1(t), t))-2*y2(t)*(2*y1(t)*(diff(y1(t), t))+2*y2(t)*(diff(y2(t), t)))-y2(t)^2*(diff(y2(t), t))-(y1(t)^2+y2(t)^2)*(diff(y2(t), t))-(diff(diff(diff(y2(t), t), t), t))

(3)

ode4 := lambda(t)*y1(t)/r + mu(t)*r - diff((y1)(t),t$2)/r -1/r*y1(t)*(y1(t)^2 + y2(t)^2) - y1(t)/r^3-2/r*diff(y1(t),t$2)

lambda(t)*y1(t)/r+mu(t)*r-3*(diff(diff(y1(t), t), t))/r-y1(t)*(y1(t)^2+y2(t)^2)/r-y1(t)/r^3

(4)

sys := [ode1, ode2, ode3, ode4]:

dsolve(sys,[y1(t),y2(t),lambda(t),mu(t)],'implicit')

``

``


 

Download 1.1.mw

###(*         test code 
test:=proc(aa,bb)

P1:=1; 
P2:=2;  

    P1:=aa; 
    P2:=bb;
 
f:=x^3+x+2;
p:=13; 
k:=2;
tmp:=field(p,k);
q:=tmp[1];
Po:=tmp[2];
L1:=P1; 
L2:= P2;
m:=1; 
while (L1 <> infinity) and (m < 25 ) do
temp:= EAdd(f, x, p, P1,P2,L1,L2) ;
L1:=temp[1];
L2:=temp[2];
m:=m+1;
end;

return 0;
end proc ;
#    *)


stopat(test, 24);

Error, (in stopat) statement number out of range  

Line 24 is the line after m:=m+1 so why is it out of range???

Hello,

I have the following expression

Ve*k21*ke*x1+Ve*k21*x1^2+k12*ke^2*x1[t]+2*k12*ke*x1*x1[t]+k12*x1^2*x1[t]+k21*ke
^2*x1[t]+2*k21*ke*x1*x1[t]+k21*x1^2*x1[t]+Ve*ke*x1[t]+ke^2*x1[t,t]+2*ke*x1*x1[t
,t]+x1^2*x1[t,t]


and I want to convert it to

x1[t,t]*(x1+ke)^2+(k12+k21)*x1[t]*(x1+ke)^2+Ve*x1[t]*ke+(k21*Ve)*x1*(x1+ke)

 

How can I do this opperation? This is just a simple example of a more general problem I am facing. Thanks in advance for your help

In graph theory, the crossing number cr(G) of a graph G is the lowest number of edge crossings of a plane drawing of the graph G. I'd like to use maple to compute crossing number of some graphs (any graphs is ok,  for example: cr(K5)=1 ). Someone can help me ? thanks. 

I know the problem of computing the crossing number is NP, but I guess we have some good  ways to compute in some small graphs.

Hello,

Since I installed Maple 2019 in my new iMac with Catalina, I can't make it work properly.

1. Once open, it's impossible to shut it down. I always have to force its exit.

2. The context panel doesn't seem to work properly. It never shows the actions that it sould do.

3. It doesn't flow as the old Maple I use to have in my old iMac.

I've been looking for this issue both in this forum and in the whole internet, as well as sending messages to technical support, and still can't find any answers. If someone knows something, plese let me know.

Kind regards,

Fermat66 

textplot.mw

 

I am trying to do Textplot along with numerical ode solution plots in display command but it doesnt seem to want to work, i have included my code and it can be seen that textplot works for by itself but when i want to include it into display nothing happens, any thoughts? 

Help would be appreciated. 

Sorry if this is stupid but How do I use the interactive debugger?   the button is greyed out for me and 
 

stopat(EAdd(x^3+2x+1,x, 13, 1, 2, 1, 2), 1);

Error, missing operator or `;`

 

stopat(EAdd, 1);

                             [EAdd]
 

debug button is still greyed out IDK what to do now


p.s. is there a way to set breakpoints in your code by clicking like in other programming?
 

I want to factor large numbers, for this purpose I want to utilize multi cores on my computer.

Anyone who can help me in solving this problem?

I am utilizing Lenovo Thinkpad T440s with specifications core i7-4600 CPU @ 2.19 GHz.

In addition I would like to ask if anyone can help me in integrating GPU's with Maplesoft 2019 for factorization.

 

I am having a cluster of 64 GPU's i.e. AMD RX-460.

 

Any help in this regard will be appreciated.

 

Hello people in Mapleprimes,

A long time has passed since I came here before.
I have forgotten a lot of what I remembered about maple.

I want to incert gamma from e_nsp1 and (1-gamma) from e_nsp2 into set_3, so deleting gamma and (1-gamma) from set_3.
How can I do this?

Thank you in advance.

Take care.

question_1.mw

 

taro 
 

Dear maple users,

How to plot a figure for different values of rk?

like rk=5,10,15,20:

jb.mw

Thanking you,

Waiting for replay.

 

Recently I posted a question "how to insert a loop".
Without my knowledge, the post is deleted.
Mention the reason for deleting the post.
 

 

How would I turn this set into matrix form?

would it be possible to seperate the matrix form into:

v1e^(lamba*t) + v2e^(lambda2*t) .... + v^ne^(lambdan*t) where v1, v2, and vn are the eigenvectors and lamba1, lambda2, and lamban are their respective eigenvectors.

I have problem on RKF45 with result on 

"unable to convert to an explicit first order system"


 

``

restart

with(plots):

vf := .3:

kf := .2:

c := .2:

`&Tau;t` := .3:

N := .1:

`&phi;d` := .2:

`&rho;s` := 8933:

`&rho;f` := 997.1:

y := .1:

alpha := .5:

Pr := 6.2:

beta := .5:

`&beta;T` := .2:

`&epsilon;` := .1:

ks := 400:

kf := .613:

cps := 385:

cpf := 4179:

delta := .5:

Ec := .2:

`&Tau;v` := 1:

A := .5:

B := .5:

omega := 1.5:

K := (ks+2*kf-2*phi*(kf-ks))/(ks+2*kf+phi*(kf-ks))

(401.226+798.774*phi)/(401.226-399.387*phi)

(1)

Eq1 := (1-`&phi;d`)*(diff(f(eta), eta, eta, eta))/(1-phi)^2.5-(1-`&phi;d`)*(1-phi+phi*`&rho;s`/`&rho;f`)*((diff(f(eta), eta))^2-f(eta)*(diff(f(eta), eta, eta)))+alpha*beta*(diff(G(eta), eta)-(diff(f(eta), eta))) = 0

.8*(diff(diff(diff(f(eta), eta), eta), eta))/(1-phi)^2.5-.8*(1+7.958981045*phi)*((diff(f(eta), eta))^2-f(eta)*(diff(diff(f(eta), eta), eta)))+.25*(diff(G(eta), eta))-.25*(diff(f(eta), eta)) = 0

(2)

Eq2 := (diff(G(eta), eta))^2-G(eta)*(diff(G(eta), eta, eta))-beta*(diff(f(eta), eta)-(diff(G(eta), eta))) = 0

(diff(G(eta), eta))^2-G(eta)*(diff(diff(G(eta), eta), eta))-.5*(diff(f(eta), eta))+.5*(diff(G(eta), eta)) = 0

(3)

Eq3 := G(eta)*(diff(G(eta), eta))+beta*(f(eta)-G(eta)) = 0

G(eta)*(diff(G(eta), eta))+.5*f(eta)-.5*G(eta) = 0

(4)

Eq4 := K*(diff(theta(eta), eta, eta))/Pr+(1-phi+phi*`&rho;s`*cps/(`&rho;f`*cpf))*(f(eta)*(diff(theta(eta), eta))-2*(diff(f(eta), eta))*theta(eta))+alpha*`&beta;T`*(H(eta)-theta(eta))+Ec*alpha*(diff(G(eta), eta)-(diff(f(eta), eta)))^2/`&Tau;v`+(A*(diff(f(eta), eta))+B*theta(eta))/Pr = 0

.1612903226*(401.226+798.774*phi)*(diff(diff(theta(eta), eta), eta))/(401.226-399.387*phi)+(1-.1746332371*phi)*(f(eta)*(diff(theta(eta), eta))-2*(diff(f(eta), eta))*theta(eta))+.10*H(eta)-0.1935483870e-1*theta(eta)+.10*(diff(G(eta), eta)-(diff(f(eta), eta)))^2+0.8064516130e-1*(diff(f(eta), eta)) = 0

(5)

Eq5 := 2*(diff(G(eta), eta))*H(eta)-G(eta)*(diff(H(eta), eta))+y*`&beta;T`*(H(eta)-theta(eta)) = 0

2*(diff(G(eta), eta))*H(eta)-G(eta)*(diff(H(eta), eta))+0.2e-1*H(eta)-0.2e-1*theta(eta) = 0

(6)

bcs1 := (D(f))(0) = `&epsilon;`+delta*((D@@2)(f))(0), f(0) = 0, (D(f))(10) = 0;

(D(f))(0) = .1+.5*((D@@2)(f))(0), f(0) = 0, (D(f))(10) = 0

(7)

bcs2 := (D(G))(10) = 0, G(10) = f(10);

(D(G))(10) = 0, G(10) = f(10)

(8)

bcs3 := theta(0) = 1+omega*(D(theta))(0), theta(10) = 0;

theta(0) = 1+1.5*(D(theta))(0), theta(10) = 0

(9)

bcs4 := H(10) = 0;

H(10) = 0

(10)

L := [0., 0.5e-1, .1, .15, .2]:

for k to 5 do R := dsolve(eval({Eq1, Eq2, Eq3, Eq4, Eq5, bcs1, bcs2, bcs3, bcs4}, phi = L[k]), [f(eta), G(eta), theta(eta), H(eta)], numeric, output = listprocedure); Y || k := rhs(R[3]) end do

Error, (in dsolve/numeric/bvp/convertsys) unable to convert to an explicit first-order system

 

plot([Y || (1 .. 5)], 0 .. 10)

Error, (in plot) procedure expected, as range contains no plotting variable

 

``

``

``


 

Download RKF45_A.mw

 

thank you in advance for your help and kindness.

First 610 611 612 613 614 615 616 Last Page 612 of 2431