Doctorleff

15 Reputation

2 Badges

11 years, 315 days

MaplePrimes Activity


These are replies submitted by Doctorleff

    |\^/|     Maple V Release 3 (Governors State University)
._|\|   |/|_. Copyright (c) 1981-1994 by Waterloo Maple Software and the
 \  MAPLE  /  University of Waterloo. All rights reserved. Maple and Maple V
 <____ ____>  are registered trademarks of Waterloo Maple Software.
      |       Type ? for help.
#Thanks for the suggestion about using functions with the assume function.  
#That solves some of my problems.  Here are some examples with integrals.
> int (exp(-x^2),x=3..infinity);
                                1/2         1/2
                          1/2 Pi    - 1/2 Pi    erf(3)

> assume(a>0);
> int(exp(-a*x^2),x=3..infinity);
                             1/2         1/2         1/2
                           Pi          Pi    erf(3 a~   )
                       1/2 ----- - 1/2 ------------------
                             1/2                1/2
                           a~                 a~

> assume(b(i)>0);
> int(exp(-x^2*b(i)),x=3..infinity);
                            1/2          1/2            1/2
                          Pi           Pi    erf(3 b(i~)   )
                    1/2 -------- - 1/2 ---------------------
                             1/2                   1/2
                        b(i~)                 b(i~)

> int(exp(-x^2*b(i+1)),x=3..infinity);
bytes used=1002696, alloc=720764, time=0.08
                       1/2              1/2            1/2                1/2
                     Pi    erf(b(i~ + 1)    x)       Pi    erf(3 b(i~ + 1)   )
  limit          1/2 ------------------------- - 1/2 -------------------------
  x -> infinity-                     1/2                             1/2
                            b(i~ + 1)                       b(i~ + 1)

> assume(b(i+1)>0);
Error, (in property/Rename) invalid substitution in proc
> int(exp(-x^2*b(i+1)),x=3..infinity);
                       1/2              1/2            1/2                1/2
                     Pi    erf(b(i~ + 1)    x)       Pi    erf(3 b(i~ + 1)   )
  limit          1/2 ------------------------- - 1/2 -------------------------
  x -> infinity-                     1/2                             1/2
                            b(i~ + 1)                       b(i~ + 1)

# I read about the "assuming" option in the web; but in
# in the decade-old verson that is availabale to me remotely, it is not
# implemented as of the 1994 version I use.
#int(exp(-x^2*b(i+1)),x=3..infinity) assuming positive;

> for i from 1 to n do
>    assume (evaln(`b`.i) > 0);
> od;
> int(exp(-x^2*b3),x=3..infinity);
                             1/2         1/2          1/2
                           Pi          Pi    erf(3 b3~   )
                      1/2 ------ - 1/2 -------------------
                             1/2                 1/2
                          b3~                 b3~

# so it sets all of b1 to b10 as marked as having the assumption positive.
# However I don't see a way ot have the equivalent of  b[i] or b[i+1]
#  marked as positive for this purpose

    |\^/|     Maple V Release 3 (Governors State University)
._|\|   |/|_. Copyright (c) 1981-1994 by Waterloo Maple Software and the
 \  MAPLE  /  University of Waterloo. All rights reserved. Maple and Maple V
 <____ ____>  are registered trademarks of Waterloo Maple Software.
      |       Type ? for help.
#Carl Loves answered another question on assume and indexed variables.
#That solves some of my problems.  Here are some examples with integrals.
> int (exp(-x^2),x=3..infinity);
                                1/2         1/2
                          1/2 Pi    - 1/2 Pi    erf(3)

> assume(a>0);
> int(exp(-a*x^2),x=3..infinity);
                             1/2         1/2         1/2
                           Pi          Pi    erf(3 a~   )
                       1/2 ----- - 1/2 ------------------
                             1/2                1/2
                           a~                 a~

> assume(b(i)>0);
> int(exp(-x^2*b(i)),x=3..infinity);
                            1/2          1/2            1/2
                          Pi           Pi    erf(3 b(i~)   )
                    1/2 -------- - 1/2 ---------------------
                             1/2                   1/2
                        b(i~)                 b(i~)

> int(exp(-x^2*b(i+1)),x=3..infinity);
bytes used=1002696, alloc=720764, time=0.08
                       1/2              1/2            1/2                1/2
                     Pi    erf(b(i~ + 1)    x)       Pi    erf(3 b(i~ + 1)   )
  limit          1/2 ------------------------- - 1/2 -------------------------
  x -> infinity-                     1/2                             1/2
                            b(i~ + 1)                       b(i~ + 1)

> assume(b(i+1)>0);
Error, (in property/Rename) invalid substitution in proc
> int(exp(-x^2*b(i+1)),x=3..infinity);
                       1/2              1/2            1/2                1/2
                     Pi    erf(b(i~ + 1)    x)       Pi    erf(3 b(i~ + 1)   )
  limit          1/2 ------------------------- - 1/2 -------------------------
  x -> infinity-                     1/2                             1/2
                            b(i~ + 1)                       b(i~ + 1)

# I read about the "assuming" option in the web; but in
# in the decade-old verson that is availabale to me remotely, it is not
# implemented as of the 1994 version I use.
#int(exp(-x^2*b(i+1)),x=3..infinity) assuming positive;

> for i from 1 to n do
>    assume (evaln(`b`.i) > 0);
> od;
> int(exp(-x^2*b3),x=3..infinity);
                             1/2         1/2          1/2
                           Pi          Pi    erf(3 b3~   )
                      1/2 ------ - 1/2 -------------------
                             1/2                 1/2
                          b3~                 b3~

# so it sets all of b1 to b10 as marked as having the assumption positive.
# However I don't see a way ot have the equivalent of  b[i] or b[i+1]
#  marked as positive for this purpose

Thanks for your response, but you are answering the wrong question.  I am outputting troff or more precisely

input to the geqn preprocessor to troff.   How do I say

x := long complicated espression

readlib(eqn);

eqn(x);

The troff only shows a single line which is too long to fit on the screen.

Thanks for your response, but you are answering the wrong question.  I am outputting troff or more precisely

input to the geqn preprocessor to troff.   How do I say

x := long complicated espression

readlib(eqn);

eqn(x);

The troff only shows a single line which is too long to fit on the screen.

Page 1 of 1