Items tagged with simplify

if I use the command below, I will get the right answer.

`assuming`([simplify((2*I)*deltas*Pi*BW*Ei(1, (2*I)*deltas*Pi*BW)-(2*I)*deltas*Pi*BW*Ei(1, -(2*I)*deltas*Pi*BW))], [real, BW > 0, deltas > 0, ts > 0, deltas <= ts, 2*BW*ts >= 1])

and the answer is :

2*BW*Pi*deltas*(Pi-2*Si(2*BW*Pi*deltas))

while I use the same command for the compliacated Ei function, it doesn't work any more, I don't know the reason.

 `assuming`([simplify(Ei(1, I*BW*Pi*deltas-(5*I)*BW*Pi*ts)-Ei(1, -I*BW*Pi*deltas+(5*I)*BW*Pi*ts), Ei)], [real, BW > 0, deltas > 0, ts > 0, deltas <= ts, 2*BW*ts >= 1])

 and it's reault is :

Ei(1,I*BW*Pi*deltas-5*I*BW*Pi*ts)-Ei(1,-I*BW*Pi*deltas+5*I*BW*Pi*ts)

 

I have a Maple code which generates a matrix, saves it to a .txt file and this is then read in to a C++ program. I have hit a snag with these matrices, in that they are generating absolutely enourmous .txt files. I need to get to a 5000*5000 matrix yet a 200*200 is generating a 100MB file.

The matrix elements contain a lot of algebraic terms which I would like to keep general as these are defined in the C++ code. They also contain hypergeometric functions which in the example below I have left unsimplified (although they are simplified before reaching C++). I have tried various operations/combinations to simplify, but the file sizes still come out very large.

From previous experience expanding the expressions and then simplifying allows Maple to "do more" with it, but it does not seem to work in this instance. I have tried map(options,expr), simplify(expr,options), combine(expr,options), convert (expr,options) etc... The script attached only contains a small example 10*10 matrix on its own without the code which generates it due to the size of the code. What is the best way to simplify these matrices to generate the smallest .txt file?

Large_Matrix.mw

Any help is appreciated.


-Yeti
 

Hello people in mapleprimes,

Please help me with simplifying the next expression.
This e1 has the expression of ((epsilon-1)*k/epsilon)^epsilon in the numerator and the denominator. How can I collect each of them with that expression?

e1.mw

Thanks in advance.

Taro

 

Hi,

I started using Maple recently. The output sometime is not simplified like that in the attached picture. How can I simplify such expressions?

Hi all,

I'am new to Maple and have some very basic questions. Maple can figure out that the exponential is positive.

> is(exp(x)>0) assuming x::real;
                                     true

But it cannot figure out that a sum of exponentials is positive too:

> is(sum(exp(x*i),i=1..N)>0) assuming x::real,N::integer,N>1;
                                     FAIL

What am I doing wrong? Moreover, what's wrong with this statement:

> is(ln(a+b)-ln(a)=ln(1-b/a)) assuming a::real,b::real,a>0,b>0,b<a;
                                     FAIL

Finally, is there a way to declare a generic fuction f and assume that its image is always a positive real?

Thanks

Nico 

I have been looking at a method for computing the inverse of a periodic, tridiagonal, matrix (tridiagonal with non-zero elements in (1,n) and (n,1), where n is the order of the matrix).

Using test matrices with rational elements I get a good improvement in execution time compared to Maple's MatrixInverse procedure from LinearAlgebra. However when I use algebraic elements I get faster times with small orders but from around
n=25 (for a particular example matrix) my method is running slower than MatrixInverse.

If I look at the element (1,1) of the inverse returned by both procedures I see that the Maple inverse is quite compact while the value returned by my procedure is very complex (on printing Maple extracts 17 subexpressions of varying complexity). I
have a check in the test rig to determine if the two inverses are the same; this uses

evalb(simplify(AinvMaple[i,j]-Ainv[i,j])==0)

and all the elements do agree.

The Maple MatrixInverse appears to be able to simplify the elements of the inverse; is this a feature of the algorithm that's being used or is there some mechanism I should be using to achieve this?

The source code of the procedure I've written (first 100 odd lines) and the test rig are attached. The file is set up to run the algebraic test (Test4) for n=20 and to print the (1,1) inverse elements generated by both the Maple and my procedures.

Any help in improving my code to produce simplified forms of the elements would be greatfully received.

Maple source as text file: KilicInv.txt

Hi!

I have a question here. Is there any way to simplify a complicated number expressed in terms of RootOf() forms?

I got numbers like

c:=(3/128)*RootOf(3*_Z^4-20*_Z^3+50*_Z^2-20*_Z+3)^3-(5/32)*RootOf(3*_Z^4-20*_Z^3+50*_Z^2-20*_Z+3)^2+(1/64)*sqrt(4+6*sqrt(6))+(25/64)*RootOf(3*_Z^4-20*_Z^3+50*_Z^2-20*_Z+3)-(3/128)*RootOf(3+3*_Z^2+(-3*RootOf(3*_Z^4-20*_Z^3+50*_Z^2-20*_Z+3)^3+20*RootOf(3*_Z^4-20*_Z^3+50*_Z^2-20*_Z+3)^2-47*RootOf(3*_Z^4-20*_Z^3+50*_Z^2-20*_Z+3))*_Z)-5/64

I am quite sure this number is 0: 
evalf(c, 100) gives:
0.+1.*10^(-101)*I

However, I tried simplify(c) and convert( c, 'radical' ) and some other choices of simplify() function. None of them can output 0. Is there any maple functions that can help me to simplify this kind of expressions?

Thanks!

William


 

I need a function like this:

 

    f := proc (n) options operator, arrow; sum(i, i = 1 .. n) end proc

proc (n) options operator, arrow; sum(i, i = 1 .. n) end proc

(1)

But I know that the sum actually simplifes.

simplify(sum(i, i = 1 .. n))

(1/2)*n^2+(1/2)*n

(2)

So I actually want define my function as

f := proc (n) options operator, arrow; (1/2)*n^2+(1/2)*n end proc

proc (n) options operator, arrow; (1/2)*n^2+(1/2)*n end proc

(3)

Is there any way to do this with programming instead of copying the result of simplify manually?


 

Download define-functions.mw

Hello,

I've just started to use Maple 16, and I can't seem to get a neat result, when I use the solve function to solve 4 equations with 4 unknown constants.

I've posted my calculations.

 

How can I get a simpler result? I found a simplification command, but that didn't help

I have expression h1 as below:

 

 

 

Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received shareman

 

restart

Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received shareman

 

"`u__1`(`xi__1`,`xi__2`,Zeta,t):=`u__0`(`xi__1`,`xi__2`,Zeta,t)+Zeta*`phi__1`(`xi__1`,`xi__2`,t):"

"`u__2`(`xi__1`,`xi__2`,Zeta,t):=`v__0`(`xi__1`,`xi__2`,Zeta,t)+Zeta*`phi__2`(`xi__1`,`xi__2`,t):"

"`u__3`(`xi__1`,`xi__2`,Zeta,t):=`w__0`(`xi__1`,`xi__2`,Zeta,t):"

`&phi;__n` := (diff(v__0(`&xi;__1`, `&xi;__2`, Zeta, t)*a__2(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`)-(diff(u__0(`&xi;__1`, `&xi;__2`, Zeta, t)*a__1(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`)))/(2*a__1(`&xi;__1`, `&xi;__2`, Zeta, t)*a__2(`&xi;__1`, `&xi;__2`, Zeta, t))

`&varepsilon;0__1` := (diff(u__0(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`)+v__0(`&xi;__1`, `&xi;__2`, Zeta, t)*(diff(a__1(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t)+a__1(`&xi;__1`, `&xi;__2`, Zeta, t)*w__0(`&xi;__1`, `&xi;__2`, Zeta, t)/R__1)/a__1(`&xi;__1`, `&xi;__2`, Zeta, t)

`&varepsilon;0__2` := (diff(v__0(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`)+u__0(`&xi;__1`, `&xi;__2`, Zeta, t)*(diff(a__2(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t)+a__2(`&xi;__1`, `&xi;__2`, Zeta, t)*w__0(`&xi;__1`, `&xi;__2`, Zeta, t)/R__2)/a__2(`&xi;__1`, `&xi;__2`, Zeta, t)

`&varepsilon;0__4` := (diff(w__0(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`)+a__2(`&xi;__1`, `&xi;__2`, Zeta, t)*`&phi;__2`(`&xi;__1`, `&xi;__2`, t)-a__2(`&xi;__1`, `&xi;__2`, Zeta, t)*v__0(`&xi;__1`, `&xi;__2`, Zeta, t)/R__2)/a__2(`&xi;__1`, `&xi;__2`, Zeta, t)

`&varepsilon;0__5` := (diff(w__0(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`)+a__1(`&xi;__1`, `&xi;__2`, Zeta, t)*`&phi;__1`(`&xi;__1`, `&xi;__2`, t)-a__1(`&xi;__1`, `&xi;__2`, Zeta, t)*u__0(`&xi;__1`, `&xi;__2`, Zeta, t)/R__1)/a__1(`&xi;__1`, `&xi;__2`, Zeta, t)

`&omega;0__1` := (diff(v__0(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`)-u__0(`&xi;__1`, `&xi;__2`, Zeta, t)*(diff(a__1(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t)-`&phi;__n`

`&omega;0__2` := (diff(u__0(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`)-v__0(`&xi;__1`, `&xi;__2`, Zeta, t)*(diff(a__2(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t)+`&phi;__n`

`&varepsilon;1__1` := (diff(`&phi;__1`(`&xi;__1`, `&xi;__2`, t), `&xi;__1`)+`&phi;__2`(`&xi;__1`, `&xi;__2`, t)*(diff(a__1(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t)

`&varepsilon;1__2` := (diff(`&phi;__2`(`&xi;__1`, `&xi;__2`, t), `&xi;__2`)+`&phi;__1`(`&xi;__1`, `&xi;__2`, t)*(diff(a__2(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t)

`&omega;1__1` := (diff(`&phi;__2`(`&xi;__1`, `&xi;__2`, t), `&xi;__1`)+`&phi;__1`(`&xi;__1`, `&xi;__2`, t)*(diff(a__1(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__2`))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t)-`&phi;__n`/R

`&omega;1__2` := (diff(`&phi;__1`(`&xi;__1`, `&xi;__2`, t), `&xi;__2`)+`&phi;__2`(`&xi;__1`, `&xi;__2`, t)*(diff(a__2(`&xi;__1`, `&xi;__2`, Zeta, t), `&xi;__1`))/a__1(`&xi;__1`, `&xi;__2`, Zeta, t))/a__2(`&xi;__1`, `&xi;__2`, Zeta, t)+`&phi;__n`/R

`&varepsilon;__1` := (Zeta*`&varepsilon;1__1`+`&varepsilon;0__1`)/(1+Zeta/R__1)

`&varepsilon;__2` := (Zeta*`&varepsilon;1__2`+`&varepsilon;0__2`)/(1+Zeta/R__2)

`&varepsilon;__4` := `&varepsilon;0__4`/(1+Zeta/R__2)

`&varepsilon;__5` := `&varepsilon;0__5`/(1+Zeta/R__1)

`&varepsilon;__6` := (Zeta*`&omega;1__1`+`&omega;0__1`)/(1+Zeta/R__1)+(Zeta*`&omega;1__2`+`&omega;0__2`)/(1+Zeta/R__2)

epsilon := Matrix([[`&varepsilon;__1`], [`&varepsilon;__2`], [`&varepsilon;__4`], [`&varepsilon;__5`], [`&varepsilon;__6`]])

with(LinearAlgebra)

e__1 := Matrix([[0, 0, 0, e1__15, 0], [0, 0, e1__24, 0, 0], [e1__31, e1__31, 0, 0, 0]])

e__5 := Matrix([[0, 0, 0, e5__15, 0], [0, 0, e5__24, 0, 0], [e5__31, e5__31, 0, 0, 0]])

E__1 := -Matrix([[diff(`&varphi;1`(`&xi;__1`, `&xi;__2`, Zeta), `&xi;__1`)], [diff(`&varphi;1`(`&xi;__1`, `&xi;__2`, Zeta), `&xi;__2`)], [diff(`&varphi;1`(`&xi;__1`, `&xi;__2`, Zeta), Zeta)]])

E__5 := -Matrix([[diff(`&varphi;5`(`&xi;__1`, `&xi;__2`, Zeta), `&xi;__1`)], [diff(`&varphi;5`(`&xi;__1`, `&xi;__2`, Zeta), `&xi;__2`)], [diff(`&varphi;5`(`&xi;__1`, `&xi;__2`, Zeta), Zeta)]])

`&epsilon;__1` := Matrix([[`&epsilon;1__11`, 0, 0], [0, `&epsilon;1__22`, 0], [0, 0, `&epsilon;1__33`]])

`&epsilon;` := Matrix([[`&epsilon;5__11`, 0, 0], [0, `&epsilon;5__22`, 0], [0, 0, `&epsilon;5__33`]])

f := Matrix([[f1, f2, f3]])

D__1 := Multiply(e__1, epsilon)+Multiply(`&epsilon;__1`, E__1)

D__5 := Multiply(e__5, epsilon)+Multiply(`&epsilon;__5`, E__5)

h1 := simplify((Multiply(Transpose(E__1), D__1))(1))

(-R__1*(diff(varphi1(xi__1, xi__2, Zeta), Zeta))*e1__31*(R__2+Zeta)*(phi__2(xi__1, xi__2, t)*Zeta+v__0(xi__1, xi__2, Zeta, t))*(diff(a__1(xi__1, xi__2, Zeta, t), xi__2))-(diff(varphi1(xi__1, xi__2, Zeta), Zeta))*R__2*e1__31*(R__1+Zeta)*(phi__1(xi__1, xi__2, t)*Zeta+u__0(xi__1, xi__2, Zeta, t))*(diff(a__2(xi__1, xi__2, Zeta, t), xi__1))-a__2(xi__1, xi__2, Zeta, t)*R__1*(diff(varphi1(xi__1, xi__2, Zeta), Zeta))*e1__31*(R__2+Zeta)*(diff(u__0(xi__1, xi__2, Zeta, t), xi__1))-a__1(xi__1, xi__2, Zeta, t)*(diff(varphi1(xi__1, xi__2, Zeta), Zeta))*R__2*e1__31*(R__1+Zeta)*(diff(v__0(xi__1, xi__2, Zeta, t), xi__2))-a__2(xi__1, xi__2, Zeta, t)*R__1*(diff(varphi1(xi__1, xi__2, Zeta), xi__1))*e1__15*(R__2+Zeta)*(diff(w__0(xi__1, xi__2, Zeta, t), xi__1))-a__1(xi__1, xi__2, Zeta, t)*R__2*(diff(varphi1(xi__1, xi__2, Zeta), xi__2))*e1__24*(R__1+Zeta)*(diff(w__0(xi__1, xi__2, Zeta, t), xi__2))+`&epsilon;1__33`*a__1(xi__1, xi__2, Zeta, t)*a__2(xi__1, xi__2, Zeta, t)*(R__2+Zeta)*(R__1+Zeta)*(diff(varphi1(xi__1, xi__2, Zeta), Zeta))^2-e1__31*(a__2(xi__1, xi__2, Zeta, t)*R__1*Zeta*(R__2+Zeta)*(diff(phi__1(xi__1, xi__2, t), xi__1))+a__1(xi__1, xi__2, Zeta, t)*(R__2*Zeta*(R__1+Zeta)*(diff(phi__2(xi__1, xi__2, t), xi__2))+a__2(xi__1, xi__2, Zeta, t)*w__0(xi__1, xi__2, Zeta, t)*(R__1+R__2+2*Zeta)))*(diff(varphi1(xi__1, xi__2, Zeta), Zeta))+a__2(xi__1, xi__2, Zeta, t)*(`&epsilon;1__11`*(R__2+Zeta)*(R__1+Zeta)*(diff(varphi1(xi__1, xi__2, Zeta), xi__1))^2-e1__15*(R__2+Zeta)*(phi__1(xi__1, xi__2, t)*R__1-u__0(xi__1, xi__2, Zeta, t))*(diff(varphi1(xi__1, xi__2, Zeta), xi__1))+(R__1+Zeta)*(`&epsilon;1__22`*(R__2+Zeta)*(diff(varphi1(xi__1, xi__2, Zeta), xi__2))-e1__24*(phi__2(xi__1, xi__2, t)*R__2-v__0(xi__1, xi__2, Zeta, t)))*(diff(varphi1(xi__1, xi__2, Zeta), xi__2)))*a__1(xi__1, xi__2, Zeta, t))/(a__1(xi__1, xi__2, Zeta, t)*a__2(xi__1, xi__2, Zeta, t)*(R__1+Zeta)*(R__2+Zeta))

(1)

NULL

``

 

 

Download simplifymore.mw

 

 

How can i simplify h1 more in Maple?

It is suggested  

hypergeom([1/3, 2/3], [3/2], (27/4)*z^2*(1-z)) = 1/z

if z > 1. Here is my try to prove that with Maple:


 

a := `assuming`([convert(hypergeom([1/3, 2/3], [3/2], (27/4)*z^2*(1-z)), elementary)], [z > 1])

-(1/((1/2)*(27*z^3-27*z^2+4)^(1/2)+(3/2)*z*(3*z-3)^(1/2))^(1/3)-1/((1/2)*(27*z^3-27*z^2+4)^(1/2)-(3/2)*z*(3*z-3)^(1/2))^(1/3))/(z*(3*z-3)^(1/2))

(1)

b := `assuming`([simplify(a, symbolic)], [z >= 1])

2*(-(12*(3*z+1)^(1/2)*z-12*z*(3*z-3)^(1/2)-8*(3*z+1)^(1/2))^(1/3)+(12*(3*z+1)^(1/2)*z+12*z*(3*z-3)^(1/2)-8*(3*z+1)^(1/2))^(1/3))/((3*z-3)^(1/2)*(12*(3*z+1)^(1/2)*z+12*z*(3*z-3)^(1/2)-8*(3*z+1)^(1/2))^(1/3)*(12*(3*z+1)^(1/2)*z-12*z*(3*z-3)^(1/2)-8*(3*z+1)^(1/2))^(1/3)*z)

(2)

plot(1/b, z = 1 .. 10)

 

simplify(diff(1/b, z), symbolic)

-48*(((3*z-2)*(3*z+1)^(1/2)+z*(3*z-3)^(1/2))*((12*z-8)*(3*z+1)^(1/2)-12*z*(3*z-3)^(1/2))^(1/3)+((12*z-8)*(3*z+1)^(1/2)+12*z*(3*z-3)^(1/2))^(1/3)*((-3*z+2)*(3*z+1)^(1/2)+z*(3*z-3)^(1/2)))/((3*z+1)^(1/2)*(3*z-3)^(1/2)*((12*z-8)*(3*z+1)^(1/2)+12*z*(3*z-3)^(1/2))^(2/3)*((12*z-8)*(3*z+1)^(1/2)-12*z*(3*z-3)^(1/2))^(2/3)*(((12*z-8)*(3*z+1)^(1/2)-12*z*(3*z-3)^(1/2))^(1/3)-((12*z-8)*(3*z+1)^(1/2)+12*z*(3*z-3)^(1/2))^(1/3))^2)

(3)

``


 

Download simplification.mw

How do I convince MAPLE to simplify this Euclidean norm? > (D[1](P))(rho, theta, phi); Vector[column](%id = 230612588) > Norm(%, 2); / 2 2 2\ \|cos(phi) sin(theta)| + |sin(phi) sin(theta)| + |cos(theta)| /^ (1/2) > simplify(%, trig); / 2 2 2\ \|cos(phi) sin(theta)| + |sin(phi) sin(theta)| + |cos(theta)| /^ (1/2)

Dear all

I am facing to run the following expression for an arbitrary values of M, k and alpha.

u := simplify(sum(sum(c[p, q]*2^((K-1)*(1/2))*(sum(sum(sum(sum(2^((K-1)*(p-i-j+q-k-l))*GAMMA(p-i-j+1)*x^(p-i-j-alpha)*(1-p)^j*(1-q)^l*g[i]*binomial(p-i, j)*binomial(p, i)*binomial(p-k, l)*binomial(q, k)/GAMMA(p-i-alpha-j+1), l = 0 .. q-k), k = 0 .. q), j = 0 .. p-i-ceil(alpha)), i = ceil(alpha) .. p))/sqrt(2*(-1)^q*factorial(q)^2*g[2*q]/factorial(2*q)), q = 1 .. Delta), p = ceil(alpha) .. Delta));
FD := simplify(convert(%, StandardFunctions)); expand(radnormal(convert(FD, elementary)))

Please correct it and run it for M=10, k=1, alpha=0.5.

I'm looking to leanr the sign and to simplify a very long expression , how can i do this ? can anyone help me thank you in a

advance.

Hello dear! Hope you will be fine. I want to simplify the equation (4) like equation (3) in the attached file please correct it. I shall be thankful to you.

Help.mw

With my best regards and sincerely.

Muhammad Usman

School of Mathematical Sciences 
Peking University, Beijing, China

1 2 3 4 5 6 7 Last Page 1 of 17