Items tagged with expression expression Tagged Items Feed

Hi,

I m trying to simplify an expression involving square roots in Maple. But instead of giving the expected output it is not simplifying it. Please find the attached maple file for reference. I calculated manually and the result is 1. Please help me out for this. Thanx in advance.

Regards

Sunit

restart

temp := (1/2)*(a*r*t-b*p)*sqrt(p+v*sqrt(a*r))*sqrt(b)/(sqrt(a*b*r*t)*sqrt(a*r*t*(p+v*sqrt(a*r))))+(1/2)*(a*r*v*t-v*b*p+p*t*sqrt(a*r)-b*v^2*sqrt(a*r))*sqrt(b)/(sqrt(a*b*r*t*(p+v*sqrt(a*r)))*sqrt(t*(p+v*sqrt(a*r))))+(1/2)*b*(p+v*sqrt(a*r))/(a*r*t)

(1/2)*(a*r*t-b*p)*(p+v*(a*r)^(1/2))^(1/2)*b^(1/2)/((a*b*r*t)^(1/2)*(a*r*t*(p+v*(a*r)^(1/2)))^(1/2))+(1/2)*(a*r*v*t-v*b*p+p*t*(a*r)^(1/2)-b*v^2*(a*r)^(1/2))*b^(1/2)/((a*b*r*t*(p+v*(a*r)^(1/2)))^(1/2)*(t*(p+v*(a*r)^(1/2)))^(1/2))+(1/2)*b*(p+v*(a*r)^(1/2))/(a*r*t)

(1)

simplify(temp)

-(1/2)*(-(p+v*(a*r)^(1/2))^(1/2)*b^(1/2)*(a*b*r*t*(p+v*(a*r)^(1/2)))^(1/2)*(t*(p+v*(a*r)^(1/2)))^(1/2)*a^2*r^2*t^2+(p+v*(a*r)^(1/2))^(1/2)*b^(3/2)*(a*b*r*t*(p+v*(a*r)^(1/2)))^(1/2)*(t*(p+v*(a*r)^(1/2)))^(1/2)*a*r*t*p-b^(1/2)*(a*b*r*t)^(1/2)*(a*r*t*(p+v*(a*r)^(1/2)))^(1/2)*a^2*r^2*t^2*v+b^(3/2)*(a*b*r*t)^(1/2)*(a*r*t*(p+v*(a*r)^(1/2)))^(1/2)*a*r*t*v*p-b^(1/2)*(a*b*r*t)^(1/2)*(a*r*t*(p+v*(a*r)^(1/2)))^(1/2)*a*r*t^2*p*(a*r)^(1/2)+b^(3/2)*(a*b*r*t)^(1/2)*(a*r*t*(p+v*(a*r)^(1/2)))^(1/2)*a*r*t*v^2*(a*r)^(1/2)-b*(a*b*r*t)^(1/2)*(a*r*t*(p+v*(a*r)^(1/2)))^(1/2)*(a*b*r*t*(p+v*(a*r)^(1/2)))^(1/2)*(t*(p+v*(a*r)^(1/2)))^(1/2)*p-b*(a*b*r*t)^(1/2)*(a*r*t*(p+v*(a*r)^(1/2)))^(1/2)*(a*b*r*t*(p+v*(a*r)^(1/2)))^(1/2)*(t*(p+v*(a*r)^(1/2)))^(1/2)*v*(a*r)^(1/2))/((a*b*r*t)^(1/2)*(a*r*t*(p+v*(a*r)^(1/2)))^(1/2)*(a*b*r*t*(p+v*(a*r)^(1/2)))^(1/2)*(t*(p+v*(a*r)^(1/2)))^(1/2)*a*r*t)

(2)

``


Download question.mw

I have a big file (~30Mb) with a single algebraic expression (file contains only one string of the form `expr := a*b + ... :` ). I would like to import this expression into Maple and I use `read` function for that:

    read "s.maple":

I wait for 2 hours, but Maple does not response and no any output provided. Is there any special function for import such data?

I use console Maple18 Linux x86 64.

 

Update. All goes fine in Maple 16, so the issue is relevant for Maple17 and Maple18.

Hello, I would like to customize the context menu in Maple 18 and looking for a way, to convert 2-D expressions to classical maple input using command(s) (same function as "2-D Math > Convert To > 1-D Math Input"). My main problem is, that using the standard procedures in the context menu I get the result of an expression, not the expression itself.

Can you give me an idea, how to do this? Thanks, Csaba

hello
i have a problem that you could help me
i have an expression that i want convert it to an expression according to the expression q[d] with maple
i have bellow expressions
B[d]:=(-d*w[1]+w[3])/(((-2*w[1]+w[3])^2)-((-d*w[1]+w[3])^2))
B[o]:=(-2*w[1]+w[3])/(((-2*w[1]+w[3])^2)-((-d*w[1]+w[3])^2))
A[o]:=w[1]*(alpha[o]-c[o]-t[o])+2*w[2]*e[o]
A[d]:=w[1]*(alpha[d]-c[d]-t[d])+2*w[2]*e[d]
q[o]:=B[o]*A[o]-B[d]*A[d]
q[d]:=B[o]*A[d]-B[d]*A[o]
i want simplify expression U[d] such as this one
U[d]:=w[1]*(q[d]*(alpha[d]-q[d]-d*q[o]-c[d]-t[d])-C)+w[2]*(e[d]*q[d]+e[o]*q[o])+w[3]*((1/2)*(q[d]+q[o])^2)
I'm looking to simplify U[d] according to the expression q[d]
please please help me

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.

Often, I'd like to use variable names that look like expressions. Is there a way to convert them to some form of inert form or as some sort of literal (so that they are not a mathematical expression) ?

Such as,

a1(2)

Can't type it here, but I wanted 'a' subscript 1 superscript (2). I'd like it to not be a1 squared.

Basically, I'd like the subscripts and superscript to not mean anything mathematically . . . And, I use a1^(3), a1^(1), a2^(1), a2^(2), a2^(3), b2^(3), etc.

 

Thanks, for any suggests.

 

Cheers !!

Hi there

I'm trying to isolate (y1-3)2+(x1-1)in the equation 25(y1-3)2+200+100(x1-1)2=0.

I have tried isolate and solve, but solve coplains about solving for expressions (but when inputting i:=(x1,y1)->(y1-3)2+(x1-1)2 it still doesn't work), and isolate can only isolate either (y1-3)2 or (x1-1). Not both.

How can I do this with as few lines as possible?

Thanks

- Alex

When I write in maple the following:

x*(x+y)

 

What do I need to write to make maple make the operation that will evaluate the expression and show the following?

 

x^2+x*y

 

simplify(%) or evaluate(%) only shows it the same way it was inputted to start with.

let m3 = [[0; 1; 0]; [1; 0; 1]; [0; 1; 0]]

1. Firstly, express this matrix into sequence function expression

2. how to express this matrix in terms of forloop code

3. for complicated case such as 1 is not in easy pattern, can it intelligently express the matrix in terms of for loop code

 

is there exist extra tools to express matrix in terms of for loop code or sequence function code?

I was trying to see if Maple contains equivalent to Mathematica FreeQ command to check inside a proc if an input expression contains an "x" or not.  I could not find such command in Maple. So now I call indets(), which is a nice function, that tells me all the symbols in the expression, then use member() to check.

Would this be correct way to do this? Here is an example

expr:=3+4*sqrt(2)-x+y*sin(3*t);
s:=indets(expr);
if member(x,s) then
   print(`yes, x is there`);
fi;

I can't use patmatch() for this, as I do not know what the expression will look like yet, I just needed to know if it contains an "x" (in this case), a free symbol "x", and that is all.

I thought to ask if there is a better way to do this.

Dear all:

I wisth to replace in an expression that contains several sums:

sum(a[i],i=1..n+1) and sum(w[i],i=1..n+1)

and replace them with a single command into:

a[n+1]+sum([i],i=1..n) and w[n+1]+sum(w[n],1..n)

everywhere in the expression

Thank you

Claudio

Sorry for basic question, Maple newbie here and I could not find answer using google.

I understand in Maple one uses the back quote key (or rather the apostrophe, 0X27) to prevent one time evaluation of expression. Hence when writing

'sin(Pi)'; #this remain sin(Pi)
%; # now we get 0

But when I tried it on fraction, it did not hold it:

'16/4'; #maple replied with 4

This might indicate that the front end parser did this simplification before the main evaluator got hold of it, so it was too late?

Either way, how would one make Maple return 16/4 when the input is '16/4'?

Hi everyone,

 

I have a question regarding the use of the applyrule function. I have an expression that contains a polynomial. The expression looks something like:

 

Y := (a0 + a_1*x + a_2*x^2 + ... a_n*x^n)*f(y) + b_0 + b_1*x + b_2*x^2 + ... b_n*x^n)*g(y):

 

I would like to express this as y(x) = P_1*f(y) + P_2*g(y).

 

So far I have tried applyrule([a0 + a_1*x + a_2*x^2 + ... a_n*x^n = P_1, b_0 + b_1*x + b_2*x^2 + ... b_n*x^n) = P_2],Y):

 

This doesn't seem to work. Any suggestions?

 

 

 

 

I have a long expression with different order derrivatives, that is written in form like that:

-(D[1](f))(x, y)

I'd like to transform it into standard maple form like:

diff(f(x,y),x)

Is there any special procedure to achieve this goal?

how to add another line in this template of formula

use the expression template  

how to add another line like

 

thank you in advance for your help

1 2 3 4 5 6 7 Page 1 of 8