Package sage :: Package calculus :: Module calculus :: Class SymbolicComposition
[hide private]
[frames] | no frames]

Class SymbolicComposition

source code

                      object --+                        
                               |                        
structure.sage_object.SageObject --+                    
                                   |                    
           structure.element.Element --+                
                                       |                
         structure.element.ModuleElement --+            
                                           |            
               structure.element.RingElement --+        
                                               |        
                              SymbolicExpression --+    
                                                   |    
                                   SymbolicOperation --+
                                                       |
                                                      SymbolicComposition


Represents the symbolic composition of $f \circ g$.



Instance Methods [hide private]
 
__init__(self, f, g)
INPUT: f, g -- both must be in the symbolic expression ring.
source code
 
_polynomial_(self, R)
Symbolic compositions cannot be converted to polynomials unless they are constants.
source code
 
number_of_arguments(self)
Returns the number of arguments that \code{self} can take.
source code
 
_recursive_sub(self, kwds) source code
 
_recursive_sub_over_ring(self, kwds, ring) source code
 
_is_atomic(self)
File: sage/structure/element.pyx (starting at line 497) Return True if and only if parenthesis are not required when *printing* out any of $x - s$, $x + s$, $x^s$ and $x/s$.
source code
 
_repr_(self, simplify=True)
File: sage/structure/element.pyx (starting at line 291)
source code
 
_maxima_init_(self) source code
 
_latex_(self) source code
 
_sys_init_(self, system) source code
 
_mathematica_init_(self) source code
 
__float__(self) source code
 
_fast_float_(self, *vars)
EXAMPLES: sage: x,y,z = var('x,y,z') sage: f = 1 + sin(x)/x + sqrt(z^2+y^2)/cosh(x) sage: ff = f._fast_float_('x', 'y', 'z') sage: f(1.0,2.0,3.0) 4.1780638977866...
source code
 
__complex__(self)
Convert this symbolic composition to a Python complex number.
source code
 
_mpfr_(self, field)
Coerce to a multiprecision real number.
source code
 
_complex_mpfr_field_(self, field)
Coerce to a multiprecision complex number.
source code
 
_complex_double_(self, field)
Coerce to a complex double.
source code
 
_real_double_(self, field)
Coerce to a real double.
source code
 
_real_rqdf_(self, field)
Coerce to a real qdrf.
source code
 
_algebraic_(self, field)
Coerce to an algebraic number.
source code

Inherited from SymbolicOperation: variables

Inherited from SymbolicExpression: __abs__, __call__, __cmp__, __eq__, __ge__, __gt__, __hash__, __int__, __le__, __long__, __lt__, __ne__, __nonzero__, __pow__, __str__, _add_, _axiom_init_, _div_, _gap_init_, _gp_init_, _integer_, _kash_init_, _macaulay2_init_, _magma_init_, _maple_init_, _maxima_, _mul_, _neg_, _octave_init_, _pari_init_, _rational_, _richcmp_, _singular_init_, _sub_, arguments, coeff, coefficient, coefficients, coeffs, combine, conjugate, default_variable, denominator, derivative, diff, differentiate, display2d, exp_simplify, expand, expand_rational, expand_trig, factor, factor_list, find_maximum_on_interval, find_minimum_on_interval, find_root, full_simplify, function, gradient, hessian, imag, integral, integrate, inverse_laplace, laplace, limit, log_simplify, minpoly, n, nintegral, nintegrate, norm, numerator, numerical_approx, partial_fraction, plot, poly, polynomial, power_series, radical_simplify, rational_expand, rational_simplify, real, roots, show, simplify, simplify_exp, simplify_full, simplify_log, simplify_radical, simplify_rational, simplify_trig, solve, subs, subs_expr, substitute, substitute_over_ring, taylor, trig_expand, trig_simplify

Inherited from structure.element.RingElement: __div__, __idiv__, __imul__, __invert__, __mul__, __new__, __pos__, __rdiv__, __rmul__, __rpow__, __rtruediv__, __truediv__, _idiv_, _imul_, abs, additive_order, is_nilpotent, is_one, is_unit, multiplicative_order, order

Inherited from structure.element.ModuleElement: __add__, __iadd__, __isub__, __neg__, __radd__, __rsub__, __sub__, _iadd_, _ilmul_, _isub_, _lmul_, _rmul_

Inherited from structure.element.Element: __reduce__, __rxor__, __xor__, _cmp_, _im_gens_, base_base_extend, base_base_extend_canonical_sym, base_extend, base_extend_canonical, base_extend_canonical_sym, base_extend_recursive, base_ring, category, is_zero, parent

Inherited from structure.sage_object.SageObject: __repr__, _axiom_, _gap_, _gp_, _interface_, _interface_init_, _interface_is_cached_, _kash_, _macaulay2_, _magma_, _maple_, _mathematica_, _octave_, _pari_, _r_init_, _sage_, _singular_, db, dump, dumps, rename, reset_name, save, version

Inherited from object: __delattr__, __getattribute__, __reduce_ex__, __setattr__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, f, g)
(Constructor)

source code 

INPUT:
    f, g -- both must be in the symbolic expression ring.

Overrides: SymbolicOperation.__init__

_polynomial_(self, R)

source code 

Symbolic compositions cannot be converted to polynomials unless
they are constants.

EXAMPLES:
    sage: sqrt(2).polynomial(RR)
    1.41421356237310
    
    sage: sqrt(2).polynomial(CC)
    1.41421356237310

    sage: cos(x).polynomial(QQ)
    Traceback (most recent call last):
    ....
    TypeError: cannot convert self (= cos(x)) to a polynomial

    sage: sqrt(x).polynomial(QQ)
    Traceback (most recent call last):
    ....
    TypeError: cannot convert self (= sqrt(x)) to a polynomial

    sage: K3.<a> = NumberField(sqrt(x))
    Traceback (most recent call last):
    ....
    TypeError: polynomial (=sqrt(x)) must be a polynomial.

Overrides: SymbolicExpression._polynomial_

number_of_arguments(self)

source code 

Returns the number of arguments that \code{self} can take.

EXAMPLES:
    sage: sqrt(x).number_of_arguments()
    1
    sage: sqrt(2).number_of_arguments()
    0

Overrides: SymbolicOperation.number_of_arguments

_recursive_sub(self, kwds)

source code 
Overrides: SymbolicExpression._recursive_sub

_recursive_sub_over_ring(self, kwds, ring)

source code 
Overrides: SymbolicExpression._recursive_sub_over_ring

_is_atomic(self)

source code 
File: sage/structure/element.pyx (starting at line 497)

Return True if and only if parenthesis are not required when
*printing* out any of $x - s$, $x + s$, $x^s$ and $x/s$.

EXAMPLES:
    sage: n = 5; n._is_atomic()
    True
    sage: n = x+1; n._is_atomic()
    False

Overrides: structure.element.Element._is_atomic
(inherited documentation)

_repr_(self, simplify=True)

source code 
File: sage/structure/element.pyx (starting at line 291)

Overrides: structure.element.Element._repr_
(inherited documentation)

_maxima_init_(self)

source code 
Overrides: SymbolicExpression._maxima_init_

_sys_init_(self, system)

source code 
Overrides: SymbolicExpression._sys_init_

_mathematica_init_(self)

source code 
Overrides: SymbolicExpression._mathematica_init_

_fast_float_(self, *vars)

source code 

EXAMPLES: 
    sage: x,y,z = var('x,y,z')
    sage: f = 1 + sin(x)/x + sqrt(z^2+y^2)/cosh(x)
    sage: ff = f._fast_float_('x', 'y', 'z')
    sage: f(1.0,2.0,3.0)
    4.1780638977866...
    sage: ff(1.0,2.0,3.0)
    4.17806389778660...

Overrides: SymbolicExpression._fast_float_
(inherited documentation)

__complex__(self)

source code 

Convert this symbolic composition to a Python complex number.

EXAMPLES:
    sage: complex(cos(3))
    (-0.98999249660044542+0j)
    sage: complex(cos(3*I))
    (10.067661995777771+0j)

_mpfr_(self, field)

source code 

Coerce to a multiprecision real number.

EXAMPLES:
    sage: RealField(100)(sin(2)+cos(2))
    0.49315059027853930839845163641

    sage: RR(sin(pi))
    1.22464679914735e-16

    sage: type(RR(sqrt(163)*pi))
    <type 'sage.rings.real_mpfr.RealNumber'>

    sage: RR(coth(pi))
    1.00374187319732
    sage: RealField(100)(coth(pi))
    1.0037418731973212882015526912
    sage: RealField(200)(arccos(1/10))
    1.4706289056333368228857985121870581235299087274579233690964            

Overrides: SymbolicExpression._mpfr_

_complex_mpfr_field_(self, field)

source code 

Coerce to a multiprecision complex number.

EXAMPLES:
    sage: ComplexField(100)(sin(2)+cos(2)+I)
    0.49315059027853930839845163641 + 1.0000000000000000000000000000*I
    

Overrides: SymbolicExpression._complex_mpfr_field_

_complex_double_(self, field)

source code 

Coerce to a complex double.

EXAMPLES:
    sage: CDF(sin(2)+cos(2)+I)
    0.493150590279 + 1.0*I
    sage: CDF(coth(pi))
    1.0037418732

Overrides: SymbolicExpression._complex_double_

_real_double_(self, field)

source code 

Coerce to a real double.

EXAMPLES:
    sage: RDF(sin(2)+cos(2))
    0.493150590279

Overrides: SymbolicExpression._real_double_

_real_rqdf_(self, field)

source code 

Coerce to a real qdrf.

EXAMPLES:
    

Overrides: SymbolicExpression._real_rqdf_

_algebraic_(self, field)

source code 

Coerce to an algebraic number.

EXAMPLES:
    sage: QQbar(sqrt(2))
    [1.4142135623730949 .. 1.4142135623730952]
    sage: AA(abs(1+I))
    [1.4142135623730949 .. 1.4142135623730952]