Maple 2015 Questions and Posts

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

I have this sum which should be equal to argument(GAMMA(I*x)) with x>0.

restart;

`assuming`([x*ln(n)-(1/2)*Pi-(sum(arctan(x/k), k = 1 .. n))], [x > 1]);

aG := `assuming`([limit(%, n = infinity)], [x > 1]);

`~`[evalf](eval([aG, argument(GAMMA(I*x))], x = 1))

 

However this limit evaluation is somehow broken in as it always gives some order symbol O(1) etc..

What is happening here?

Hi

I have a Vector of polynomials in x[1] and x[2]; and I want to use coeffs to get the coefficients of bothe elements of the Vector; using the command:

Eq2Coeffs := `~`[coeffs](%, [x[1], x[2]])

bizarely the result i get is something in terms of x[1] and x[2].

Here is the worksheet this problem emerged in, the specific command is 3.8.

Help page says "minus~" is an element-wise operators in Maple
Why this command doesn't return [{1}, {3}] but generates an error ?
[{1, 2}, {2, 3}] minus~ {2};
Error, dimension bounds must be the same for all container objects in an elementwise operation

OK, you can answer I could use  map(u -> u minus {2}, [{1, 2}, {2, 3}]), but it wouldn't explain the reason of the (my?) error.

Thanks in advance

 

 

 

I have two matrices, one of the dimension of solution space that i have been using solve to navigate
this matrix will look something like:

M := matrix([[3, 2, 1], [2, 1, 1],[2, 1, 1]])

and I have another matix of the times that it takes solve to find these regions:

N := matrix([[.2, .4, .8], [.3, .6, .5], [.8, 2.3, 2.6]])

I'd like to find the sets {N[ij]:M[ij]=m for some integer m}; that is I'd like to get all the elements of N on entries of M with the same number so i can start thinking about them statistiaclly.

i.e. for 3 i'd like the list [.2]

      for 2                      [.4 .3 .8]

and so on.
 

I've made a worksheet (updated)in which I'm timing a program (GTS2) because it sometimes takes a long time to run, and I am not interested in timing the cases where it takes an exceptionally long time to run I've created a timer function that runs GTS2 through timelimit.

timelimit(20, GTS2(H, F, Na, Nd))

this should run the function for 20 seconds, and then stop it if it overruns, before returning that the whole function ( GTS2timer2  ) has taken 20 seconds.

On line 3.3 GTStimer2 is run with two sets of inputs which give a runtime >40s. My guess is that the 20+ extra seconds that the operation takes are spent running solve which is called in GTS, and I expect i can solve the problem by putting solve in the timelimit function directly (if i'm wrong about this please tell my why).

My question is why timelimit isn't able to stop GTS after 20 seconds.

EDIT:

Playing around with the worksheet the morning after I made it the case that was running for 40+s is now giving the error

Error, (in factor/diophant) time expired

My guess is that as it is stopping the solve in GTS2  needs a try/catch of its own. Any idea how to make that work? 

I was making a maple worksheet (out of functions from another), when i noticed that  execution groups and new execution groups that i was making were not showing an output.  I'm wondering why this happens, and how it can be fixed.

in more detail there are 4  [> groups of commands, the first two give the correct output when i hit enter, however, if enter is pressed on any group of commands after the second the command wont return the any output.

I believe this is a formatting issue that comes from the way i cut/paste and edited the previous worksheet down to this, but i'd like to understand so i can avoid it happening again.

3d_plot_of_Lie_derivatives_against_Dimensions_of_solutions_timer.mw

Ahh, this is a teathing problem, I had been using writeto so i could store measurements of RAM; this changes the nature of the question.

How do you implement writeto so only some things are sent there? (in the case of this worksheet the output of GTS2usage
 

Dear users!

Hope everyone fine here. I want to compare the coefficients of like power of exponential function in attachemed file. Please see and fix my problem.

Help.mw

WC51 III
Maple 2015

With straight line selected in following plot, I right-click on plot and select Line → Line Width...  In Set line width dialog I toggle line width to 1 and click OK.

I have the changes I want, but if I choose Restart → Execute Worksheet all my changes are lost.  It is often easier to use the Plot Options Toolbar instead of hunting for Maple syntax to make changes in a plot graphic.  I'm wondering if there is a way to "lock" my plot edits so that they won't disappear as I continue working on a Maple worksheet?

restart;
with(plots);
eq1 := -y^3+x^2+x*y-7; eq2 := y = (8/9)*x-2/3;
implicitplot({eq1, eq2}, x = 0 .. 4, y = 0 .. 3, axis = [gridlines = [6, color = "MidnightBlue"]], size = [1/2, 1], axesfont = ["Roman", bold, 10], thickness = 3);





 

Using spacecurve I've created a diagram of two curves in space, they are reflections in the plane x=y (in this diagram they are labeled k[a1]=k[a2]). How can I add the plane to the diagram?

My intuition is to use 3dplot, and then combine them with display. The problem with that is that 3d plot wants a function of the form z=f(x,y) rather than x=y.

(here is the code for the diagram)

spacecurve({[(5*10^(-4)*100)/C[T], 100*10^(-3)/C[T], C[T]], [100*10^(-3)/C[T], (5*10^(-4)*100)/C[T], C[T]]}, C[T] = 10 .. 100, labelfont = [TIMES, 32], axesfont = [TIMES, 32], titlefont = [TIMES, 32], captionfont = [TIMES, 32], labels = [conjugate(k)[a1], conjugate(k)[a2], conjugate(C)[T]], tickmarks = [[0.1e-2 = k[a1], 5*10^(-3) = 5*k[a1], 10^(-2) = 10*k[a1]], [0.1e-2 = k[a1], 5*10^(-3) = 5*k[a1], 10^(-2) = 10*k[a1]], [0 = 0, 10 = (1/10)*C[T], 50 = (1/2)*C[T], 100 = C[T]]], view = [0 .. 0.1e-1, 0 .. 0.1e-1, 0 .. 100])

I have a polynomial in the variables ya[i] and yd[i] where i are integers. I want to divide each of the coefficients by the 'shortest' coeficient. What i mean by that is the coefficient that is going to cause me the least trouble when i later do things with groebner bases of on the coefficients - I expect a good proxy for that is the one that has the smallest number of terms.

For example, for the polynomial:

2*yd[0]*k[a1]*k[d1]*ya[1]+(alpha*C[T]*k[a1]*k[m]-alpha*R[b]*k[a1]*k[d1]-alpha*R[m]*k[a1]*k[d1]-alpha*k[d1]*k[m])*ya[1]-2*k[a1]*k[d1]*yd[1]*yd[0]+(-alpha*C[T]*k[a1]*k[m]+alpha*R[b]*k[a1]*k[d1]+alpha*R[m]*k[a1]*k[d1]+alpha*k[d1]*k[m])*yd[1]

2*k[a1]*k[d1] is the shortest monomial coefficient

 

I have a program that produces lists of polynomails in multiple variables; I want to remove any polynomials that have the variable x[i] where i is a number.

An example list would be:
[
y[a0]-y[d0],
k[d1]*y[a1]-k[d2]*y[d2],
k[d1]*y[a1]*x[1]-k[d2]*y[d2]*x[2],
]
 

I am calling a function (GTS2) multiple times with varying inputs, using the curry function, and i want to record how long/how much RAM the function takes with each input, and put those in seperate matrices that i can plot later
 

Sols3 := proc (H::algebraic, F::(list(algebraic)), i::posint, j::posint) options operator, arrow; GTS2(H, F, i, j) end proc;
n, m := 5, 4;
M=Matrix(n, m, curry(Sols3, H, F))


You can find all the functions required in this worksheet. The curried call to this function is in section 4.

Dear Users!

I am facing problem to compare the coefficient of x^i*y^j for i, j =1..,Equations. Please my effort and fix the problem.

H1 := 3*y^4*a[1]^5*b[1]+6*y^4*a[1]^3*b[1]^3+3*y^4*a[1]*b[1]^5+6*x*y^3*a[1]^5+6*x*y^3*a[1]^4*b[1]+12*x*y^3*a[1]^3*b[1]^2+12*x*y^3*a[1]^2*b[1]^3+6*x*y^3*a[1]*b[1]^4+6*x*y^3*b[1]^5+6*y^3*a[1]^5*b[2]+6*y^3*a[1]^4*a[2]*b[1]+12*y^3*a[1]^3*b[1]^2*b[2]+12*y^3*a[1]^2*a[2]*b[1]^3+6*y^3*a[1]*b[1]^4*b[2]+6*y^3*a[2]*b[1]^5+18*x^2*y^2*a[1]^4+36*x^2*y^2*a[1]^2*b[1]^2+18*x^2*y^2*b[1]^4+18*x*y^2*a[1]^4*a[2]+18*x*y^2*a[1]^4*b[2]+36*x*y^2*a[1]^2*a[2]*b[1]^2+36*x*y^2*a[1]^2*b[1]^2*b[2]+18*x*y^2*a[2]*b[1]^4+18*x*y^2*b[1]^4*b[2]+18*y^2*a[1]^4*a[2]*b[2]+36*y^2*a[1]^2*a[2]*b[1]^2*b[2]+18*y^2*a[2]*b[1]^4*b[2]-5*delta*y^2*a[1]^4-8*delta*y^2*a[1]^3*b[1]-10*delta*y^2*a[1]^2*b[1]^2-8*delta*y^2*a[1]*b[1]^3-5*delta*y^2*b[1]^4+12*x^3*y*a[1]^3+12*x^3*y*a[1]^2*b[1]+12*x^3*y*a[1]*b[1]^2+12*x^3*y*b[1]^3+36*x^2*y*a[1]^3*a[2]+36*x^2*y*a[1]^2*b[1]*b[2]+36*x^2*y*a[1]*a[2]*b[1]^2+36*x^2*y*b[1]^3*b[2]+18*x*y*a[1]^3*a[2]^2+36*x*y*a[1]^3*a[2]*b[2]-18*x*y*a[1]^3*b[2]^2-18*x*y*a[1]^2*a[2]^2*b[1]+36*x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]*b[2]^3-6*x*a[2]^3*b[1]^2-18*x*a[2]^2*b[1]^2*b[2]+18*x*a[2]*b[1]^2*b[2]^2+6*x*b[1]^2*b[2]^3+6*a[1]^2*a[2]^3*b[2]-6*a[1]^2*a[2]*b[2]^3-3*a[1]*a[2]^4*b[1]+18*a[1]*a[2]^2*b[1]*b[2]^2-3*a[1]*b[1]*b[2]^4-6*a[2]^3*b[1]^2*b[2]+6*a[2]*b[1]^2*b[2]^3-10*delta*x^2*a[1]^2-16*delta*x^2*a[1]*b[1]-10*delta*x^2*b[1]^2-16*delta*x*a[1]^2*a[2]-4*delta*x*a[1]^2*b[2]-16*delta*x*a[1]*a[2]*b[1]-16*delta*x*a[1]*b[1]*b[2]-4*delta*x*a[2]*b[1]^2-16*delta*x*b[1]^2*b[2]-5*delta*a[1]^2*a[2]^2-6*delta*a[1]^2*a[2]*b[2]+delta*a[1]^2*b[2]^2-2*delta*a[1]*a[2]^2*b[1]-12*delta*a[1]*a[2]*b[1]*b[2]-2*delta*a[1]*b[1]*b[2]^2+delta*a[2]^2*b[1]^2-6*delta*a[2]*b[1]^2*b[2]-5*delta*b[1]^2*b[2]^2+delta^2*a[1]^2+delta^2*a[1]*b[1]+delta^2*b[1]^2+16*y^2*a[1]^2+48*y^2*a[1]*b[1]+16*y^2*b[1]^2+80*x*y*a[1]+80*x*y*b[1]+32*y*a[1]*a[2]+48*y*a[1]*b[2]+48*y*a[2]*b[1]+32*y*b[1]*b[2]+80*x^2+80*x*a[2]+80*x*b[2]+16*a[2]^2+48*a[2]*b[2]+16*b[2]^2-8*delta;

Equation := 12;

for i from 0 to Equation do;

for j from 0 to Equation do;

C[i, j] := coeff(H1, x^i*y^j) = 0;

end do;

end do;

I got this error
Error, invalid input: coeff received 1, which is not valid for its 2nd argument, x
 

Dear Users!

Hope you would be fine. I want to write an expression in sigma notation which control ny n (any constant >0);
for n =1 expression expand as

E[1]+1

for n =2 expression expand as
E[1]*E[2]*a[12]+E[1]+E[2]+1;

for n =3 expression expand as

E[1]*E[2]*E[3]*a[123]+E[1]*E[2]*a[12]+E[1]*E[3]*a[13]+E[2]*E[3]*a[23]+E[1]+E[2]+E[3]+1;

for n =4 expression expand as

E[1]*E[2]*E[3]*E[4]*c[1234]+E[1]*E[2]*E[3]*a[123]+E[1]*E[2]*E[4]*a[124]+E[1]*E[3]*E[4]*a[134]+E[2]*E[3]*E[4]*a[234]+E[1]*E[2]*a[12]+E[1]*E[3]*a[13]+E[1]*E[4]*a[14]+E[2]*E[3]*a[23]+E[2]*E[4]*a[24]+E[3]*E[4]*a[34]+E[1]+E[2]+E[3]+E[4]+1;

and so on.

I am waiting your kind respons. Thanks

 

Hi everyone, now I try to plot a graph by varying more than one variable. Is it possible to vary for more than one variable at a time (vary the two or more variable at one once) Please anybody can help in this regard?
 

``

``

``

``

w := .572433:

``

for j to nops(N) do sol1 := dsolve([diff(diff(diff(f(eta), eta), eta), eta)+w*x(f(eta)*(diff(diff(f(eta), eta), eta))-(m*m)*(diff(f(eta), eta))-(diff(f(eta), eta))^2) = 0, y*(diff(diff(theta(eta), eta), eta))/(pr*z)-b*f(eta)*(diff(f(eta), eta))*(diff(theta(eta), eta))-b*f(eta)^2*(diff(diff(theta(eta), eta), eta))+f(eta)*(diff(theta(eta), eta)) = 0, f(0) = N[j], (D(f))(0) = 1, (D(f))(20) = 0, theta(0) = 1, theta(20) = 0], numeric, method = bvp); plots[odeplot](sol1, [eta, ((D@@2)(f))(eta)], color = red); plots[odeplot](sol1, color = red); plots[odeplot](sol1, [eta, theta(eta)], color = K[j], linestyle = L[j]); fplt[j] := plots[odeplot](sol1, [eta, f(eta)], color = K[j], axes = boxed, linestyle = L[j]); tplt[j] := plots[odeplot](sol1, [[eta, theta(eta)]], color = K[j], axes = box, linestyle = L[j]) end do:

 

 

sol1(0)

[eta = 0., f(eta) = HFloat(29.999999999999986), diff(f(eta), eta) = HFloat(0.9999999999999996), diff(diff(f(eta), eta), eta) = HFloat(7.515045554999997), theta(eta) = HFloat(0.9999999999999996), diff(theta(eta), eta) = HFloat(-0.42693869190857225)]

(1)

odeplot(sol1, [x, y(x)], -4 .. 4, numpoints = 25)

odeplot(sol1, [1.32156, 5.29387], -4 .. 4, numpoints = 25)

(2)

 

 

``

``

NULL

NULL

NULL

NULL

``


 

Download MHD_cchf.mw
 

``

``

``

``

w := .572433:

``

for j to nops(N) do sol1 := dsolve([diff(diff(diff(f(eta), eta), eta), eta)+w*x(f(eta)*(diff(diff(f(eta), eta), eta))-(m*m)*(diff(f(eta), eta))-(diff(f(eta), eta))^2) = 0, y*(diff(diff(theta(eta), eta), eta))/(pr*z)-b*f(eta)*(diff(f(eta), eta))*(diff(theta(eta), eta))-b*f(eta)^2*(diff(diff(theta(eta), eta), eta))+f(eta)*(diff(theta(eta), eta)) = 0, f(0) = N[j], (D(f))(0) = 1, (D(f))(20) = 0, theta(0) = 1, theta(20) = 0], numeric, method = bvp); plots[odeplot](sol1, [eta, ((D@@2)(f))(eta)], color = red); plots[odeplot](sol1, color = red); plots[odeplot](sol1, [eta, theta(eta)], color = K[j], linestyle = L[j]); fplt[j] := plots[odeplot](sol1, [eta, f(eta)], color = K[j], axes = boxed, linestyle = L[j]); tplt[j] := plots[odeplot](sol1, [[eta, theta(eta)]], color = K[j], axes = box, linestyle = L[j]) end do:

 

 

sol1(0)

[eta = 0., f(eta) = HFloat(29.999999999999986), diff(f(eta), eta) = HFloat(0.9999999999999996), diff(diff(f(eta), eta), eta) = HFloat(7.515045554999997), theta(eta) = HFloat(0.9999999999999996), diff(theta(eta), eta) = HFloat(-0.42693869190857225)]

(1)

odeplot(sol1, [x, y(x)], -4 .. 4, numpoints = 25)

odeplot(sol1, [1.32156, 5.29387], -4 .. 4, numpoints = 25)

(2)

 

 

``

``

NULL

NULL

NULL

NULL

``


 

Download MHD_cchf.mw

 

2 3 4 5 6 7 8 Last Page 4 of 58