## Expression vs Layout Palette...

What is the difference between the Expression Palette and the Layout Palette? First I thought that the Layout Palette is supporting the entering of names with e.g. sub- and superscripts, but I learned (the hard way) that the templates of the Layout Palette are "mathematically active".

What is the meaning of the colours green and violett in both palettes?

## Minimize the length of an expression...

Quite often when i use maple I generate expressions that are of vast length, that with a pen and paper can be reduced in length by carefully factorizing, multiplying out and dividing through.

I am wondering if i am missig somethig- if this is a problem all maple users deal with, or if its just a limitation of the program.

Today, maple generated:

d*B[2211](t)/dt = 2*k[a2]*beta*k[d2]*B[2211]*(alpha*beta*R[b]*k[a1]^2+alpha*beta*R[b]*k[a1]*k[a2]+2*alpha*R[b]*k[a1]*k[d1]+2*alpha*R[b]*k[a1]*k[d2]+alpha*R[b]*k[a2]*k[d1]+alpha*R[b]*k[a2]*k[d2]+beta*k[a1]*k[d1]+beta*k[a1]*k[d2]+k[d1]^2+3*k[d1]*k[d2]+2*k[d2]^2)
/(alpha*beta^2*R[b]*k[a1]^2*k[a2]+alpha*beta^2*R[b]*k[a1]*k[a2]^2+alpha*beta*R[b]*k[a1]^2*k[d1]+alpha*beta*R[b]*k[a1]^2*k[d2]+3*alpha*beta*R[b]*k[a1]*k[a2]*k[d1]+3*alpha*beta*R[b]*k[a1]*k[a2]*k[d2]+alpha*beta*R[b]*k[a2]^2*k[d1]+alpha*beta*R[b]*k[a2]^2*k[d2]+alpha*R[b]*k[a1]*k[d1]^2+3*alpha*R[b]*k[a1]*k[d1]*k[d2]+2*alpha*R[b]*k[a1]*k[d2]^2+2*alpha*R[b]*k[a2]*k[d1]^2+3*alpha*R[b]*k[a2]*k[d1]*k[d2]+alpha*R[b]*k[a2]*k[d2]^2+beta^2*k[a1]*k[a2]*k[d1]+beta^2*k[a1]*k[a2]*k[d2]+2*beta*k[a1]*k[d1]^2+3*beta*k[a1]*k[d1]*k[d2]+beta*k[a1]*k[d2]^2+beta*k[a2]*k[d1]^2+3*beta*k[a2]*k[d1]*k[d2]+2*beta*k[a2]*k[d2]^2+2*k[d1]^3+7*k[d1]^2*k[d2]+7*k[d1]*k[d2]^2+2*k[d2]^3)
+(-2*k[d1]-2*k[d2])*B[2211]
+2*k[d1]*B[2211]*(alpha*beta*R[b]*k[a1]*k[a2]+alpha*beta*R[b]*k[a2]^2+alpha*R[b]*k[a1]*k[d1]+alpha*R[b]*k[a1]*k[d2]+2*alpha*R[b]*k[a2]*k[d1]+2*alpha*R[b]*k[a2]*k[d2]+beta*k[a2]*k[d1]+beta*k[a2]*k[d2]+2*k[d1]^2+3*k[d1]*k[d2]+k[d2]^2)*k[a1]*beta
/(alpha*beta^2*R[b]*k[a1]^2*k[a2]+alpha*beta^2*R[b]*k[a1]*k[a2]^2+alpha*beta*R[b]*k[a1]^2*k[d1]+alpha*beta*R[b]*k[a1]^2*k[d2]+3*alpha*beta*R[b]*k[a1]*k[a2]*k[d1]+3*alpha*beta*R[b]*k[a1]*k[a2]*k[d2]+alpha*beta*R[b]*k[a2]^2*k[d1]+alpha*beta*R[b]*k[a2]^2*k[d2]+alpha*R[b]*k[a1]*k[d1]^2+3*alpha*R[b]*k[a1]*k[d1]*k[d2]+2*alpha*R[b]*k[a1]*k[d2]^2+2*alpha*R[b]*k[a2]*k[d1]^2+3*alpha*R[b]*k[a2]*k[d1]*k[d2]+alpha*R[b]*k[a2]*k[d2]^2+beta^2*k[a1]*k[a2]*k[d1]+beta^2*k[a1]*k[a2]*k[d2]+2*beta*k[a1]*k[d1]^2+3*beta*k[a1]*k[d1]*k[d2]+beta*k[a1]*k[d2]^2+beta*k[a2]*k[d1]^2+3*beta*k[a2]*k[d1]*k[d2]+2*beta*k[a2]*k[d2]^2+2*k[d1]^3+7*k[d1]^2*k[d2]+7*k[d1]*k[d2]^2+2*k[d2]^3)

quite clearly there are expressions in there that can be factorised by (k[a1]+k[a2]) and the two quotients have the same denominator. Is there any way of minimizing the length of this expression by factorizing where appropriate, merging denominators when appropriate etc?

## A possible bug with(Logic)...

I am not sure why p is assigned to 1 when I do a logic problem.

The letter p should stay as p and not be assigned to one. I suspect it has something to do with a statement that is always true. This is annoying because sometimes I have expressions with p in a formula later on, and I didn't realize p has been assigned to 1. And I can't use p in a logical formula either since it's already been assigned to 1.

## How to expression a function in terms of different...

Hello,

Lets say I have some expression F that is a function of n and N like, F=n+N-1 and I want to express that in terms of x, where x=n/N. How would I do this in maple? Thanks in advance.

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

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...

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...

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?...

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....

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...

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?...

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?...

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...

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...

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...

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

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