Items tagged with assignment assignment Tagged Items Feed

Is it possible to have an input box, where the student can give an input (integer) and this is then used in the following questions in an assignment?

e.g. in the first question the student is asked to give his student number, in the second question this number is used to create random parameters.

In Maple TA in blackboard I am creating an assignment. Each week a part of the assignment will be posted. I was wondering if it is possible to have the same random variables in differnet assignmemts. That way the students can use their prior work. 

So in week one the students will get a set of random variables. But in week two a new assignment is posted were I want the same variables to come up for each student. Is this possible? (all students will have their own unique set of variables)


Following situation: I have Records with several members. These members in turn have varied expressions assigned to them: some have numbers, one has a Matrix, some have formulae. Example:

q:=Record(l=len,k1=kl/len,R=(a 6x6 Matrix dependent on len and kl/len));

I want to be able to use the limit command on each of the members of q such that each member gets assigned the correct limit of its expression. I.e. I want to write a function limit2 such that



Record(l=0,k1=infinity,R=(limit~(the Matrix,len=0))

The trick here is that the members of the Record vary for different Records but I want to write a function limit2 that works for all of these. I can make a list of the members by using exports(q) like this:


and after some fiddling I found that I can run limit on each member in turn:

for nam in exlist do
end do;

What I have not been able to do is putting the result back into the member of the Record. Usually I would use assign for such a task, but I am unable to get the correct name on the left side that lets me assign to it. These names would of course be q:-l, q:-k1 and q:-R in the above example. I tried the parse(cat(...)) construct above and variations, but in the best case the assignment does not happen, in worse cases I get an error thrown. Never do I get the actual assignment.

Any hint how to do this?



PS: FWIW, I am doing this on Mape 15.


But I have not found how to do it.

I'd like to tell a new worksheet to use assignments created in another document. This is to save time retyping equations.

And, is this something that others like to do ?



Cheers !



  I have the following code for using "PolynomialSystem" solve equations of polynomial




f:=PolynomialSystem({x+y-3, x^2+y^2-5}, {x, y}):




The output is


x, y
{x = 2, y = 1}, {x = 1, y = 2}
{x = 2, y = 1}
{x = 1, y = 2}
x = 2
y = 1
x = 2, y = 1
-x = -2.
-y = -1.


From what I have seen, I cannot subtract the values of x and y as 2 and 1. Is there any way that I can get the values of solutions of variables, namely I can assign a variable "a" as 2, and the other variable "b" as 1?


Thank you very much!






Maple 15 allows the following syntax

omega := sqrt(w0^2*(1+((z-zf)/z0)^2))

But it does not allow this one 

omega^2 := sqrt(w0^2*(1+((z-zf)/z0)^2))

Why is this so for functions and variables? Is there any way around this, I am really bugged by this issue. The Maple Math told me that the syntax was invalid so I had type the commands directly.


This seems such a simple/basic question I'm almost too embarassed to ask.

Anyway. this is causing me some headaches


> A := <0|0>;

         A:= [0 0 ]

> B := A:

> A(1,1) := 2 ;

         A:= [2 0 ]

> B;

         B:= [2 0 ]

What do I do to prevent the elements of B changing if A changes, after using the assignment B:=A (or should I not be using this assignment?)  I mean, I would like the same behaviour as 

> a := 0;


> b := a;


> a := 2;


> b;


which seems to work as I "expect"...

It is possible to add groups of questions to an assignment in Maple T.A. But how do you see the grades divided into these groups? As an example, suppose we have two groups of questions say 5 questions in the group "algebra" and 5 questions in the group "geometry". The class grades show the grades for all 10 questions all together, but I would like to see the grades for two groups individually.



I have a vector of lists, and each list is composed of indexed names.  For each list, I would like to assign all the indexed names in the list to the first variable of the list.  Right now, I'm trying to select the entries of the list using the op command and then assign one to the other, and get the following error:

Error, invalid left hand side in assignment


Hello !

I installed Maple 14 on my windows8 computer (with compatibility windows7). My program worked the 2 first times, and suddently it bugged on the third, though I changed NOTHING.

It puts me an "Error: recursive assignment". The concerned line is: 

if a < 2 then broSet := broSet union {[param[1, j], param[2, i]]} fi:

There should be no problem.

Does anyone have any idea ?



Long story short I had a detailed question and then the session timed out and killed it!

Quickly then, if we calculate something recursively Maple acts differently to other languages.

For example, in Python:




>>>print t;


Is interpreted as:




>>>print t



In Maple:






Is Interpreted as:




>print(t); t=t+1=1+1=2


And there in lies my problem. Logically, I wish to use a iterative algorithm to work out an expression of the nth derivative of a function from the (n-1) derivative. However, doing this is in maple brings up "error (in Test) too many levels of recursion".


For context, Minimum Working Example:








>for i from 1 to 50 do




Error, (in TestDerivative) too many levels of recursion


Ideally, this code would output the limit of the second derivative at zero by differentiating the first derivative and then the limit of the third derivative at zero by differentiating the second derivative etc. But what Maple is trying to do is to find the limit of the second derivative by differentiating the function then differentiating the result of that, then to find the limit of the third derivative it will first derivative by differentiate the function, then the second by differentiating the result, then third derivative by differentiating the result of that. If I have the analytic expression for the 5th derivative and I wanted the expression for the 6th derivative, I do not want to work out the 1st, 2nd, 3rd, 4th and then 5th derivative when I've already an of the expression of the 5th derivative!

I will note, it is possible to avoid the problem by using different names at each step but that does not solve the iterative problem.  Is there anyway to force maple to overwrite a function name? Is there a seperate solution? Or is maple just that daft in this case?


Thanks for the help,


Hello All,

I have had a few questions that have come up while working on a Maple Assignment for my Calculus III class. I was wondering if anybody could help me with these questions, as well as show me how to enter them in Maple. Here are the questions I have been struggling with.


  1. In the xy-plane, graph the ellipse ((x-4)^2)/(4))+(y-4)^2=1 and two level curves of F(x,y)=x^3+y^3-3xy that just touch the ellipse.

                  a. What do we know about the gradients of F and the ellipse at those points?

                  b. Use your graph to approximate the minimum and maximum values of F subject to the constraint ((x-4)^2)/(4))+  (y-4)^2=1.


      2. A company manufactures a product using inputs x,y,z according to the production function Q(x,y,z)=20x^(1/2)y^(1/4)z^(2/5). The prices per unit are $7 for x, $12 for y, and $18 for z.

                 a. Create the cost function

                 b. The company wants to produce 2500 products. Estimate the minimum cost by using the graph of the level surfaces of the cost function (from part a) together with the production constraint.

Any help you could give me would be much appreciated. Thanks!!




part of my codes are:
func[1] := (1/2)*(c+s)*x[1]+s*x[3]+(s-c)*x[1]*x[2];
func[2] := (1/2)*(c-s)*x[1]+s*x[3]+(s+c)*x[1]*x[2];
func[3] := -b*x[2]-x[1]^2;
They are just three ODE , how to fix the error?Where is the so-called recursive assignment...?
The program works well when:
"func[1] := x[2] + (x[1]^2 - x[1]*x[3]);
func[2] := - x[1] +  (x[2]^2 + x[1]*x[4]) + x[2]^3;
I've tried all sorts of different assignments for a,b and c but all still give me an error 
for root 2. 
have tried posint, int, nonnegative, positve but none work 
any help would be appreciated. 
if (a+b) > c then print (a,b,c,`are lengths of a triangle`)
#this is according to the triangle inequality theorem
elif (a+b) < c then print ...

I have a set of equations

1 2 3 Page 1 of 3