Items tagged with simplify simplify Tagged Items Feed

Why this simplifes:

z1:=n*(Int(cos(x)^(n-2), x))-(Int(cos(x)^(n-2), x));


But when adding an extra term to z1, it no longer simplfies the above any more:

z2 := cos(x)^(n-1)*sin(x)+n*(Int(cos(x)^(n-2), x))-(Int(cos(x)^(n-2), x));


You can see the second term, which is z1, was not simplfied any more.

Why? And how would one go about simplifying z2 such that the second term gets simplfies as with z1, but while using z2 expression. It seems simplify stopped at first term and did not look ahead any more?

Maple 18.02, windows.


I use the VectorCalculus package to calcutate derivative formula for geometric functions, and met difficulity simplifying the result expression.

For example, I define some vectors P, S, V like below:

P:=<Px, Py, Pz>, S:=<Sx, Sy, Sz>, V:=<Vx, Vy, Vz>

then define an intermediate variable Q:=P - S,

then define a function d:= sqrt(DotProduct(Q, Q)-(DotProuct(Q,V))^2)

by calculating the function's derivative w.r.t Px I got a very complex result expression:

dpx:=1/2 * (2Px - 2Sx - 2 ( (Px - Sx) Vx + (Py - Sy) Vy + (Pz - Sz)Vz )Vx ) / (sqrt( (Px-Sx)^2 + (Py-Sy)^2 + (Pz-Sz)^2 - .....)


Apparently this expression can be simplified by substituting its sub-expression with pre-defined variables like Q and d.

I know I can use subs, eval, and subsalg to do it manually:

subs(1/(sqrt( (Px-Sx)^2 + (Py-Sy)^2 + (Pz-Sz)^2 - .....) = 1/dv, dfdpx)

subs((Px - Sx) Vx + (Py - Sy) Vy + (Pz - Sz)Vz = dotproduct_q_v, dfdpx)

and I can get a simplified expression like this:



But it's like my brain does the simplification first, and Maple only does the text substitution for me.

Is there any way to do it automatically?







How can one simplify following expression:

After applying 'simplify' command I am getting this:

Powers are not distributed between bases.

How to force Maple simplify it further to


Thank you.




tmp := Vector(2, {(1) = 1+(-s[2]-s[4]+2*w[1]/(1+1/exp(mu[p]))^2+(-2*w[1]+2)/(1+1/(exp(mu[p])*exp(eta[p2])))^2)*s[1]^3+(-s[2]+s[3])*s[1]^2-s[2]*s[1], (2) = (s[2]+s[4]-2*w[1]/(1+1/exp(mu[p]))^2-(-2*w[1]+2)/(1+1/(exp(mu[p])*exp(eta[p2])))^2)*s[1]^3})


rule3:=w[1]/(1+1/exp(mu[p]))^2+(-w[1]+1)/(1+1/(exp(mu[p])*exp(eta[p2])))^2 = s[3];

w[1]/(1+1/exp(mu[p]))^2+(-w[1]+1)/(1+1/(exp(mu[p])*exp(eta[p2])))^2 = s[3]










This is part of a large simplifcation where lots of terms are being substituted. In two of those terms, it did not simplify as we would expect.

I think the main thing is trying to find a way to factor out the "2".


I could do this

> rule3:=w[1]/(1+1/exp(mu[p]))^2+(-w[1]+1)/(1+1/(exp(mu[p])*exp(eta[p2])))^2 = s[3];

> rule3ne:=-(w[1]/(1+1/exp(mu[p]))^2+(-w[1]+1)/(1+1/(exp(mu[p])*exp(eta[p2])))^2) = -s[3];
> rule3ne:=2*rule3ne;

> applyrule(rule3,tmp[1]);
> applyrule(rule3ne,tmp[2]);

For this example, this works.

But I hope for a more generic approach.









I figured I'd start a new thread for odd things I come across whilst using the new physics package. 

I have found this, and am not sure if it is expected. 




Setup(mathematicalnotation = true):


Setup(Commutator(Psigma[i], Psigma[j]) = Physics:-`*`(Physics:-`*`(I, ep_[i, j, k]), Psigma[k]), AntiCommutator(Psigma[i], Psigma[j]) = Physics:-`*`(2, kd_[i, j]));

[algebrarules = {%AntiCommutator(Physics:-Psigma[i], Physics:-Psigma[j]) = 2*Physics:-KroneckerDelta[i, j], %Commutator(Physics:-Psigma[i], Physics:-Psigma[j]) = I*Physics:-LeviCivita[i, j, k]*Physics:-Psigma[k]}]














Maple does not cancel out a variable.

Why is that?

Is there a way to solve this? 

(I pasted my code on the bottom of this message)


Thanks for your help/advice,


# simplify() does not work.....?
M(x):=simplify(%) assuming EI>0;
# Wiht EI cancelled out by hand it schould look like:


Hi all

kx,ky is the wavenumber, how can I get the 4 cases of piecewise function according to kx=0,kx≠0 and ky=0,ky≠0. Thanks

J := `assuming`([4*(int(int(JJ*exp(-I*(kx*x+ky*y))*sin(2*l*pi*x/a)*sin(2*k*pi*y/b), x = 0 .. a, AllSolutions), y = 0 .. b, AllSolutions))/(a*b)], [k::posint, l::posint, a > 0, b > 0, JJ > 0])

The following MWE shows what I mean:




    local eq;



    return eq;

end proc:


test();  # yields -[-MZ,MY] - [MZ,MY]


%  # yields 0



Any ideas how I can solve this? I would like to return the simplified version.

kappa := Vector(7, [1,w[1]*(1-phi+phi*(1-1/(1+exp(-mu[p]-tau[p3]))))+(1-w[1])*

Download kappa.txt

Here is the expression, I am trying to simplify, given a set of rules.

I have tried different substitutions, using simplify with side rules, applyrule, eval, subs, algsubs.

But none seem to be working as the way I want them to be.


Is there a better way?



Hi Maple friends.

Maple tends to spit out results(which comprise of variables) in very complicated forms, and I have to use the context menu to select 'simplify' to reduce them.

Is there a setting which will automatically simplify Maple's output?

Thanks in advance.

I'm working on a complex problem in Composite Materials. I've gotten to a near-result 6x6 matrix, with several cells containing polynomial denominators. I have an equation for simplifying these, which boils the polynomials down to a single variable, but I can't seem to get it to substitute in. Can anyone help me solve this? The problem is also time-sensitive.


t := exp(2*(I*Pi*(1/11)))

u := t^10*a[10]+t^9*a[9]+t^8*a[8]+t^7*a[7]+t^6*a[6]+t^5*a[5]+t^4*a[4]+t^3*a[3]+t^2*a[2]+t*a[1]+a[0]


How can get maple to simplify expressions like u^3+u^2-1 so that the exponents are between 2*(I*Pi*(1/11)) and 1.

Essentially it keeps outputting things like exp(2*(I*Pi*(1/11)))^12 and not simplifying it as it is a root of unity

Hi There

I'm getting started with maple and facing a doubt about using subs, somehow it does not seem to work, this is my expression:


> restart;
> theta := omega*t-k*x;
                                omega t - k x
> phi[1] := -(1/2)*H*c*cosh(k*(z+h))*sin(theta)/sinh(k*h);
                   H c cosh(k (z + h)) sin(-omega t + k x)
                                 2 sinh(k h)              
> diff(phi[1], t, t);
                H c cosh(k (z + h)) sin(-omega t + k x) omega
              - ----------------------------------------------
                                 2 sinh(k h)                  
> td := simplify(subs(z = 0, %));
                   H c cosh(k h) sin(-omega t + k x) omega
                 - ----------------------------------------
                                 2 sinh(k h)               
> simplify(subs(cosh(k*h)/sinh(k*h) = 1/tanh(k*h), %));
                   H c cosh(k h) sin(-omega t + k x) omega
                 - ----------------------------------------
                                 2 sinh(k h)               
I cannot subs cosh/sinh = tanh. I would like to know why.

Any tips? Thank you

Hi there

I am stuck with the expression


> e := (3+2*sinh(x)^2)/(sinh(x)^2*tanh(x));
                               3 + 2 sinh(x)  
                              sinh(x)  tanh(x)

its simplified way, which i cannot find, is

> f := 3*coth(x)^3-coth(x);
                            3 coth(x)  - coth(x)
> simplify(e-f);

I would appreciate immensely if someone could give me some pointers on how to solve it.


best regards




Hi all. I am using Maple 18.

1. Does Maple only output an answer, or can it be made to display the steps it took to achieve the result, in a way that is logical and understandable by the user? For example, I would like to see it display steps when integrating or differentiating, or dividing a polynomial by another polynomial. Basically any process that involve simplifyinf or factorisation.

2. I am trying to divide x^2 + 5x + 9 by x+2, but all Maple displays is the expression

How can I make it do the polynomial division and output the steps it took? I tried using simplify and evaluate from the context menu but the output is still just the expression.

3. Has something happened to this site? It was working fine in Opera until two days ago, and has sinmce started displaying "Error generating page" where the replies to questions should be. No problems with the "posts" section, only in the "questions" section.

Thanks in advance.


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