MaplePrimes Questions

Hi, 

As an example, I have these 3 equations below and I need to balance them similar to balancing a chemical equation.

Equation 1: E1=A+B+C+D
Equation 2: E2=A-B+C-D
Equation 3: E3=C

So, I am wondering if there are any functions or algorithms that allow me to input such that they will give me a result of 

xE1 ± yE2 ± zE3 = wA

where w,x,y &z are integers and x,y & z can be zero. 

Thanks.

Ho do I print this?

A - lambdaI = some matrix

On the left of the equation I have the letter "A" a minus sign, the Greek letter "lambda" and the letter "I" right next to it.
The rest. from "=" on, is math.

Thank you!

mapleatha

I'm trying to create the set of monomials in n variables (given as a list var), up to a given degree d. Her eis my code. Any comments to make it better?

mondeg:=proc(var::list,d)
local n, mon, moni, i, j, m1, m;

   n:=nops(var);
   mon:={1};
   moni:={1};
   for i to d do
        for m1 in moni do
             #print(m1);
             moni:=moni minus {m1};
             #print(moni);
             for j to n do
                #print(var[j]);
                 m:=m1*var[j];
                 moni:=moni union {m};
                #print("moni=",moni);
             od;
        od;
        mon:=mon union moni;
        #print(mon);
   od;

mon;
end:

Hello everyone,

I know that it is possible to obtain the DH parameters of a robot manipulator model in the MapleSim environment.

I was wondering if it is possible to obtain the Jacobian matrix of a robot manipulator from the MapleSim model?

Thank you,

 

Often after using collect(expression,x) the prefactors of x are within a bracket but typically contain factors in each term of the bracket that are equal and not pulled out of the bracket. Is there a way to ask maple to automatically factor out these after collecting?

I hope it is clear what I mean...

Hi,
Triing to solve some 2 differential equations system (plan mechanical movement), using "output=" as last option, I am interrested by the values of the second derivatives of the coordinates. The "output" runs fine to get t, x(t), y(t), dx/dt(t) and dy/dt(t). To get d^2x/dt^2 and d^2y/dt^2, I thought it would work to write something like (A is the times array) this :

dsol := dsolve(dsys, type = numeric,  {diff(x(t),t,t), diff(y(t),t,t},output = A),

But if I do this, I get next error message :

Error, (in dsolve/numeric/process_input) dependent variables must be functions of a single unknown, the independent variable. Got [diff(diff(x(t), t), t), diff(diff(y(t), t), t)]


Could you please help me ?
Thanks

 

I generated a few plots using the plot command. When I try to animate them using the display command, only the first plot appears and not the rest. I can't figure out what the problem is. Any help is appreciated. I have attached below the commands I am using to generate the plots and animate them:

restart;
with(plots):
with(OrthogonalExpansions):

f := x -> x;
L := 1:
fexplt:=plot(f(x),x=-L..L):
fs := n->FourierSeries(f(x),x=-L..L,n,'Coefficients');
fs(n);
                  n                            
                -----                          
                 \          (1 + i)            
                  )   2 (-1)        sin(Pi i x)
                 /    -------------------------
                -----           Pi i           
                i = 1                          

nmax := 25:

display([seq(plot([f(x),fs(m)],x=-L..L),m=1..5)],insequence=true);
 

If I just use

seq(plot([f(x),fs(m)],x=-L..L),m=1..5);
 

I get all the five plots output to the screen.  So, I know the plots are there. It's the animation part that doesn't seem to work. I am using Maple 2015 on a linux mint desktop.

 

Thanks.

Hello all,

I am looking for a maple command to do the following

#outline of idea, is a user would pre-define a number of rows and a single Matrix command would automatically generate a Matrix based on the data the user provides.

numRows:= ;#user would enter a number here

row1:=[1,2,3];  #user enters data for each row

row2:=[4,5,6,7];

row4:=['red','blue',7];

#user will enter a few more rows to match numRows, specified above

Matrix([[row1],[row2],[row3],....,[rown]]);#this matrix command would be generated based on the above entered data

 

I was thinking some form of counter could do this?  Any suggestions would be appreciated.

Hello everyone,

First I want to thank you for paying attention to my post.

I'm trying to determine the maximum of the following function:

Maple Code:

(1/4)*(-1/4+alpha*(-1+b)*e^2+((1-b)*alpha+(1/4)*b)*e)^2/((-1+e)^2*(b*e-1)*alpha*e*(-1+b))(1/4)*(-1/4+alpha*(-1+b)*e^2+((1-b)*alpha+(1/4)*b)*e)^2/((-1+e)^2*(b*e-1)*alpha*e*(-1+b))

e is my variable and I want to study it in [0,1[. I have a several parameters restriction like b in [0,1[ and alpha>1.

When I value this function for specific values (b=0.1, alpha=4 for instance) I get the equation and its associated graphic representation:

Maple Code:

-0.6944444445e-1*(-1/4-3.6*e^2+3.625000000*e)^2/((-1+e)^2*(.1*e-1)*e)

 

 

I'm only interested in the domain where e is betweeen 0 and 1. I clearly on the graph see that there is a maximum and when 1) I compute roots of the expression I get 2) following solutions:

1)

2) 

    0.9324708634, 0.07447358108, 0.6965691592, 1.345632810, 

      -0.07419084270.

Here: 0.6965691592 corresponds to the maximum I'm looking for.

So now when I try to get a generalization of this function according to my parameters and when I compute the first derivative with respect to e

1)

 

2) 

3)...

the last is very big so I do not write it here.

To sum-up: I see that the solution I'm looking for exists but when it comes to use parameters I cannot define correct roots.

RootOf has the option index=real[i]  for the i-th real root:

evalf([seq(RootOf(x*(x^2-1)*(x^2-4)+1/100, x, index=real[i]), i=1..5)]);
     [-2.000416306, -0.9983310082, -0.002500019532, 1.001664362, 1.999582971]

This option does not seem to be documented. Why? Or, is it?

 

Hi !

I am importing a matrix from a text file. I am using the command,

ImportMatrix("Filelocation/Filename.txt", 'source' = 'delimited', 'delimiter' = " ");

I see the following error:

Error, (in ImportMatrix) cannot interpret file

I think it is because of the huge size.(700 MB, and 28 GB respectively)

How to import such a matrix in maple?

thanks,

I just found that Maple 17 and Maple 16 do not have the option "output=string" in the latex command.

And I need a way to convert the Latex generated to the screen to a string and save it to a variable like I can do with Maple 2017

Here is an example. In current Maple 2017 this works

result_of_int:=int((-5+3*x)^2/(2*x-1)^(7/2),x):
my_latex:= latex(result_of_int,output=string);

But in Maple 16, it gives an error

If I remove the output, then the result is not string.

How to capture the above output which is on the screen and save it as string in a variable?

I do not want to send the output to a file as is. I need to first convert it to a string, and save
it to variable first.

 

 

how do you answer people's questions on here to get the points?

Hello!

I have a problem with solving of my differential equation second order. Whenever I Try to draw a plot of it I have this "Warning, cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up".

All "A", "B", "C", "K" and Vare constants which can be any number except Vwhich is only a positive number.

 

restart;
v[0] := 500; C[0] := 1; B[0] := 1; K[1] := 1; C[1] := 1; K[2] := 1; C[2] := 1; eqn := x(t) = v[0]*t-C[0]*B[0]*K[1]*C[1]*(D(x))(t)*t^2/(1+C[0]*x(t))^2-C[0]*B[0]*K[2]*C[2]*(C[0]*x(t)*((D@@2)(x))(t)-2*C[0]*(D(x))(t)^2)/(1+C[0]*x(t))^3;
sln := dsolve({eqn, x(0) = 0, (D(x))(0) = 500}, numeric);
plots[odeplot](sln, t = 0 .. 1);

I would like to implement a persistent variable inside a procedure. That is:

  1. A variable that is first initialized if it does not exist.
  2. Its value is kept over multiple call of the procedure where it is defined.

As an example, the following procedure counts the number of times it is called:

restart;
CountProc := proc () 
     global m; 
     if `not`(m::integer) then      
          m := 0;
     end if; 
     m := m+1; 
     return m;
end proc;

CountProc(); CountProc(); CountProc();
                               1
                               2
                               3

That’s almost what I need, except the variable "m" should be local instead of global. How to do that?

First 915 916 917 918 919 920 921 Last Page 917 of 2428