Maxima – 61 – Funzioni matematiche – funzioni per radici, esponenziali e logaritmi – 1

Continuo da qui, copio dal Reference Manual, PDF scaricabile da qui, sono a p.185.

%e_to_numlog
Default value: false.

When true, r some rational number, and x some expression, %e^(r*log(x)) will be simplified into x^r. It should be noted that the radcan command also does this transformation, and more complicated transformations of this ilk as well. The logcontract command “contracts” expressions containing log.

%emode
Default value: true.

When %emode is true, %e^(%pi %i x) is simplified as follows:

  • %e^(%pi %i x) simplifies to cos(%pi x) + %i sin(%pi x) if x is a floating point number, an integer, or a multiple of 1/2, 1/3, 1/4, or 1/6, and then further simplified.
  • For other numerical x, %e^(%pi %i x) simplifies to %e^(%pi %i y) where y is x - 2 k for some integer k such that abs(y) < 1.

When %emode is false, no special simplification of %e^(%pi %i x) is carried out.

(%i1) %emode;
(%o1)                                true
(%i2) %e^(%pi*%i*1);
(%o2)                                 - 1
(%i3) %e^(%pi*%i*216/144);
(%o3)                                - %i
(%i4) %e^(%pi*%i*192/144);
                                 sqrt(3) %i    1
(%o4)                         (- ----------) - -
                                     2         2
(%i5) %e^(%pi*%i*180/144);
                                  %i          1
(%o5)                        (- -------) - -------
                                sqrt(2)    sqrt(2)
(%i6) %e^(%pi*%i*120/144);
                                 %i   sqrt(3)
(%o6)                            -- - -------
                                 2       2
(%i7) %e^(%pi*%i*121/144);
                                   121 %i %pi
                                   ----------
                                      144
(%o7)                            %e

%enumer
Default value: false.

When %enumer is true, %e is replaced by its numeric value 2.718... whenever numer is true.

When %enumer is false, this substitution is carried out only if the exponent in %e^x evaluates to a number.

See also ev and numer.

(%i8) %enumer;
(%o8)                                false
(%i9) numer;
(%o9)                                false
(%i10) 2*%e;
(%o10)                               2 %e
(%i11) %enumer: true;
(%o11)                               true
(%i12) 2*%e;
(%o12)                               2 %e
(%i13) numer: true;
(%o13)                               true
(%i14) 2*%e;
(%o14)                         5.43656365691809
(%i15) 2*%e^1;
(%o15)                         5.43656365691809
(%i16) 2*%e^x;
                                                x
(%o16)                       2 2.718281828459045

exp (x)
Represents the exponential function. Instances of exp(x) in input are simplified to %e^x; exp does not appear in simplified expressions.

demoivre if true causes %e^(a + b %i) to simplify to %e^(a (cos(b) + %i sin(b))) if b is free of %i. See demoivre.

%emode, when true, causes %e^(%pi %i x) to be simplified. See %emode.

%enumer, when true causes %e to be replaced by 2.718... whenever numer is true. See %enumer.

(%i1) demoivre;
(%o1)                                false
(%i2) %e^(a + b*%i);
                                    %i b + a
(%o2)                             %e
(%i3) demoivre: true;
(%o3)                                true
(%i4) %e^(a + b*%i);
                             a
(%o4)                      %e  (%i sin(b) + cos(b))

li [s] (z)
Represents the polylogarithm function of order s and argument z, defined by the infinite series

li [1] is - log(1 - z). li [2] and li [3] are the dilogarithm and trilogarithm functions, respectively.

When the order is 1, the polylogarithm simplifies to - log(1 - z), which in turn simplifies to a numerical value if z is a real or complex floating point number or the numer evaluation flag is present.

When the order is 2 or 3, the polylogarithm simplifies to a numerical value if z is a real floating point number or the numer evaluation flag is present.

(%i1) assume (x > 0);
(%o1)                               [x > 0]
(%i2) integrate ((log (1 - t)) / t, t, 0, x);
(%o2)                              - li (x)
                                       2
(%i3) li [2] (7);
(%o3)                               li (7)
                                      2
(%i4) li [2] (7), numer;
(%o4)              1.248273182099424 - 6.113257028817991 %i
(%i5) li [3] (7);
(%o5)                               li (7)
                                      3
(%i6) li [2] (7), numer;
(%o6)              1.248273182099424 - 6.113257028817991 %i
(%i7) L : makelist (i / 4.0, i, 0, 8);
(%o7)          [0.0, 0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0]
(%i8) map (lambda ([x], li [2] (x)), L);
(%o8) [0.0, 0.2676526390827326, 0.5822405264650125, 0.978469392930306,
1.644934066848226, 2.190177011441645 - 0.7010261415046585 %i,
2.374395270272479 - 1.2738062049196 %i,
2.448686765338203 - 1.758084848210787 %i,
2.467401100272339 - 2.177586090303602 %i]
(%i9) map (lambda ([x], li [3] (x)), L);
(%o9) [0.0, 0.2584613957965733, 0.5372131936080402, 0.8444258088622044,
1.202056903159594, 1.642866881317829 - 0.07821473138972386 %i,
2.06087750732028 - 0.258241985293288 %i,
2.433418898226189 - 0.4919260187944042 %i,
2.762071906228924 - 0.7546938294602477 %i]

log (x)
Represents the natural (base e) logarithm of x.

Maxima does not have a built-in function for the base 10 logarithm or other bases: log10(x) := log(x) / log(10) is a useful definition.

Simplification and evaluation of logarithms is governed by several global flags.

  • logexpand causes log(a^b) to become b*log(a). If it is set to all, log(a*b) will also simplify to log(a)+log(b). If it is set to super, then log(a/b) will also simplify to log(a)-log(b) for rational numbers a/b, a#1. (log(1/b), for b integer, always simplifies.) If it is set to false, all of these simplifications will be turned off.
  • logsimp if false then no simplification of %e to a power containing log’s is done.
  • lognegint if true implements the rule log(-n) -> log(n)+%i*%pi for n a positive integer.
  • %e_to_numlog when true, r some rational number, and x some expression, the expression %e^(r*log(x)) will be simplified into x^r. It should be noted that the radcan command also does this transformation, and more complicated transformations of this as well. The logcontract command “contracts” expressions containing log.

logabs
Default value: false.

When doing indefinite integration where logs are generated, e.g. integrate(1/x,x), the answer is given in terms of log(abs(...)) if logabs is true, but in terms of log(...) if logabs is false. For definite integration, the logabs:true setting is used, because here “evaluation” of the indefinite integral at the endpoints is often needed.

logarc
logarc (expr)
When the global variable logarc is true, inverse circular and hyperbolic functions are replaced by equivalent logarithmic functions. The default value of logarc is false.

The function logarc(expr) carries out that replacement for an expression expr without setting the global variable logarc.

logconcoeffp
Default value: false.

Controls which coefficients are contracted when using logcontract. It may be set to the name of a predicate function of one argument. E.g. if you like to generate SQRTs, you can do logconcoeffp:'logconfun$ logconfun(m):=featurep(m,integer) or ratnump(m)$. Then logcontract(1/2*log(x)); will give log(sqrt(x)).

logcontract (expr)
Recursively scans the expression expr, transforming subexpressions of the form a1*log(b1) + a2*log(b2) + c into log(ratsimp(b1^a1 * b2^a2)) + c.

(%i1) 2*(a*log(x) + 2*a*log(y))$

(%i2) logcontract(%);
                                        2  4
(%o2)                            a log(x  y )

The declaration declare(n,integer) causes logcontract(2*a*n*log(x)) to simplify to a*log(x^(2*n)). The coefficients that “contract” in this manner are those such as the 2 and the n here which satisfy featurep(coeff,integer). The user can control which coefficients are contracted by setting the option logconcoeffp to the name of a predicate function of one argument. E.g. if you like to generate SQRTs, you can do logconcoeffp:'logconfun$ logconfun(m):=featurep(m,integer) or ratnump(m)$. Then logcontract(1/2*log(x)); will give log(sqrt(x)).

Pausa 😐

Posta un commento o usa questo indirizzo per il trackback.

Trackback

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo di WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione /  Modifica )

Google photo

Stai commentando usando il tuo account Google. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...

Questo sito utilizza Akismet per ridurre lo spam. Scopri come vengono elaborati i dati derivati dai commenti.

%d blogger hanno fatto clic su Mi Piace per questo: