MaplePrimes Questions

When experimenting with Maple 2016.1, I found several issues. One I have seen on MaplePrimes before (regarding "Error, incorrect syntax in parse: `;` unexpected (near 4th character of parsed string)" when evaluating an integral, for example, or trying to plot something), but another I have not seen - it may be related to the previous issue. Below is a document that contains some of the various errors I found. What is going on? It evaluates certain things correctly, but, in the integral, it treats "x^2" like a whole new variable (the integral of x^2 with respect to x from 0 to 2 it says is 2x^2, not 8/3). The same thing results in trying to plot x^2 (not shown), giving the same error if I were to say something like "plot(t,x=0..2)" - it cannot determine the plotting variable.
 

int(x, x = 1 .. 2)`` = 3/2NULL

int(x, x = 0 .. 2) = 2NULL

"(∫)[0]^(Pi)sin(x) ⅆx"Error, incorrect syntax in parse: `;` unexpected (near 4th character of parsed string)"(∫)[0]^Pisin(x) ⅆx"

int(`#msup(mi("x"),mn("2"))`, x = 0 .. 2) = 2*`#msup(mi("x"),mn("2"))`NULL

"(∫)[0]^(2 )(x)^(2) ⅆx"Error, incorrect syntax in parse: `;` unexpected (near 4th character of parsed string)"(∫)[0]^(2 )(x)^2 ⅆx"NULL

int(x*x, x = 0 .. 2) = 8/3``NULL

int(diff(x, x, x), x = 0 .. 2) = 0NULL

``

 

Download bad_maple.mw 

 

Any ideas? Are the two things (the Error, incorrect syntax in parse: `;` unexpected (near 4th character of parsed string) message and the bad integral value) related?

 

How do I create a function from dsolve() result?

For example, dsolve() outputs:

u(t) = u0ea t

then I would like to create function:

u := t → u0ea t

but I want to do it using dsolve() output, not typing it manually. Thanks.

How I can write a procedure with Maple 18 that it receives function f(x) and x=a as inputs, 
then compute f'(a) and shows in output these 2 cases:

1) value f'(a)
2) curves f(x) ,y=f'(a)*(x-a)+f(a) and also the point (a,f'(a)) in a system ?

I have a system of 16 polynomial equations in 15 variables. Independently I know there is at least a one parameter familiy of solutions to this system, so there is reason to think at least two of the equations are redundent. I would like to use Maple to decipher which of the equations are redundent, but I am unsure how to proceed.

So far I have looked at the Groebner package, and it seems like the Reduce and InterReduce commands will be useful. Say I call the set of 16 polynomials X and define a lexicographical order T on the variables. I then ask maple to compute

Reduce(X,X,T)

and receive a list with 7 zeroes and 9 polynomials. What exactly is this telling me? Does this mean that maple has used polynomial division and found that 7 of the equations are redundent?

Thanks for your help!

the expression

sN=a1+a2+...+aN

for k from 1 to N do

psum=psum+a(n);

end do;

s[k]:=psum;

end do:

 

how do we transform this using only one loop?

 

thanks

minimize((x+y)^2+cos(y)^2, x=-4..4, y=-2..2);  # cos(2)^2    should be 0
minimize((x+y)^2+cos(y), x=-4..4, y=-4..4);      
  
Error, (in unknown) mapped procedure in `ormap' must return true or false
minimize((x+y)^2+cos(y));                                   # infinity   ?!  should be -1

Edited. Corrected second example

Hello there! Maple 2016.1 sometimes gets crasy about parsing input strings. I managed to capture this behaviour in the attached file. It looks like below. I am not sure what exactly triggers it. It just starts happening all of a sudden. What might be the cause...? 

 

"1 Pi"

Error, incorrect syntax in parse: `;` unexpected (near 4th character of parsed string)

"1 Pi"

 

"Pi/(2)"

Error, invalid semantics "π"

"Pi/2"

 

"1"

Error, incorrect syntax in parse: `;` unexpected (near 4th character of parsed string)

"1"

 

``

 

Download test.mw

Dear All


As a result of certain computation, Maple produce following result:

exp(epsilon[10])*a[2]*epsilon[6]*epsilon[9]^2/exp(epsilon[3]):

How can I force Maple to produce result like:

exp(epsilon[10]-epsilon[3])*a[2]*epsilon[6]*epsilon[9]^2:

Similar to this; Maple produce result:

(exp(epsilon[10]))^2*a[1]:

How I can force Maple to produce it like:

exp(2*epsilon[10])*a[1]:

As an example; I need to simplify following expression in manner as described above

-exp(epsilon[10])*a[2]*epsilon[6]*epsilon[9]*epsilon[2]/exp(epsilon[3])-2*a[10]*epsilon[7]*epsilon[9]-a[10]*epsilon[7]*epsilon[2]-a[3]*epsilon[9]^2*epsilon[11]-a[3]*epsilon[11]*epsilon[5]+exp(epsilon[10])*a[7]*epsilon[2]+a[10]*epsilon[6]*epsilon[4]-2*a[3]*epsilon[6]*epsilon[4]+(exp(epsilon[10]))^2*a[1]/exp(epsilon[3])+exp(epsilon[3])*a[11]*epsilon[9]^2+exp(epsilon[3])*a[11]*epsilon[5]+2*exp(epsilon[10])*a[7]*epsilon[9]-(exp(epsilon[10]))^2*a[5]*epsilon[11]/(exp(epsilon[3]))^2-exp(epsilon[10])*a[2]*epsilon[7]/exp(epsilon[3])-2*exp(epsilon[10])*a[9]*epsilon[7]/exp(epsilon[3])+a[10]*epsilon[6]*epsilon[8]*epsilon[2]-a[3]*epsilon[11]*epsilon[9]*epsilon[2]-2*a[3]*epsilon[6]*epsilon[8]*epsilon[2]+2*a[10]*epsilon[6]*epsilon[8]*epsilon[9]-4*a[3]*epsilon[6]*epsilon[8]*epsilon[9]-(exp(epsilon[10]))^3*a[4]*epsilon[6]/(exp(epsilon[3]))^3+(exp(epsilon[3]))^2*a[6]*epsilon[4]/exp(epsilon[10])+exp(epsilon[3])*a[11]*epsilon[9]*epsilon[2]-2*a[10]*epsilon[1]+a[3]*epsilon[1]-2*exp(epsilon[10])*a[9]*epsilon[11]*epsilon[9]/exp(epsilon[3])-(exp(epsilon[10]))^2*a[8]*epsilon[6]*epsilon[2]/(exp(epsilon[3]))^2-exp(epsilon[10])*a[9]*epsilon[11]*epsilon[2]/exp(epsilon[3])-exp(epsilon[10])*a[2]*epsilon[6]*epsilon[9]^2/exp(epsilon[3])+2*(exp(epsilon[3]))^2*a[6]*epsilon[8]*epsilon[9]/exp(epsilon[10])-exp(epsilon[10])*a[2]*epsilon[6]*epsilon[5]/exp(epsilon[3])+(exp(epsilon[3]))^2*a[6]*epsilon[8]*epsilon[2]/exp(epsilon[10])-2*(exp(epsilon[10]))^2*a[8]*epsilon[6]*epsilon[9]/(exp(epsilon[3]))^2


Download Expression.mwExpression.mw

Regards

I have the following command (credit to @Carl Love ), this command will do certain bit shifting with the next block, and the last block will shift with the first block. 

B:= Matrix([[0,0,1,1,0,0,1], [0,0,1,1,1,0,0],[0,1,0,1,0,1,0], [1,0,0,1,1,1,0]]):
Bnew:= copy(B):
Bnew[[4,1,2,3], 3..5]:= B[.., 3..5]:
Bnew; 

May i know any command can help to reverse the shifting position between the block?

for example,

original block  [0,0,1,1,0,0,1], [0,0,1,1,1,0,0],[0,1,0,1,0,1,0], [1,0,0,1,1,1,0]

i need to shift the 3..5 position of block 1 and change to the 5..3 position of block 2. 

Example:

After shifting, 

Bnew=[0,0,1,1,1,0,1],[0,0,0,1,0,0,0],[0,1,1,1,0,1,0],[1,0,0,1,1,1,0]

Any command can help to solve? thank you in advance.

May I know any command can help to random selected a position in a group of bit number then flip that number but with condition after convert to bytes the number cannot be more than 7?

For example,

I have integer 3, i convert to binary become 0000011

then i need a command to random select a position to flip and only one bit can be flipped.

After that the group of flipped number will convert back to decimal, but total value cannot more than 7? any command can solve?  Thank you. 

Hi Maple Primes

I have this parabola -

y2:=6z^2 +z+244;

x2:=9z^2+3z+367;

I use the eliminate command to write without z;

c:=eliminate([y=y2,x=x2],z);

Then I have the expression

e2 = 4x^2-12xy+9y^2-7x+9y+369.

My questions is, what integer values for x and y are on the curve e2?

I think the answer may be exactly when z is an integer.

How could I determine this given only e2?

Regards,
Matt

Hello,

How can I get the minimum point of (sin(x+y))

plot3d(sin(x+y), x=-1..1, y=-1..1);

 

Hi,

I would like to plot a cone where I can change the vertex angle directly. I would also to be able to change the size of the cone. I have tried:

cone([r*cos(phi)*sin(theta), r*sin(phi)*sin(theta), r*cos(theta)], phi = 0 .. 2*Pi, r = 0 .. 1, theta = (1/6)*Pi, coords = spherical)

but this gives me the following error:

Error, (in plot3d) unexpected options: [[r*cos(phi)*sin(theta), r*sin(phi)*sin(theta), r*cos(theta)], phi = 0 .. 2*Pi, r = 0 .. 1, theta = (1/6)*Pi]

Thanks!

Hello

I would like to know if it is possible to change the color for the result from blue to black or red. Maybe by editing the text that state the colors.

And the same goes for the color palette, can I make my own colors in the color palette text. It should work by default.

Regards

Heide

Hi everybody;

In the following attached file, I am trying to solve a system of nonlinear equations with one equality constraint. I have 9 equations and 9 unknowns. Attached file has composed of 3 main parts, first is input data, second is the 9 nonlinear equations from E_1 to E_9 and finally third part is constraint equation called C_1. My unknowns are "phi, theta, p, q, r, T, L, M and N". My question is that: Can Maple solve this problem?? Is there any solution to this problem or I have to change input data?? If Maple can solve this problem, how can I do that?? 

I appreciate your help in advance.

NL.mw

First 1131 1132 1133 1134 1135 1136 1137 Last Page 1133 of 2428