## Output to MathML as separate fractions...

Hi all,

I am trying to display, using mathML, two seperate fractions being multiplied as two seperate expressions with a multiuply in the middle.

as of now I have:

restart:
left:=(x+3)/(x+7):
right:=(x-4)/(x-1):
XMLTools[Print](MathML[Export](left*right)):

The above Maple entry displays as:

I would like:

Mark

## Efficient Extreme Value Analysis...

I have a question that I hope someone can help with. We perform extreme value analysis on expressions. My this I mean that we evaluate expressions for each combination of min or max values of each variable in the expression. For example, the expression a*b+c*d has 4 variables and we would evaluate the expression for all of the 16 combinations of a,b,c, and d to determine the worst-case result. I understand that the worst case results may not occur at the extreme values of the variables, but that is a different question.

What I would like to know is if there is a way to reduce the number of calculations by splitting the expression into independent parts. In the example above, the expression consists of 2 parts a*b and c*d. These parts could be evaluated separately. Each has 2 variables, and each would therefore requires  4 combinations of variables to determine the extreme values of the results. So in this case, the number of calculations is 4+4=8, which is half of the initial 16  runs as would be done with a full-factorial analysis. Also, because each calculation is done on only part of the original expression, each calculation takes less time.

Is there a way to find the independent parts of an arbitrary expression so that each independent part could be evaluated separately to speed processing?

Thanks

## Forcing Maple to give desired output...

Suppose I type certain math expression like as follow:

 >
 (1)

But when I enter this expression, Maple gives totally different look to this expression, can I force Maple to print similar looking expression as I typed in command line ? I mean without change of  position of intermediates and coefficients.

Regards

## A further simplification needed...

Dear All

As a result of certain computation, Maple produce following result:

 >

How can I force Maple to produce result like:

 >

Similar to this; Maple produce result:

 >

How I can force Maple to produce it like:

 >

As an example; I need to simplify following expression in manner as described above

 >

Regards

## How can I optimize multiple equations in Maple?...

Hi, I am completely new to Maple, and I need to use it to optimize my equations in order to make my PLC codes more compressed. I am calculating forward kinematics with the Denavit-Hartenberg method and as such I get long expressions. After a lot of google'ing and frustration, I thought I'd ask here in the hope that one of you might be able to assist me.

I have the following equations;

X := L10*cos(q5) - L16*(sin(q10)*(sin(q5)*sin(q8) - cos(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7))) - cos(q10)*(sin(q9)*(cos(q8)*sin(q5) + sin(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7))) + cos(q9)*(cos(q5)*cos(q6)*sin(q7) + cos(q5)*cos(q7)*sin(q6)))) - d2*(cos(q10)*(sin(q5)*sin(q8) - cos(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7))) + sin(q10)*(sin(q9)*(cos(q8)*sin(q5) + sin(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7))) + cos(q9)*(cos(q5)*cos(q6)*sin(q7) + cos(q5)*cos(q7)*sin(q6)))) + L15*(sin(q9)*(cos(q8)*sin(q5) + sin(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7))) + cos(q9)*(cos(q5)*cos(q6)*sin(q7) + cos(q5)*cos(q7)*sin(q6))) - L11*cos(q5)*sin(q6) + d1*cos(q5)*cos(q6) - L13*sin(q5)*sin(q8) + L14*cos(q9)*(cos(q8)*sin(q5) + sin(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7))) + L13*cos(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7)) - L14*sin(q9)*(cos(q5)*cos(q6)*sin(q7) + cos(q5)*cos(q7)*sin(q6)) + L12*cos(q5)*cos(q6)*cos(q7) - L12*cos(q5)*sin(q6)*sin(q7);

Y := L10*sin(q5) - L9 + L16*(sin(q10)*(cos(q5)*sin(q8) - cos(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5))) - cos(q10)*(sin(q9)*(cos(q5)*cos(q8) + sin(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5))) - cos(q9)*(cos(q6)*sin(q5)*sin(q7) + cos(q7)*sin(q5)*sin(q6)))) + d2*(cos(q10)*(cos(q5)*sin(q8) - cos(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5))) + sin(q10)*(sin(q9)*(cos(q5)*cos(q8) + sin(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5))) - cos(q9)*(cos(q6)*sin(q5)*sin(q7) + cos(q7)*sin(q5)*sin(q6)))) - L15*(sin(q9)*(cos(q5)*cos(q8) + sin(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5))) - cos(q9)*(cos(q6)*sin(q5)*sin(q7) + cos(q7)*sin(q5)*sin(q6))) + L13*cos(q5)*sin(q8) - L11*sin(q5)*sin(q6) + d1*cos(q6)*sin(q5) - L14*cos(q9)*(cos(q5)*cos(q8) + sin(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5))) - L13*cos(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5)) - L14*sin(q9)*(cos(q6)*sin(q5)*sin(q7) + cos(q7)*sin(q5)*sin(q6)) + L12*cos(q6)*cos(q7)*sin(q5) - L12*sin(q5)*sin(q6)*sin(q7);

Z := L15*(cos(q9)*(cos(q6)*cos(q7) - sin(q6)*sin(q7)) - sin(q8)*sin(q9)*(cos(q6)*sin(q7) + cos(q7)*sin(q6))) - L11*cos(q6) - L8 - d1*sin(q6) + L16*(cos(q10)*(cos(q9)*(cos(q6)*cos(q7) - sin(q6)*sin(q7)) - sin(q8)*sin(q9)*(cos(q6)*sin(q7) + cos(q7)*sin(q6))) - cos(q8)*sin(q10)*(cos(q6)*sin(q7) + cos(q7)*sin(q6))) - d2*(sin(q10)*(cos(q9)*(cos(q6)*cos(q7) - sin(q6)*sin(q7)) - sin(q8)*sin(q9)*(cos(q6)*sin(q7) + cos(q7)*sin(q6))) + cos(q8)*cos(q10)*(cos(q6)*sin(q7) + cos(q7)*sin(q6))) - L13*cos(q8)*(cos(q6)*sin(q7) + cos(q7)*sin(q6)) - L14*sin(q9)*(cos(q6)*cos(q7) - sin(q6)*sin(q7)) - L12*cos(q6)*sin(q7) - L12*cos(q7)*sin(q6) - L14*cos(q9)*sin(q8)*(cos(q6)*sin(q7) + cos(q7)*sin(q6));

I need to optimize these equations, but still keep them separate. I would like to use mutual expressions for the calculations within, but still as I said keep the outputs of X, Y and Z separate.

This is MATLAB code.

Thanks in advance for any help.

## testeq fails Alternative options?...

Hi all,

which alternative options fo I have to prove the equality of two algebraic expressions if testeq fails?

The case im reffering to can be seen in the following document:

https://dl.dropboxusercontent.com/u/29147149/Exam%202006%20Question%20A.mw

Equation 14-18

I am pretty sure that the expressions are equal. evalb just returns false because it does not simplify expressions.

## Right clicking does nothing...

I am using Maple 12 in Win 64. I have some difficulties in evaluating expressions in Maple. For example simply writing cos(x) then differentiating it w.r.t x. After writing cos(x) in 2D Math mode, I do right click for selecting diff but it does not work. The pointer turns in to busy mode and nothing comes to select. Also, I tried this operation in the tutorial file teaching differentiation, however problem persists.

## Setting two functions equal to each other - but on...

For context, I'm designing a work sheet based around quantum tunneling. Currently I'm looking at the boundary conditions.

What I want to be able to do is to set the expression psi[1] equal to psi[2], but only for the value x = 0. Is this possible? I've tried using if statements, and I've considered converting these expressions into functions for this purpose, but I'm not having much luck.

Thanks

Blanky

## use expression as function input arguement...

Say I have the following loops:

for C from 1 to 10 do
r:=[]:
for K from 2 to 10 do
r:=[op(r),2*K+2*C-3];
end do:
print(r);
end do:

for C from 1 to 10 do
r:=[]:
for K from 2 to 10 do
r:=[op(r),K*C+K+C-2];
end do:
print(r);
end do:

I wonder how could I write a procedure, say use expressions "2*K+2*C-3" and "K*C+K+C-2" as input arguments?

so I can call up like :

myfun(K*C+K+C-2) or myfun("K*C+K+C-2")

myfun(2*K+2*C-3)

I dont care whether the output(s) are lists, tables, or matrices.

My main difficulty is to get the expression to be procedure inputs.

Though if the output can be a  10 by 9 matrix, it's better.

Thanks,

casper

## How can I plot two expressions in terms of each ot...

Dear guys!

I have two expressions in terms of one variable. For example A(t) and B(t). Now, I want to plot A in terms of B. What should I do?

I cannot obtain this relation analytically because both expressions in terms of "t" are very complicated. But I can plot both of them. Now, I need to plot A in terms of B.

Thanks a lot.

## How do I show an expression in terms of other expr...

Please excuse me if this question is too basic or has been answered before, though I've spent a couple of hours searching for similar questions without any luck.

I have the following expression, which is given in terms of other expressions:

## symbolic manipulation mod 2...

I want to be able to create expressions in the two noncommutative variables a and b such that an expression

(b+a)*a +ba symplifies to a*a. Thus the first expression expands to ba+aa, which when added to ba

yields ba+aa+ba=aa.

How to arrange for this will be greatly appreciated.