itsme

599 Reputation

13 Badges

13 years, 32 days

MaplePrimes Activity


These are questions asked by itsme

Recently i'm noticing that mathematica is basically a mind-reader with their FullSimplify function, whereas maple even with simple expressions does not show what I would consider optimal (I agree this will be somewhat subjective).

Here is a trivial example:
ex1:=(2*sqrt(N__s) + N__s + 1)/(2*N__s + 2);

none of these are any help
simplify(ex1);
simplify(ex1, size);
simplify(ex1, symbolic);
simplify(ex1, sqrt);
simplify(ex1, sqrt, symbolic);

The ideal expression I would like to see here is:
1/2 + sqrt(N__s)/(N__s + 1)

Am I doing it all wrong (suppose I don't know of this simple form beforehand)?

Mathematica gets it right - see the following screenshot:

I'm finding this a lot... especially when hyperbolic functions and sqrt's are involved ("symbolic" option helps sometimes, but often the expressions are still not what I would consider "simplifed").

does maple provide a way to programatically get the name of the "current" worksheet file?

I'm looking for something analogous to
interface(worksheetdir);

which gives the directory the worksheet file is in.

thanks.

 

what is the best way to "extract" a list of terms from a sum of terms.

So something like this::

split_expr(a+b+3) should return [a,b,3]

split_expr(diff(x(t),t)) should return  [ diff(x(t),t)]

split_expr(Int(abc(t), t=2..3) + 3) should return [Int(abc(t), t=2..3) , 3]

I very often have expressions with sums of many terms, and need to run some command on each element (say simplify, or collect, etc)... i've been using convert(expr, list) to split things up, apply a command and recombine, but the convert command breaks on some cases. Maybe this is something that maple can do natively?

thanks!

what is the most elegant way to get coefficients of a series that contains negative powers.

for example in this:

tt := a*N__s^3 + N__s + CSxSx__0 + CSxSx__1/N__s + CSxSx__2/N__s^2 + CSxSx__3/N__s^3;

i would like

fancy_coeff(tt, 1/N__s, 3)

to give me `CSxSx__3`

while

fancy_coeff(tt, 1/N__s, -3)

give me `a`

(the standard coeff call doesn't work with this, as would be known to people here)

thanks!

what's the easiest way to have maple simplify the expression below from 'expr1' to the form of 'desired_form'? mathematica automatically simplifies to that (subjectively of course!) much nicer looking form.

 


 

restart:

 

expr1:=-lambda-(1/2)*kappa__c-gamma__p-(1/2)*sqrt(-16*N*g^2+4*lambda^2-8*lambda*gamma__p+4*lambda*kappa__c+4*gamma__p^2-4*gamma__p*kappa__c+kappa__c^2);

-lambda-(1/2)*kappa__c-gamma__p-(1/2)*(-16*N*g^2+4*lambda^2-8*lambda*gamma__p+4*lambda*kappa__c+4*gamma__p^2-4*gamma__p*kappa__c+kappa__c^2)^(1/2)

(1)

desired_form:=1/2*(-2*gamma__p - kappa__c - 2 *lambda - sqrt(-16*N*g^2 + (-2 * gamma__p + kappa__c + 2 * lambda)^2));

-gamma__p-(1/2)*kappa__c-lambda-(1/2)*(-16*N*g^2+(-2*gamma__p+kappa__c+2*lambda)^2)^(1/2)

(2)

expr1- desired_form:
simplify(%);

0

(3)

 


 

Download factor_under_sqrt.mw

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