# Items tagged with expressionexpression Tagged Items Feed

### what is special about variable y and z? ordering o...

August 17 2016
3 6

I noticed Maple gives different order of term (but still correct) when variable y or z is used, vs. other letters in this computation.

In this example below, integral results are given, using one letter of the alphabet at a time in the integrand.

Only when the variable is y or z, Maple shows expression in different form from all the others (negative sign pulled out). The result are correct ofcourse, but was wondering why this hapens only for these two variables? I would have expected that variable name (letter used) should not make any difference to the final form.

restart;
interface(rtablesize=infinity):
chars:=[seq(parse(StringTools:-Char(i)),i=97..122)]: #generate a..z variables, may be there is better way?
Matrix([seq([chars[i0],simplify(int((c0^2 - c1^2)/(chars[i0] - x0+I*c3), x0))],i0=1..nops(chars))]);

Gives (this below. Notice the very last 2 entries below)

Is this something common in Maple? Does it depend on the computation being performed? Can a user do something to tell Maple not to change order/form of expression depending on what variable letter is used?

### discrete sequence...

August 17 2016
0 3

This sequence has a special name does anyone know what it is? i mean id look it up on oeis but unfortunately the asthetics of their presentation dont meet my strict standards, so yes i did work out an expression for it but if anyone knows the easiest in a singular expression.. very helpful right now.

1, 1, 2, 2, 3, 3, 4, 4, 5, 5

### Issues with differential and D operator...

August 12 2016
1 11

Hi,

I am trying to do a numerical approximate method 'method of multiple scales'. And in doing so I am getting following equation.

 >
 >
 (1)
 >
 (2)
 >

Now I need to substitute x_1(T0,T1,T2)=R(T1,T2)sin(omega*T0+phi(T1,T2)) in the expression and evaluate it.  But on substituting, it is not solving for the 'D' operator. In a similar line if I will have a differential term like

D1(x1)(T0-tau_1,T1,T2) and I have to substitute x1(T0-tau_1,T1,T2) then how can i do it?

Thanks and regards

Sunit

### How do I find everything about an expression?...

August 08 2016
1 5

I know that whattype() is used to find the basic data type of an expression. Unfortunately that information is rarely useful. How can I dig down deeper and get Maple to tell me more about the expression?

I read somewhere that there is a properties() procedure that does that but I cannot find that procedure.

Thanks.

### Adding a term, then subtracting the term....

July 24 2016
0 2

Hello people in mapleprimes,

I have an equation called aa in the following.

alias(&delta;x=dx, &Delta;x=Dx,&Delta;y=Dy,&Delta;z=Dz):
aa:=Dz=f(x+Dx,y+Dy)-f(x,y);

As for modification of this expression, I ask your favor to teach me.

Then, I want to change this aa to D[1](f)(x+theta__1*Dx,y+Dy)*Dx+D[2](f)(x,y+theta__2*Dy)*Dy.

But, to do so, I have to split aa into the one including -f(x,y+Dy)+f(x,y+Dy) between two terms

of aa.

But, as maple cancels these terms, I can't do so. How can I insert two terms, then

obtain the expression  D[1](f)(x+theta__1*Dx,y+Dy)*Dx+D[2](f)(x,y+theta__2*Dy)*Dy?

taro

### Saving the multiple output of an expression withou...

June 23 2016
2 9

Hi, I am new to maple, but I think that my question should be simple.

I have a matrix where each element is an expression. I want to compute the matrix for different constant and to save it without crushing the previous matrix.

If the file that I joined, I have a first part where the constant are defined. In the second part the expression of the matrix is defined. Finally, I compute each matrix with different constant. Each results is called C_p0, C_s0, C_g0. When I called them back, only the last matrix computed remains.

I would like to be able to save each matrix to performed operation on them later.

Thank you.

Forum_Question1.mw

Homogénéisation

 Paramètre des matériaux

Tenseurs Élémentaires

Tenseur de rigidité

Matrice de rigidité

 (1.2.1.1.1)

 (1.2.1.1.2)

 (1.2.1.1.3)

 (1)

### C expression generated on the RHS?...

June 10 2016
1 8

Dear Forum,

I am a new Maple user, and its symbolic prowess is really amazing. So we are trying to interface it with a C library. I want to generate some C code through Maple, and am trying the CodeGeneration package.

But the default conversion of C(a, b) is b = C language equivalent of expression a.

Now this should be fine for most purposes, but the C library that we are working with, "ACADOToolkit" in this case, requires the equations to be formatted in a certain way. So, I need the following equation in C:

f << dot(v) == (u-0.2*v*v)/m

Now the LHS part of == is to be hard-coded, but we want to generate the equation on the right using maple. Even if I define an equation as

eq1:=  and then use C(rhs(eq1)), I get the result in the form of cg = u - 0.2 ...., whereas I want this to be assigned to something else, in this case - "f << dot(v)= ".

How can I achieve this ?

Thanks

Chintan Pathak

Research Scholar,

University of Washington

### How to simplify this expression?...

June 09 2016
0 6

How can I simplify $\sqrt{1−r^2\exp(2i\theta)}$ in Maple. I could do it by hand but I need this type of simplification later for far more complicated expressions.  I allready tried to enter this as a complex number using II, but simplify(...,'symbolic') didn't simplify this expression. Any suggestion?

### Problem with long integrands...

June 09 2016
1 2

While performing integration of some expessions I bumped into a strange problem. My expession consists of quite a lot of terms, but here I present the susbset of only 2. If I integrate it as a whole maple does not want to solve it, and leaves it as there was no closed expression to this integral. But if I split this sum and integrate the parts, it all works fine. What is happening here? What do I miss? I used simplify and allvalues but didn't change a thing...

Is there a way to split my terms into list, integrate one by one and they recreate the solution by summing the parts? Its a bit of a workaround, but surely better that doing it manually (I have around 50 terms). I use Maple 2015

Thanks,

Jeremi

### List of forms of expression under combination of i...

April 28 2016
0 6

Suppose I have a triplet and an expression given as below:

 >

How I can list all possible forms of above expression for triplet etc

Regards

### Problem with applyrule...

April 12 2016
0 3

Hi,

can you please help me with the usage of applyrule? I have the following problem that I cannot isolate. I have a rule that I want to apply, but instead of applying the rule to the expression, the rule seems to be applied to itself. In an isolated worksheet everything is fine:

 > restart;
 > rule:=abs(''a''::algebraic)^2=''a''^2;
 (1)
 >
 (2)
 > applyrule(rule,myexp);
 (3)
 > rule
 (4)
 >

What happens when I try to use this rule in my script is this:

 > restart;
 > rule:=abs(''a''::algebraic)^2=''a''^2;
 (1)
 > applyrule(rule,abs(x)^2)
 (2)
 > rule
 (3)
 >
 >

I want to clarify, that the script that is read before applying those rules does not apply a similar rule. Also the variables rule and x were free. Can you please help me to locate the problem?

Thanks!

Honigmelone

April 01 2016
1 1

Hi all,

I am trying to do some calculation using Maple. I have different expressions containing some power of y. I would like that Maple automatically substitutes y^4 = f(y), in each one of these. So for example, if my expression contains y^5, I want it substituted by y * f(y), and so on. How can I do?

March 25 2016
1 5

Dear All

I want to use subs command to replace products in expression with entries from matrix. When I use "subs" command it returns same result as original without any substitution. But when I use "algsubs", it works fine, but is complicated to apply if there are large number of substitutions.

 >
 (1)
 >
 (2)
 >
 (3)
 >
 (4)

Why this command subs in not replacing  products   from matrix (1)?????

 >
 (5)

It worked !!!! But If I try "algsubs" like :

 >

See it is giving error !!! but still I can use "algsubs" as follow:

 >
 (6)

But this procedure is complex, I want to use "subs" only. I know it complexity of terms in (3) might me creating problem.

 >
 (7)
 >

Regards

### How to form list of op results?...

March 16 2016
0 2

2*t*exp(t) + 2*t

would like to apply op recurively

and output list

[2,t,exp(t),2,t]

### How can I get result of real part?...

March 02 2016
0 8

Hi all!

as shown below, how can get a result without 'R':

p_com(z,t):=Re(exp(I*omega*t-I*k*(lambda[r]+I*lambda[i])*z)) assuming omega::real,t::real,k::real,lambda[r]::real,lambda[i]::real,z::real

Thanks very much!

 1 2 3 4 5 6 7 Last Page 1 of 11
﻿