Items tagged with variable


How can I produce the same output with something like alphadeg := alpharad * 180/Pi?

T := proc (p, q, R) alpharad = evalf[5](arccos((1/2)*(p^2+R^2-q^2)/(p*R))), alphadeg = 180*evalf[5](arccos((1/2)*(p^2+R^2-q^2)/(p*R)))/Pi end proc;
T(3, 4, 3.75);
           alpharad = 1.2515, alphadeg = 71.70566805

When I try alphadeg = alpharad * 180/Pi I get
Error, illegal use of an object as a name

Thanks! Les

Hi There:

i have big expressions with many variables of the form (say)  Q__T(t). I would like to simplify my visual parsing of them.

I was wondering if there is a way to tell maple to print particular symbols/variables in specific colors (something akin to what the Physics package does). I.e. I would imagine saying something like:

setup_print_color(Q__T(t), "red");

and then every time Q__T(t) would come up, it would be printed in my desired color.

is this easily possible? I've looked through docs and this site, but can't find any info.





To summarize, I have a variable ε = order(1),  which maple has assumed is a funtion ε(x,y,z) and so when I differentiate epsilon with respect to x (or y or z) I do not get 0. I get ε(or εy, εz). How do I ensure maple does not assume this?

More detail of my process:

I declare functions,

I have the function I want to transform,

Now I transform the variables to the new co-ordinate system. i.e. from (x,n,q) to (s,Y,z)


Good! - Everything correct so far. 

Now I want to linearise so i introduce x=x0+ε*x1; and the same for (Y,z), 


As you can see, epsilon has derivatives, which it should not. 

How I can avoid this? 

Thanks in advance - im well and truely stumped over this.

P.s. if the images do not show, the script can be found here: 

Already searched and browsed multiple different threads and still cannot find a solution.

Apologizing the noob nature of this question.



In this code below, Why is the factor command not working?

f := a^2+x^2-2*ax;














Does anyone know what the default function is for the pre-subscript and pre-superscript?  I would like to use them for a variable name to represent the local reference frame and global reference frame in my multibody calculations.  Thanks

Hello people in mapleprimes,

I have a question:
What are you doing when you use maple in calculating, for example, your paper,
to avoid missing, for example, variables you use, or for your needs to look back the outcomes you obtained before?
If this is a paper-using work, on considering what to do next, you will read some pieces of papers you wrote and
on which you had calculated and obtained necessary equations. But, with small monitor 13 inch, and with
inconvenience of dealing with things in PC, compared with papers, I feel some stress in using maple in writing a paper.
So, now, I am asking you what kind of methods you has devised to make what you are writing compact and easy,
for you to handle with what you are writing.

I know surely that there are the document block, which enables output or input to not be shown, the workbook,
which is helpful in putting attached worksheets or jpg files together at one workbook, and the distinction of ":" and ";",
which in the case of the former, hides expressions in the outcome.

But, yet, I want to ask you about the ways you use to make it easy to write something.
If you have some, I will be very glad if you show it here.

Best wishes.









In some trigonometric equations, I have variables depending of time like Psi(t). I don't why after some manipulation my variable is transformed in :-Psi(t).

Have some ideas why some variables can be change with :- before ?

Here an example

It may come because of the code "Local Psi". I added this because it seemed to me that Psi was protected. Do I right? If not can I remove Local Psi?

Thanks a lot for your help


It might be very silly question, but i dont know why it is not working out. So here is the question. In the attached maple shhet when i am trying to substitute eta(t)=epsilon*z(t) then it is not making that susbtitution for differential operator. Apart from that when i m collecting epsilon terms then also it not collecting





My teacher (im studing Technology Management and Marine engineering) only allow that we use maple if we display the results between calculations. Is that posible:


a := 4;

b := 5;

Instead of :


I want it displayed as:

a+b= 4+5= 9;

or just

4+5 = 9; where a and b are Automatically replaced with the respective values, when i run the !!! button


A lot of my calculations are done by defining the variables in the top. 

Any ideas??


Thanks in advance.


Best regards  Carsten Moller





I am using algorithmic variables to generate questions about the greatest common divisor of two integers.

Unforuntately the integers come out as 1,664 instead of simply 1664 (for example). How can I change the format to the simple version ?

Thanks for your help!


I got a set of ecuations to solve, like this one:


a,b,c,d are numbers, like 2.0458 and so on.


When I want to solve the set, I need to tell Maple the command solve:

solve( {seq(eq[i],i=1..N)},{variables});  (N is an integer of course)


To set the variables, one must check each equation to write: {W[1,0],HRa[1,0],ga[1,0]...} and so on.

I know that I can use the command is(variable,assignable) to check if a variable has not a value assigned already and, according to true/false I can construct the set {variables} and solve the set of equations.

That´s an easy solution if I need to check variables under a certain pattern, like: X[1].X[2],X[3] since I can create a loop and check them one after the other. But my problem is that I have different names for variables or that variables change to assignable from assigned according to other conditions, so I can never be sure if W[1,0] is going to be a variable to compute in all steps instead of SR[1,1].

for example:

if a>3 then
end if;

So, when I need to type solve, the {variables} part is different according to each case. Is there any command that allow me to insert an expression and Maple can return me the variables or parameters in the expression that are not numeric already?

Thanks in advance.

Dear all

I have problem related to collection of coefficient of differtials in differential expression containing multiple dependent variables and we want to collect coefficient wrt to selected dependent variables. Please see attached Maple file for details.



DepVars := [u(x, t), v(x, t), a[1](t), a[2](t), a[3](t), b[1](t), b[2](t), b[3](t), r(x, t), s[1](x, t), p[1](x, t), s[2](x, t), p[2](x, t)]

[u(x, t), v(x, t), a[1](t), a[2](t), a[3](t), b[1](t), b[2](t), b[3](t), r(x, t), s[1](x, t), p[1](x, t), s[2](x, t), p[2](x, t)]


alias(u = u(x, t), v = v(x, t), a[1] = a[1](t), a[2] = a[2](t), a[3] = a[3](t), b[1] = b[1](t), b[2] = b[2](t), b[3] = b[3](t), r = r(x, t), s[1] = s[1](x, t), p[1] = p[1](x, t), s[2] = s[2](x, t), p[2] = p[2](x, t))

u, v, a[1], a[2], a[3], b[1], b[2], b[3], r, s[1], p[1], s[2], p[2]


Suppose we differential expression like:

a[1]*(diff(u, x))*s[1]*u-2*a[1]*u*(diff(r, x))*(diff(u, x))+2*a[2]*(diff(v, x))*s[2]*v-2*a[2]*v*(diff(r, x))*(diff(v, x))-(diff(a[3], t))*r*(diff(u, x))/a[3]+diff(p[1], t)+a[3]*(diff(p[1], x, x, x))+(diff(r, t))*(diff(u, x))+(diff(s[1], t))*u-(diff(a[3], t))*s[1]*u/a[3]-s[1]*a[2]*v*(diff(v, x))-(diff(a[3], t))*a[1]*u*(diff(u, x))/a[3]-(diff(a[3], t))*a[2]*v*(diff(v, x))/a[3]-3*(diff(r, x))*p[1]+(diff(a[1], t))*u*(diff(u, x))+(diff(a[2], t))*v*(diff(v, x))+a[2]*(diff(v, x))*p[2]+a[2]*v^2*(diff(s[2], x))+a[2]*v*(diff(p[2], x))+a[1]*u*(diff(p[1], x))+a[1]*(diff(u, x))*p[1]+a[1]*u^2*(diff(s[1], x))+3*a[3]*(diff(s[1], x))*(diff(u, x, x))+3*a[3]*(diff(s[1], x, x))*(diff(u, x))+a[3]*(diff(r, x, x, x))*(diff(u, x))-(diff(a[3], t))*p[1]/a[3]-3*r*(diff(r, x))*(diff(u, x))-3*(diff(r, x))*s[1]*u+a[3]*(diff(s[1], x, x, x))*u+3*a[3]*(diff(r, x, x))*(diff(u, x, x)) = 0

3*a[3]*(diff(diff(r, x), x))*(diff(diff(u, x), x))+3*a[3]*(diff(s[1], x))*(diff(diff(u, x), x))+3*a[3]*(diff(diff(s[1], x), x))*(diff(u, x))+a[3]*(diff(diff(diff(r, x), x), x))*(diff(u, x))+a[3]*(diff(diff(diff(s[1], x), x), x))*u+diff(p[1], t)+(diff(r, t))*(diff(u, x))+(diff(s[1], t))*u-3*(diff(r, x))*p[1]+a[3]*(diff(diff(diff(p[1], x), x), x))-(diff(a[3], t))*a[1]*u*(diff(u, x))/a[3]-(diff(a[3], t))*a[2]*v*(diff(v, x))/a[3]+a[1]*(diff(u, x))*s[1]*u-2*a[1]*u*(diff(r, x))*(diff(u, x))+2*a[2]*(diff(v, x))*s[2]*v-2*a[2]*v*(diff(r, x))*(diff(v, x))-(diff(a[3], t))*r*(diff(u, x))/a[3]-(diff(a[3], t))*s[1]*u/a[3]-s[1]*a[2]*v*(diff(v, x))+(diff(a[1], t))*u*(diff(u, x))+a[1]*u*(diff(p[1], x))+a[2]*v*(diff(p[2], x))+a[2]*v^2*(diff(s[2], x))+a[2]*(diff(v, x))*p[2]+a[1]*(diff(u, x))*p[1]+a[1]*u^2*(diff(s[1], x))-(diff(a[3], t))*p[1]/a[3]-3*r*(diff(r, x))*(diff(u, x))-3*(diff(r, x))*s[1]*u+(diff(a[2], t))*v*(diff(v, x)) = 0


We can collect coefficients of differential like u[x], u[x, x], v[x], u, vin following manner:

The Procedure




Now how can we collect coefficents with respect to u[x], u[x, x], v[x], u, vso that differential expression (3) appear as
"(......)*u+(.......)*v+(......)*u[x]+(........)*uu[x]+(.........)vv[x]+(........)u[xx]  =0....................."????????""




I have written the following coade in Maple:
r := 50;
l1 := 0.2742e-10;
s := I*w;
l := (-1.342110665*10^22*c^2*(Pi^4)-4.225000000*10^25*c^2*(Pi^2)+2.316990000*10^11*c1*(Pi^2)-1)/(-1.342110665*10^22*c^2*c1*(Pi^4)-7.140250000*10^43*c^2*c1*r^2*(Pi^4)+1.957856550*10^33*c^2*(Pi^4)+9.789282750*10^32*c*c1*(Pi^4)-1.690000*10^22*c*(Pi^2)-4.22500*10^21*c1*(Pi^2));
z1 := (c*l1*s^2+1)/(c*s);
z2 := l*s/(c1*l*s^2+1);
h := (z1+2*z2)*((z1+2*r)*(z1+3*z2)/(2*r)-2*z2)/z2-(1/2)*z2*(z1+2*r)*r;
f := h*(z1+3*z2)/z2-(z1+2*r)(2*r)*(z1+3*z2)+2*z2;
gain := 2*z2/f;
a := abs(gain);
d := diff(a, w);
s := subs(w = 2*pi*0.325e11, d)
Now, I have a function named "s" which I want to set to zero, and calculate the relationship between variables c & c1 in order to achieve this. How should it be done?

Hi, does anyone know how to choose the variables that populate the DAE Variables box when you use "equation extraction"?

I want the result to be in terms of the voltage source and the voltage drop across the capacitor for a RLC circuit.  I want to be able to choose the input-output variables for the final equation.



I try to make a question with an equation with numbered variables. This works fine when evaluating:


I need to have the lefthand variable indexed also like this:


When entering y2=x1/x2 as the answer Maple TA won't evaluate it as a correct answer!?

1 2 3 4 5 6 7 Page 1 of 7