MaplePrimes Questions

The following construction of a simple vector of matrices (just a test example)

Vector(2,(a) -> Matrix(2,2,(b,c) -> m||a||b||c));

works in Maple 17, but not in Maple 2017 where the error message "Error, (in Vector[column]) number of elements on right side must match subselection on left side" is produced. Why that?

Update: If no output is prompted, i.e., if the above line is terminated with colon instead of semicolon, then no error is raised. What?!

Hi;
what's the difference between "assuming" and "assume" commands in maple? tell me this problem with example. Thanks.
with regards...

 I'm thinking upload a technical paper into maple cloud, and i would like to keep the intellectual property of this paper or have a mention from the reader if they use it. Is it possible?. Thanks!

I have a parametric equation which want to solve it , but maple does not .

problem.mw

 best regards

Hi guyz,

I have a trouble in expanding the function "p" with respect to "b<<1". After expansion I would like wirite terms with respect to orders of "b". I know the procedure but I can't unfortunately do that for this case. can u give any help?

 

 

 

 

prob.mw

hi

i want to solve a function which contains below series, but I can't.

SS:=sum(F[k-m]*sum(F[m-L]*sum(F[L-j]*F[j],j=0..L),L=0..m),m=0..k);

or

SS:sum(F[k-m],m=0..k)*sum(F[m-L],L=0..m)*sum(F[L-j]*F[j],j=0..L);

eq:=(-1/(k+1))*(F[k]+0.5*sum((k-m+1)*F[k-m+1]*F[m],m=0..k)+0.05*SS);

n:=8;
for k from 0 to n do
F[k+1]:=solve(eq);
end do;

with the first SS I have gotten a wrong nswer and with the second SS this error has been seen:

Error, (in solve) cannot solve expressions with sum(F[L-j]*F[j], j = 0 .. L) for F[j]

is there qny one hepl me please.

thanks

Why Maple18 cannot solve the system p=(w^2+v*w)/(1-2*u-w) & q=u+w & r=w symbolically by using command

solve({p=(w^2+v*w)/(1-2*u-w),q=u+w,r=w},{u,v,w})? It responds with an error message.

int(ln(x)^n,x)  just returns the integral

Mathematica gives

What other interventions are required to get Maple to produce an answer?

 

I have the following expression

((4*(N-i+2))*((N-i-2)*(-(N-i-4)*(N+i+2)*(N+2)*(N+4)+N^4+4*N^3+4*N^2+16*N-40)-(4*(N-1))*(2*N+3)*(N+5))+(8*(N+5))*(N^2+8*N+6))/((N-i+1)*(N-i+3)*((N-i-2)*(i+3)*(N+2)*(N+4)-(8*(N+5))*(N-1)))

The parameters i and N are nonnegative integers and i is less than or equal to N. The purpose is to make it as short as possible. Based on my experience, it could be expressed as a small binomial expression or as a sum of two or three binomials. However, by Maple commands the conversion does not give me binomials or any smaller expression.

Is there any way for the conversion to binomials or any other conversion to shorten the expression?

I appreciate any help.

I'm having a trouble with this trivial code in Maple. The output is, well, ... stupid ! I'm askingMaple to do a vectorial sum and substraction of 5 cross products, and what I get is silly : a sum of vectors, but it doesn't give the total vector ! What the hell !?

with(linalg):
with(DEtools):

ly := 9.4607*10^15:
M0 := 1.99*10^30:

M1 := 2.20*M0:
M2 := 2.00*M0:
M3 := 1.50*M0:
M4 := 3.00*M0:

r1 := [-3, 3, 0]*ly:
r2 := [0, -2, 0]*ly:
r3 := [1, 2, 0]*ly:
r4 := [6, 4, 0]*ly:

v1 := [25, 15, 0]*10^3:
v2 := [20, -20, 0]*10^3:
v3 := [-5, -25, 0]*10^3:
v4 := [15, 0, 0]*10^3:

Mtot := M1 + M2 + M3 + M4:

rcm := (M1*r1 + M2*r2 + M3*r3 + M4*r4)/Mtot:
vcm := (M1*v1 + M2*v2 + M3*v3 + M4*v4)/Mtot:

Ltot := crossprod(r1, M1*v1) + crossprod(r2, M2*v2) + crossprod(r3, M3*v3) + crossprod(r4, M4*v4) - crossprod(rcm, Mtot*vcm);

I have done other codes with vectors like these, using the crossprod command, and they are all working great.  So I don't understand what is going on here.  I'm using Maple 13.

I'm not a strong user of Maple, so I may have done a simple mistake somewhere, but I really don't see what and where. So what is wrong with this Maple code ?

Hi, I'm trying to display a rotation matrix, but due to the interaction with the explore controls and the working numerical precision for the controls / trig terms, I'm getting displays like

1.0  0.0

0.0  -2*10^-10

What I'd like is for the -2*10^-10 to be displayed in decimal format (by default) and therefore would be displayed as 0.0.

So is there a way to control the display formatting of:

x := cos(Pi/(2.0));

so that it displays 0.0 instead of -2*10^-10?

I realise that Increasing the Digits increases the precision, but this simply increases the magnitude of the exponent and I can't simply use x := cos(Pi/(2)), because of the interaction with the explore controls.

Thanks.

I have a code that outputs a long string of mathematics after various string replacements which I save into a file in the format of a Python function. Here is the code (for a 1 x 1 matrix):

restart:
Size:=1:
## This is the matrix which is generated in a string format
mat1:="Matrix(1, 1, [[-1/2*(A^8*hh*m3+6*A^7*B*hh*m3-2*A^7*hh*m3*z3+16*A^6*B^2*hh*m3-14*A^6*B]])":
## Open up file
filename2:=fopen(cat("Matrix", Size, "x", Size,"HH.py"),WRITE,TEXT): 

## Format file
fprintf(filename2,"import numpy as np\ndef myfuncHH(A,B):\n    z3 = 2\n    m3 = float('inf')\n    Mat_size = %a", Size): 
fprintf(filename2,"\n    arr = np.array([%a",mat1): 
fprintf(filename2,"],dtype=np.float64)"): 
fprintf(filename2,"\n    shape = ( Mat_size, Mat_size )\n    HH=arr.reshape( shape )\n    return HH"):
fclose(filename2):


This generates almost the exact output that is required:

 

import numpy as np
def myfuncHH(A,B):
    z3 = 2
    m3 = float('inf')
    Mat_size = 1
    arr = np.array(["Matrix(1, 1, [[-1/2*(A^8*hh*m3+6*A^7*B*hh*m3-2*A^7*hh*m3*z3+16*A^6*B^2*hh*m3-14*A^6*B]])"],dtype=np.float64)
    shape = ( Mat_size, Mat_size )
    HH=arr.reshape( shape )
    return HH

The part I want to remove is the "Matrix(1, 1, [   "Maths in here"   ])"]

 

I can use stringtools to tidy up most of this, but I am having trouble getting rid of the quotes of the string itself. I have tried escaping them and that does nothing. Is there a simple way to do this or will a regex have to be made?

 

- Yeti

Suppose Delta:=f(a,b)x^2+g(a,b)x+h(a,b), where f,g,h are functions of a and b. Is there a way to find conditions on a,b such that Delta is positive?

i want to solve this DAE system usin Dsolve , but i obtain this error message (cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up), if anyone can help me ,

I am trying to export a number of matrices from maple to matlab with meaningful names.

For instance with this code:
legend := ["ini_que", "ini_que_A", "ini_que_B"];
ExportMatrix("test.mat", [r_mean_Q_ini, r_mean_Q_ini_A, r_mean_Q_ini_B], arraynames = legend, target = MATLAB);

The problem is when I open the resulting file in either python or matlab, I only get  the matrices with names "ini_que" and "ini_que_". My guess is that  long strings in arraynames are truncated and only one of the options are kept.

Is this the case and can the maximum length of the name of the matrix be changed? Or is the only way to use shorter but less readable names?

First 850 851 852 853 854 855 856 Last Page 852 of 2308