acer

32333 Reputation

29 Badges

19 years, 319 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

> length(sol);
                                   11401819

So, no, I won't paste it. It's pages and pages and pages in length. Here's another way that you might obtain it, with some smarter management of the common subexpressions. Take that RootOf result, which I think was,

RootOf((2*a*Pi^2+Pi^2-4*a^2*Pi-4*a^2)*_Z^4+(4*a*Pi+4*a^2*Pi)*_Z^3+(-Pi^2-2*a*
Pi^2-a^2*Pi^2+4*a^2)*_Z^2+(-4*a*Pi-4*a^2*Pi)*_Z-4*a^2)

Now solve the general quartic, for explicit roots, and substitute in those coefficients. Test at some random value of `a`.

eq:=a*(x/sqrt(x^2-1)+2*x/(Pi*sqrt(x^2-1))-1-2/(Pi*x))=1;
solg:=[solve(C0*x^4+C1*x^3+C2*x^2+C3*x+C4,x,Explicit)]:
newsol:=subs({C0=(2*a*Pi^2+Pi^2-4*a^2*Pi-4*a^2),
 C1=(4*a*Pi+4*a^2*Pi),C2=(-Pi^2-2*a*Pi^2-a^2*Pi^2+4*a^2),
 C3=(-4*a*Pi-4*a^2*Pi),C4=-4*a^2},solg);
seq(evalf(subs(x=newsol[i],a=3,lhs(eq)-rhs(eq))),i=1..nops(newsol));

If I'm not mistaken, that newsol is a list of 4 elements, each of which satisfies `eq` the original eq.

acer

> length(sol);
                                   11401819

So, no, I won't paste it. It's pages and pages and pages in length. Here's another way that you might obtain it, with some smarter management of the common subexpressions. Take that RootOf result, which I think was,

RootOf((2*a*Pi^2+Pi^2-4*a^2*Pi-4*a^2)*_Z^4+(4*a*Pi+4*a^2*Pi)*_Z^3+(-Pi^2-2*a*
Pi^2-a^2*Pi^2+4*a^2)*_Z^2+(-4*a*Pi-4*a^2*Pi)*_Z-4*a^2)

Now solve the general quartic, for explicit roots, and substitute in those coefficients. Test at some random value of `a`.

eq:=a*(x/sqrt(x^2-1)+2*x/(Pi*sqrt(x^2-1))-1-2/(Pi*x))=1;
solg:=[solve(C0*x^4+C1*x^3+C2*x^2+C3*x+C4,x,Explicit)]:
newsol:=subs({C0=(2*a*Pi^2+Pi^2-4*a^2*Pi-4*a^2),
 C1=(4*a*Pi+4*a^2*Pi),C2=(-Pi^2-2*a*Pi^2-a^2*Pi^2+4*a^2),
 C3=(-4*a*Pi-4*a^2*Pi),C4=-4*a^2},solg);
seq(evalf(subs(x=newsol[i],a=3,lhs(eq)-rhs(eq))),i=1..nops(newsol));

If I'm not mistaken, that newsol is a list of 4 elements, each of which satisfies `eq` the original eq.

acer

You might also help maple out, by informing it of some extra information about `a`. For example,

sol:=[solve(eq,x,Explicit)] assuming a>0;

(I am not 100% sure, but the Warning may be related to Maple's not knowing anything about `a`. It might also actually be innocuous here.) Or perhaps you want a solution where x>1, or where x>Pi/2, etc, which could also be supplied as additional assumptions. Or, you could take your original RootOf() result, which represents the roots of a 4th degree polynomial, and try hitting that with allvalues().  It's just a question, but if you have no such extra information then how would you choose amongst the 4 explicit roots?

acer

You might also help maple out, by informing it of some extra information about `a`. For example,

sol:=[solve(eq,x,Explicit)] assuming a>0;

(I am not 100% sure, but the Warning may be related to Maple's not knowing anything about `a`. It might also actually be innocuous here.) Or perhaps you want a solution where x>1, or where x>Pi/2, etc, which could also be supplied as additional assumptions. Or, you could take your original RootOf() result, which represents the roots of a 4th degree polynomial, and try hitting that with allvalues().  It's just a question, but if you have no such extra information then how would you choose amongst the 4 explicit roots?

acer

Hi John,

Do you mean, more inert instances like,

_Inert_LESSEQ
_Inert_LESSTHAN
_Inert_STRING
_Inert_EXPSEQ
_Inert_RANGE

What about Limit() calls, which may produce,

    _Inert_FUNCTION(_Inert_NAME("Limit",...))

The same might be asked of Product() calls. But maybe that should be posed as a more general question. Would you want to mark up and treat specially these particular sorts of _Inert_FUNCTION,

_Inert_FUNCTION(_Inert_ASSIGNEDNAME("exp",...))
_Inert_FUNCTION(_Inert_ASSIGNEDNAME("BesselJ",...))

and so on, in ways analogous to how you treat

_Inert_FUNCTION(_Inert_ASSIGNEDNAME("conjugate",...))
_Inert_FUNCTION(_Inert_ASSIGNEDNAME("abs",...))

It's not clear to me whether (or how) you might want to treat these:

_Inert_UNEVAL
_Inert_ATTRIBUTE
_Inert_SERIES

acer

Suppose that I am editing a plaintext file using vim. In my ~/.vimrc file I have a macro like this,

" run maple on current file
map ,mm :!maple -s -F %

Now, while editing file foo.mpl, I type (without first hitting the Esc key)

   ,mm

That starts a TTY maple session, reading in the contents of the current file/buffer. When I quit that maple session, I am back in vim.

With more effort and ingenuity, one could fashion a vim macro that could set libname and enable a savelib() call embedded in the plaintext. So a source file containing procedure or module definitions could be made to load into private .mla archives, all done from within the vim session.

acer

Suppose that I am editing a plaintext file using vim. In my ~/.vimrc file I have a macro like this,

" run maple on current file
map ,mm :!maple -s -F %

Now, while editing file foo.mpl, I type (without first hitting the Esc key)

   ,mm

That starts a TTY maple session, reading in the contents of the current file/buffer. When I quit that maple session, I am back in vim.

With more effort and ingenuity, one could fashion a vim macro that could set libname and enable a savelib() call embedded in the plaintext. So a source file containing procedure or module definitions could be made to load into private .mla archives, all done from within the vim session.

acer

> f:=x->ln(2-cos(x)+sqrt(3+cos(x)*(cos(x)-4))):
> r:=(n,p)->(1/Pi)*int((1-exp(-abs(n)*f(x))*cos(p*x))/sinh(f(x)),x=0..Pi):

> r(0,1);

                                      1/2
 
> r(1,1);

                                      2
                                     ----
                                      Pi
 
> r(1,3);

                                  46/3 - 4 Pi
                                  -----------
                                      Pi
 
> r(2,5);

                                  2236   97 Pi
                                - ---- + -----
                                   15      2
                                --------------
                                      Pi

> kernelopts(version);
             Maple 11.02, X86 64 LINUX, Nov 9 2007 Build ID 330022

acer

In general this is not a good way. It does nothing to run avoid choosing as pivots some entries whose values are expression that are actually equal to zero. Such as hidden zeros can then propagate in the denominators of a row reduced with that pivot. When the resubstitution is done, the results can then be expressions for which any evaluation will immediately result in "error, division by zero".

acer

In general this is not a good way. It does nothing to run avoid choosing as pivots some entries whose values are expression that are actually equal to zero. Such as hidden zeros can then propagate in the denominators of a row reduced with that pivot. When the resubstitution is done, the results can then be expressions for which any evaluation will immediately result in "error, division by zero".

acer

Not sure what more you might be after. Was wmsical an IBM RT running AIX 2.2, as seen here? And you gave a uucp bang path. So your mail came through utoronto? Full path was usually what, utai!watmath!wmsical or uunet!watmath!wmsical ?

acer

Does anyone else think that having package member routines get displayed as subscripted names in 2D Math output is unhelpful and misleading?

acer

It was an educated guess, to choose that assumption. It looked a little like a distribution function, or something similar for which it might be plausible, and I suspected that Maple's int() might have trouble (due to branch issues) handling the 3/2-fractional power otherwise.

Note that `int` (as well as `simplify`) knows something about how to use assumptions. So you may also succeed in one step with,

int(expr,v=0..infinity) assuming m/(Pi*k*T)>0

acer

It was an educated guess, to choose that assumption. It looked a little like a distribution function, or something similar for which it might be plausible, and I suspected that Maple's int() might have trouble (due to branch issues) handling the 3/2-fractional power otherwise.

Note that `int` (as well as `simplify`) knows something about how to use assumptions. So you may also succeed in one step with,

int(expr,v=0..infinity) assuming m/(Pi*k*T)>0

acer

> p:=t^6+t^3+1:

> P:=subs(t=y^(1/3),p);
                                      2
                                P := y  + y + 1

And so on, taking all three cube roots of the two complex solutions of P=0.

acer

First 545 546 547 548 549 550 551 Last Page 547 of 591