Maple 2016 Questions and Posts

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

Can someone help with the simplification of the result of this code? I am sure the "qs" in the final result should not appear.

Thanking you in anticipation of your positive responses

#k=1
restart:
P:=sum(a[k]*x^k, k=0..2):
assume(alpha>0,alpha <= 1):
Q:=fracdiff(P,x,alpha);
e1:=simplify(eval(P, x=q))=y[n]:
e2:=simplify(eval(Q,x=q))=f[n]:
e3:=simplify(eval(Q,x=q+h^alpha))=f[n+1]:
var:=seq(a[i], i=0..2):
M:=e||(1..3):

Cc:=eval(<var>, solve(eval({M}),{var}) ):
for i from 1 to 3 do
	a[i-1]:=Cc[i]:
end do:
Cf:=P:
E:=collect(Cf, [y[n], f[n], f[n+1]], recursive):
print():
#y[n+1]=collect(simplify(simplify(expand(eval(Cf,x=q+h^alpha)),size)), [y[n],f[n],f[n+1]], factor);
y[n+1]=simplify(eval(Cf, x=q+h^alpha)):
collect(%, [y[n], f[n], f[n+1]], recursive);

 

Hello,

I have a very simple problem. When Maple displays long outputs I can only see a part of them. Here there is an example

https://www.dropbox.com/s/ymp1vdsg80ewu1s/Untitled.jpeg?dl=0

On my previous versions of Maple I had a slider on the bottom of the page. How can I activate it in Maple 2016?

Thanks, Nicola

Can we use this euler lagrange command for the system of pde's?

If we have a system without lagrangian then euler opertor is applied corresponding to three dependent variables.

so we have three equations but in this euler lagrange command no dependent variable is mentioned.   

I have several functional equations in equally many unknown functions of at least two variables, plus parameters.  ("collect" works just for single equations, right?)

I know that for certain parameter ranges, all the functions involved will be quadratic, and I know some coefficients are zero.  That gives me some  coefficients to determine.  I want to

  1. specify the functional equations [done in a very primitive low-tech way in the attachment, using atomic variables rather than indices ... have I done correctly?!?] 
  2. get Maple to collect coefficients (the K's and the L's in the attachment; the variables are (y,z))
  3. get Maple to state an equation system these coefficients have to satisfy (these will unfortunately be coupled quadratics)
  4. get Maple to solve that equation system if possible, and if not: to tell me when (= for what parameter values, parameters being the "remaining letters" in the attachment) I have specified enough coefficients
  5. in case of a solution, get Maple to tell me which coefficients are real and positive (for those that are solution of quadratic eq's: whether a positive solution exists)

Phew. I am still a complete newbie. Edit: Attachment link: STcoeff2match.mw where the equations themselves are EQ0, EQ1 and EQ2 at the bottom. Copying and pasting them, they look like this (download STcoeff2pastedEQs.mw)

0 = -r__0*(K__011*y^2+K__022*z^2-K__012*(y-L__1)*(z-L__2)-K__01*(y-L__1)+K__02*(z-L__2))+(-2*K__011*y+m__1+K__012*(z-L__2)+K__01)*((2/3)*c__1*y-(4/3)*K__11*y+(2/3)*`K__12 `*(z-L__2)+(20/9)*K__011*y-(10/9)*K__012*(z-L__2)-(10/9)*K__01-(10/9)*m__1-(1/3)*c__2*z+(2/3)*K__22*z-(1/3)*`K__21 `*(y-L__1)-(16/9)*K__022*z+(8/9)*K__012*(y-L__1)-(8/9)*K__02+(8/9)*m__2)+(-2*K__022*z+m__2+K__012*(y-L__1)-K__02)*((2/3)*c__2*z-(4/3)*K__22*z+(2/3)*`K__21 `*(y-L__1)+(20/9)*K__022*z-(10/9)*K__012*(y-L__1)+(10/9)*K__02-(10/9)*m__2-(1/3)*c__1*y+(2/3)*K__11*y-(1/3)*`K__12 `*(z-L__2)-(16/9)*K__011*y+(8/9)*K__012*(z-L__2)+(8/9)*K__01+(8/9)*m__1)+(-(4/3)*K__011*y+(2/3)*K__022*z+(2/3)*K__012*(z-L__2)-(1/3)*K__012*(y-L__1)-(1/3)*m__2+(2/3)*m__1+(1/3)*K__02+(2/3)*K__01)^2+((2/3)*K__011*y-(4/3)*K__022*z-(1/3)*K__012*(z-L__2)+(2/3)*K__012*(y-L__1)+(2/3)*m__2-(1/3)*m__1-(2/3)*K__02-(1/3)*K__01)^2:

``

0 = -r__1*(K__11*y^2-`K__12 `*y*(z-L__2))+`K__12 `*y*((2/3)*c__2*z-(4/3)*K__22*z+(2/3)*`K__21 `*(y-L__1)+(20/9)*K__022*z-(10/9)*K__012*(y-L__1)+(10/9)*K__02-(10/9)*m__2-(1/3)*c__1*y+(2/3)*K__11*y-(1/3)*`K__12 `*(z-L__2)-(16/9)*K__011*y+(8/9)*K__012*(z-L__2)+(8/9)*K__01+(8/9)*m__1)+((2/3)*c__1*y-(4/3)*K__11*y+(2/3)*`K__12 `*(z-L__2)-(1/3)*c__2*z+(2/3)*K__22*z-(1/3)*`K__21 `*(y-L__1)-(10/9)*K__022*z+(5/9)*K__012*(y-L__1)-(5/9)*K__02+(5/9)*m__2+(8/9)*K__011*y-(4/9)*K__012*(z-L__2)-(4/9)*K__01-(4/9)*m__1)^2:

``

0 = -r__2*(K__22*z^2-`K__21 `*(y-L__1)*z)+`K__21 `*z*((2/3)*c__1*y-(4/3)*K__11*y+(2/3)*`K__12 `*(z-L__2)+(20/9)*K__011*y-(10/9)*K__012*(z-L__2)-(10/9)*K__01-(10/9)*m__1-(1/3)*c__2*z+(2/3)*K__22*z-(1/3)*`K__21 `*(y-L__1)-(16/9)*K__022*z+(8/9)*K__012*(y-L__1)-(8/9)*K__02+(8/9)*m__2)+((2/3)*c__2*z-(4/3)*K__22*z+(2/3)*`K__21 `*(y-L__1)-(1/3)*c__1*y+(2/3)*K__11*y-(1/3)*`K__12 `*(z-L__2)-(10/9)*K__011*y+(5/9)*K__012*(z-L__2)+(5/9)*K__01+(5/9)*m__1+(8/9)*K__022*z-(4/9)*K__012*(y-L__1)+(4/9)*K__02-(4/9)*m__2)^2:

``

 

 

restart;
with(PDEtools);
assume(k::real, x::real, omega::real, t::real, theta::real, c::real);
u := phi(c*(t*upsilon+x))*exp(I*(k*x+omega*t+theta));
PDE := proc (u) options operator, arrow; I*(diff(u, t))+diff(u, x, x)-I*sigma*u*(conjugate(u)*(diff(u, x))-u*conjugate(diff(u, x))) end proc;
Eq1 := PDE(u)

Hi everyone.

I am trying to build a package in Maple out of a bunch of procedures that I have. To create the procedures, I write them on a Vim editor, than copy and paste into the Maple worksheet to test. In this way, it works (I end the procedure with ; and then I see all the text in blue and I afterwords test it).

I then gathered these procedures to a module, option package, and I do the same: edit on Vim, copy paste it to Maple worksheet and press enter to see a blue message "module() ... end module" in blue, and then I start playing.

However, I decided to add some more procedures to the module that was working. I have a new procedure that works (meaning when I copy to the worksheet it gives the blue text and I can call normally), but when I copy the contents of this new procedure inside the package, with all the others, and I copy everything to the worksheet, the package now fails to work. It gives a message "Error," in pink, no more text, and that is it. Does this sort of error sound familiar to anyone? Thanks in Advance,

Marcelo

Good day. Please can someone kindly help to reduce the result of this code. Thank you and kind regards

restart:
s:=(sum(a[j]*x^j,j=0..3)+sum(a[j]*exp(-(j-3)*x),j=4..7)):
F:=diff(s,x):
p1:=simplify(eval(s,x=q))=y[n]:
p2:=simplify(eval(F,x=q))=f[n]:
p3:=simplify(eval(F,x=q+h/3))=f[n+1/3]:
p4:=simplify(eval(F,x=q+h))=f[n+1]:
p5:=simplify(eval(F,x=q+5*h/3))=f[n+5/3]:
p6:=simplify(eval(F,x=q+2*h))=f[n+2]:
p7:=simplify(eval(F,x=q+7*h/3))=f[n+7/3]:
p8:=simplify(eval(F,x=q+3*h))=f[n+3]:


vars:= seq(a[i],i=0..7):
Cc:=eval(<vars>, solve({p||(1..8)}, {vars})):
for i from 1 to 8 do
	a[i-1]:=Cc[i]:
end do:
Cf:=s:
L:=collect(simplify(simplify(expand(eval(Cf,x=q+3*h)),size)), [y[n],f[n],f[n+1/3],f[n+1],f[n+5/3],f[n+2],f[n+7/3],f[n+3]], factor):
length(L);
H := ee -> collect(numer(ee),[exp],h->simplify(simplify(h),size))/collect(denom(ee),[exp],h->simplify(simplify(h),size)):
M:=y[n+3]=(H@expand)(L);
length(M);

 

Hi, I've been doing a few small explore plots where the ranges for the parameters are something like [-1,1], but 0 is a special value which will often need to be set.  The slider, gauge components, ... are a bit fiddly to set with exactly zero using a mouse to drag the value.  Thought about a few different ways to do this

* Right click and set value from the component properties option - a bit fiddly for the user and the graph doesn't immediately update when OK'ed.

* Extra control with a tick to set a zero value (fiddly programming and possible confusing interpretation)

* Slider component and snaptoticks=true

Last option seems to be the easiest all round, but I was wondering why it is only the slider component that has a snaptoticks property - none of the other components seem to support it and a gauge would probably be a more natural component to use.

Thanks in advance

For my own use, I am attempting to port Joe Riel’s glyph package for geometric algebra into a module more compatible with recent versions of Maple. To this end, I have been testing individual procedures extracted from the package into Maple 2016, both to understand the algorithms and to check for glitches caused by the code running in more current Maple 2016. The procedure for carrying out the exterior multiplication of blades does not seem to work reliably, and I haven’t the necessary knowledge of Maple language to determine whether this is due to an error on my part or a feature of Maple V that no longer works.  I have attached a worksheet,tablemultiplyexample.mw,  that includes the procedures necessary for the multiplication routine to work, but I can’t get any consistency in the results.  Can anyone advise me what is the problem?  

As I understand the routine, setup defines a anti-symmetric root blade table with an indexing function that precludes assignment to the table. Clifford blades are then represented as indexed variables using the root table. The process is as follows see worksheet for actual code):

initialize := proc ()
 global _e, tableroot;
tableroot := table(antisymmetric, blade);
tableroot[] := 1;
_e := tableroot;
end proc:
#The index function `blade` is as follows:

`index/blade` := proc (Indices, tableau)
 if nargs = 2 then if Indices = [] then 1
          else tableau[op(checkindices(Indices))] end if
elif Indices = [] then tableau[Indices[]] := 1
 else ERROR("cannot assign to a blade", Indices) end if
end proc;

#Exterior multiplication is performed by the following routine.
b_exteriorp := proc (u, v)
option remember;
 if  u = 1 or v = 1 then u*v
else _e[op(u), op(v)] end if
end proc:

As near as I understand, the procedure joins the lists representing the two input blade into a single list that is processed by the antisymmetric indexing function and outputs the indexes as the product blade. I don’t understand how the case of duplicate indexes (which should return 0) is supposed to be handled by the procedure.  What the procedure usually returns is simply the appended list of the two blades without modification by the indexing function.

Can anyone give me a hint about how to fix this procedure?

tablemultiplyexample.mw

Request help in solving the equation:

Eq_H_1 := C[11*m]*(int((t-(j-1)*T)*alpha*(-alpha*(K*T*beta+T*beta*j-K*T-T*beta-T*j-beta*t+T+t))^(-beta/(beta-1))*exp(-R[m]*t), t = (j-1)*T .. (K+j-1)*T))

 

Thanks

So I needed a CAS, and I spent a couple of months trying to get a basic understanding of SymPy and various applications starting with "M". We have Maple version 2016.

My "prototype problem" can be solved by hand, and is a system of quadratic Bellman equations, for i=1,2.  I'll return to it below, as I am obviously too clumsy to get even the second-to-simplest max/min working.  Oh, and I can't even insert Maple Math here in the forum, it does not like maximize or minimize.

Let's start easy. I enter
maximize((b-x)x,x) 
which works as I expect. Then already at
maximize((abs(b)-x)x,x>=0) 
I am stuck. Please, sweet Maple, you know that the answer is the same as before, don't you? (In the meantime I have tried to feed it maximize((b-x)x,x=0..1)... )

I was hoping my "proper" problem should be doable. What I really need is a sequence of quadratic optimization problems, where I have a vector x maximizing b'x-x'Ax subject to linear constraints, so it should not be too hard.  The "prototype problem" I needed for starters, is a system where for i=1,2 I have 

v_i(0,y)=0 and inductively v_i(t+1,y)=max{x_i*(b_i-x_1-x_2)+ r_i v_i(t,y-x)}

where b_i and r_i are constants, x=(x_1,x_2), y=(y_1,y_2), and everything is nonnegative - including, the choice variables x_i must be between 0 and min{y_i, b_i-x_1-x_2}. And I want to plot both functions and the x with time as a slider, but ... I don't think I'll ever get that far? 

Sorry for whining. (I know why I dropped out of computer science.)

Is any package or algorithm which enable me to compute constraint structure of a singular Lagrangian in physical phenomena?

i would be very thankfull if someone help me in thisway please :)

Please can someone help with maple comand to obtain Jacobian elliptic functions particularly in code editing region?

I would like to publish a technical paper about a renewable energy with you. I use Maple 2016. What i need?. Thanks!

Hello!
I have a problem with calculations. I have a worksheet and it calculated on some computer but on another i have an error after each equation. I dont have any idea why. When i click on error i see "Sorry, we do not have specific information about your error. " What can i doo with this?

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