Maple 15 Questions and Posts Maple 15 Questions and Posts Feed

These are Posts and Questions associated with the product, Maple 15

I have the following expression (obtained from an earlier calculation):

I want to collect all the terms under one summation. So I define a rule:

collectf:=proc(f)
A::algebraic*f(a::algebraic)+B::algebraic*f(b::algebraic)\
 +C::algebraic*f(c::algebraic)+D::algebraic*f(d::algebraic)=f(A*a+B*b+C*c+D*d);
end proc:

and then

applyrule(collectf(Sum),%);

I get

Error, (in +) unable to identify A::algebraic

I used similar constructs before so I think the rule is constructed correctly. I should, however, mention that I use the Physics:-Vectors package and in fact the expression I start up with here reads, in 1-d Maple inputform:

Physics[Vectors][`+`](Physics[Vectors][`+`](Physics[Vectors][`+`](-y*(Sum((diff(a[n](r), r))/(exp(I*Pi*n/L))^2, n))/r, (2*I)*(Sum(a[n](r)/(exp(I*Pi*n/L))^2, n))*k0), y*(Sum(a[n](r)/(exp(I*Pi*n/L))^2, n))*k0^2), -y*(Sum((diff(a[n](r), r, r))/(exp(I*Pi*n/L))^2, n)))

Is my problem related to the use of Physics:-Vectors? If so, how can I get around that?

TIA,

Mac Dude

Hi everyone

I'd be pleased if you could give a hand with the exploration assistant.

 

1. I want the exploration assistant to appear on the same document I am working on, but everytime I use it (either by right-clicking or by the explore command) it automatically appears on a new document.

 

2. can I manipulate a piecewise function when using embedded components? i.e.: plot the function and varying the parameters using sliders.

 

thanks

cesar

https://drive.google.com/file/d/0B2D69u2pweEvMV92SGhtRGZONFk/edit?usp=sharing

a error and code in this attachment mw

i can pdsolve it, but numeric pdsolve it get error

I have this kind of problem. When I try to solve my command:

 

is there any way to avoid this? in order to get the answer directly...

Hello,
my question may be simple but I don't find the answer in any help guide.
when I define a function I cannot use a linearalgebra expression such as Trace.
Here is an example of what I would like to do:




If anyone can help me...
Thank you

Hi!

Say, I got an expression that depends on two variables, x and y. How can I tell Maple, that y is actually just a (real) constant, so y does not depend on x?

Because when I apply a differentiation with the "D" - command, it would always also write out expressions, where y is differentiated w.r.t. x.

Thanks!

Hi,

this question has been asked several times here already accoruding to the search function, but I didn't find an actual answer to it.

My Maple 15 gives outlarge numbers without scientific notation, so even 10^20 would be displayed as 1000....000  (20 zeroes). It seems like this is not the standard, so at one point I might have changed the way Maple displays the output, and cannot remember anymore how.

How can I tell Maple to display the output in scientiffic notation, and how can I set up the threshold of powers of ten, when this is done. (so that e.g. 100 still gets disaplyed as 100, and not as 1*10^2, but anything above gets displayed in scientific notation).

I know that I can right click on the output to change it's display form. But I want to change this generally, so I dont have to do this for any single numerical output I get.

I use Maple 15, running in Mac OS.

Thanks for help!

I have to plot 4 vectors in one graph. I have the following structure:

plot(Vector([12, 12.5, 13, 13.5, 14, 14.5, 15]), Vector([1.622712644, 1.265443137, 1.028604736, .8605013333, .7352916667, .6386248233, .5618945274]), style = line, symbol = asterisk, color = blue)

and 

plot(Vector([12, 12.5, 13, 13.5, 14, 14.5, 15]), Vector([5.483608580, 4.289400489, 3.496793877, 2.933480578, 2.513320599, 2.188469637, 1.930230220]), style = line, symbol = asterisk, color = blue)

Could you help me to plot these two curves in one graph.

 

please help me to find a solution for this issue...

I would like to thank you in advance

Best regards,

D.L.

maximum and minimum functions...

November 14 2013 adel-00 25

I tried to get the maximum and minimum values of the following function. From the plot I get them but its not accurate. Please advise me to get them accurate.

 

F:=0.85:B:=0.5:

K:=N->(N*(1+F*N/(N^2+B^2-F*N)));

 

implicitplot(((N^2+B^2-F*N)*K=N*(N^2+B^2-F*N+F*N),K=0..10,N=0..10,view=[0..5,0..4],numpoints=90000,axes=boxed,thickness=2,color=black,font=[1,1,20],tickmarks=[3, 3],linestyle=1));

 

I gave this function:

g := -2-k[1](lambda*alpha[2]*k[2]+alpha[1](-2-2*k[2]+k[2]*lambda^2))+k[1](lambda*alpha[2]*k[2]+alpha[1](-2-2*k[2]+k[2]*lambda^2))*lambda(lambda*alpha[2]*k[2]+alpha[1](-2-2*k[2]+k[2]*lambda^2))^2

I would like to factor out or to collect:   (lambda*alpha[2]*k[2]+alpha[1](-2-2*k[2]+k[2]*lambda^2))

I use following command: collect(g, lambda*alpha[2]*k[2]+alpha[1](-2-2*k[2]+k[2]*lambda^2))

Nevertheless, I receive an error ...

Error, (in collect) cannot collect lambda*alpha[2]*k[2]+alpha[1](-2-2*k[2]+k[2]*lambda^2)

 

Could you help me to solve my issue ? 

What am I doing wrong ? Do I have to use another command for this ?

I would like to thank you in advance.

Best regards,

D.L.

 

q[1] = sqrt(x)*alpha-lambda(sqrt(x)*alpha-lambda*q[1]*q[3]-p[2])*(sqrt(x)*alpha-lambda*q[1]*q[2]-p[3])-p[1]

I am looking for q[1] solution. When I solve for q[1], maple gives me following answer:

q[1] = RootOf(-_Z+sqrt(x)*alpha-lambda(sqrt(x)*alpha-lambda*_Z*q[3]-p[2])*sqrt(x)*alpha+lambda(sqrt(x)*alpha-lambda*_Z*q[3]-p[2])*lambda*_Z*q[2]+lambda(sqrt(x)*alpha-lambda*_Z*q[3]-p[2])*p[3]-p[1])

Is it possible to obtain a classical solution for the calculations above. (can not understand the meaning of: RootOf and _Z. I need q[1] in order to solve further in my system of eqautions for  q[2],  q[3]

 

could you help me please to find a solution for this issue...
I would like to thank you in advance 
Best regards,

D.L.

((-1+lambda(lambda*k[2]*alpha[2]+alpha[1](k[2]*lambda^2-2*k[2]-2))^2)*k[1](lambda*k[2]*alpha[2]+alpha[1](k[2]*lambda^2-2*k[2]-2))+(-lambda*lambda(lambda*alpha[1]*k[1]+alpha[2](k[1]*lambda^2-2*k[1]-2))^2+lambda)*k[2](lambda*alpha[1]*k[1]+alpha[2](k[1]*lambda^2-2*k[1]-2))-k[1]*(-alpha[1]+lambda*alpha[2])*lambda(2+5*k[2])^2+lambda^5*alpha[2]*k[1]*k[2]-alpha[1]*k[1]*lambda^4*k[2]-2*lambda^3*alpha[2]*k[2]+2*alpha[1]*k[2]*lambda^2+(4*alpha[2]*(1+k[2])*k[1]+4*alpha[2]+4*k[2]*alpha[2]+2)*lambda-4*alpha[1]*(1+k[2])*k[1]-4*alpha[1]-4*alpha[1]*k[2]-2)*(-(lambda(lambda*k[2]*alpha[2]+alpha[1](k[2]*lambda^2-2*k[2]-2))-1)*(lambda(lambda*k[2]*alpha[2]+alpha[1](k[2]*lambda^2-2*k[2]-2))+1)*(-1+k[1]*lambda^2-k[1])*k[1](lambda*k[2]*alpha[2]+alpha[1](k[2]*lambda^2-2*k[2]-2))+(-lambda*lambda(lambda*alpha[1]*k[1]+alpha[2](k[1]*lambda^2-2*k[1]-2))^2+lambda)*k[2](lambda*alpha[1]*k[1]+alpha[2](k[1]*lambda^2-2*k[1]-2))-k[1]*(-alpha[1]+lambda*alpha[2])*lambda(2+5*k[2])^2+lambda^5*alpha[2]*k[1]*k[2]-alpha[1]*k[1]*lambda^4*k[2]-2*lambda^3*alpha[2]*k[2]+(2*k[1]+2*alpha[1]*k[2])*lambda^2+(4*alpha[2]*(1+k[2])*k[1]+4*alpha[2]+4*k[2]*alpha[2]+2)*lambda-(4*(1+k[1]))*(alpha[1]+alpha[1]*k[2]+1/2))*x

 

I am looking to simplify this long term...

could you help me please to find a solution for this issue...

I would like to thank you in advance

Best regards,

D.L.

Hi,

1-Triying to plot a function divided by its maximum value,sometimes it works with some parameters that means, the max.value of the plot is 1.

But when i change the data the max. value in the plot in graeter than 1 which is wrong!! should be 1.

dont know why??

2- Changing different data in the parameters, the programme takes long long time then i stop it?

 

please help me with these two problems.


restart:
>
------------------------- Defining the nature of the variables used ----------------------
assume(T,real):Digits:=25:n:=1:tau:=Pi:
theta:=0:phi:=0:
lambda:=n;Omega:=1:Gamma:=0.01:
--------------------- Input---------------------------------
1

J1

term1:=(exp((Gamma+I*d)*tau)-1)/(2*(Gamma+I*d)):
Ak1:=d->(exp((Gamma+I*(d+0.5*Omega-2*lambda*k/Gamma))*tau)-1)/(Gamma+I*(d+0.5*Omega-2*lambda*k/Gamma))+(exp((Gamma+I*(d-0.5*Omega+2*lambda*k/Gamma))*tau)-1)/(Gamma+I*(d-0.5*Omega+2*lambda*k/Gamma)):
Ak2:=d->(exp((Gamma+I*(d-0.5*Omega-2*lambda*k/Gamma))*tau)-1)/(Gamma+I*(d-0.5*Omega-2*lambda*k/Gamma))+(exp((Gamma+I*(d+0.5*Omega+2*lambda*k/Gamma))*tau)-1)/(Gamma+I*(d+0.5*Omega+2*lambda*k/Gamma)):
term2:=(evalf(-0.25*sum(BesselJ(k,Omega*Gamma/(4*n))*Ak1(d)+BesselJ(k,-(Omega*Gamma)/(4*n))*Ak2(d),k=0..50))):
J1:=(term1+term2):
J1mod:=(Re(J1))^2+(Im(J1))^2:
###### J2#########################
Ak1:=d->(exp((Gamma+I*(d+0.5*Omega-2*lambda*k/Gamma))*tau)-1)/(Gamma+I*(d+0.5*Omega-2*lambda*k/Gamma))-(exp((Gamma+I*(d-0.5*Omega+2*lambda*k/Gamma))*tau)-1)/(Gamma+I*(d-0.5*Omega+2*lambda*k/Gamma)):
Ak2:=d->(exp((Gamma+I*(d-0.5*Omega-2*lambda*k/Gamma))*tau)-1)/(Gamma+I*(d-0.5*Omega-2*lambda*k/Gamma))-(exp((Gamma+I*(d+0.5*Omega+2*lambda*k/Gamma))*tau)-1)/(Gamma+I*(d+0.5*Omega+2*lambda*k/Gamma)):

J2:=(evalf(-0.25*sum(BesselJ(k,Omega*Gamma/(4*n))*Ak1(d)+BesselJ(k,-Omega*Gamma/(4*n))*Ak2(d),k=0..100))):
######################

J2mod:=(Re(J2))^2+(Im(J2))^2:
J3 same as J1differ in sign
term1:=(exp((Gamma+I*d)*tau)-1)/(2*(Gamma+I*d)):
Ak1:=d->(exp((Gamma+I*(d+0.5*Omega-2*lambda*k/Gamma))*tau)-1)/(Gamma+I*(d+0.5*Omega-2*lambda*k/Gamma))+(exp((Gamma+I*(d-0.5*Omega+2*lambda*k/Gamma))*tau)-1)/(Gamma+I*(d-0.5*Omega+2*lambda*k/Gamma)):
Ak2:=d->(exp((Gamma+I*(d-0.5*Omega-2*lambda*k/Gamma))*tau)-1)/(Gamma+I*(d-0.5*Omega-2*lambda*k/Gamma))+(exp((Gamma+I*(d+0.5*Omega+2*lambda*k/Gamma))*tau)-1)/(Gamma+I*(d+0.5*Omega+2*lambda*k/Gamma)):
term2:=(evalf(0.25*sum(BesselJ(k,Omega*Gamma/(4*n))*Ak1(d)+BesselJ(k,-Omega*Gamma/(4*n))*Ak2(d),k=0..100))):
J3:=term1+term2:
J3mod:=(Re(J3))^2+(Im(J3))^2:
J4 same as J2 but -0.25-->2


J4:=-2*J2:
######################

J4mod:=(Re(J4))^2+(Im(J4))^2:

calculate the spectrum

 

Spec:=d->(exp(-2*Gamma*tau)*(J1mod*cos(theta/2)^2+J2mod+J3mod*sin(theta/2)^2-0.5*Re(J3*J4*sin(theta)*exp(I*phi))+0.5*Re(J1*J4*sin(theta)*exp(-I*phi)))):

with(plots):

tit:=sprintf("l=%g,W=%g,G=%g",lambda,Omega,Gamma):
Smax1:=max(seq(evalf(Spec(d)),d=-100..100)):
plot(evalf(Spec(d)/Smax1),d=-15..15,axes=boxed,title=tit,color=black,font=[2,3,18],thickness=2,tickmarks=[3,3],titlefont=[SYMBOL,14],font=[1,1,18],linestyle=1);

 

 

 

 

I have two equations:

and I need to extract the coefficients of x0 and xp0 (to build a matrix; but that is not the issue). So I use coeffs:

coeffs(op(2,X),x0);

coeffs(op(2,XP),x0);

xp0

While I can live with the first result (for X) (not that I like it), the fact that the 2nd one (for XP) has a completely different structure prevents any kind of algorithmic extraction of the coefficients (and the second one of course is 0) for further use. I tried the form of coeffs with a third argument (a name which gets the result assigned) but the same result. This example is a real case, obviously a trivial one and others will be much more involved so I really would like this to work. And yes, I did "collect" before using coeffs (not that it was needed here).

Any ideas out there?

Mac Dude.

1 2 3 4 5 6 7 Last Page 3 of 39