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

Class SymbolicFunctionEvaluation_delayed

source code

                      object --+                        
                               |                        
structure.sage_object.SageObject --+                    
                                   |                    
           structure.element.Element --+                
                                       |                
         structure.element.ModuleElement --+            
                                           |            
               structure.element.RingElement --+        
                                               |        
                              SymbolicExpression --+    
                                                   |    
                          SymbolicFunctionEvaluation --+
                                                       |
                                                      SymbolicFunctionEvaluation_delayed


We create an example of such a thing.

EXAMPLES:
    sage: f = sage.calculus.calculus.symbolic_expression_from_maxima_string("?%jacobi_cd")
    sage: type(f)
    <class 'sage.calculus.calculus.SymbolicFunction_delayed'>
    sage: g = f(10)
    sage: type(g)
    <class 'sage.calculus.calculus.SymbolicFunctionEvaluation_delayed'>
    sage: g
    jacobi_cd(10)



Instance Methods [hide private]
 
simplify(self)
Return the simplified form of this symbolic expression.
source code
 
_has_been_simplified(self)
Return True if this symbolic expression was constructed in such a way that it is known to already be simplified.
source code
 
__float__(self) source code
 
__complex__(self) source code
 
_real_double_(self, R) source code
 
_real_rqdf_(self, R) source code
 
_complex_double_(self, C) source code
 
_mpfr_(self, field) source code
 
_complex_mpfr_field_(self, field) source code
 
_maxima_init_(self)
Return string that in Maxima evaluates to something equivalent to \code{self}.
source code

Inherited from SymbolicFunctionEvaluation: __init__, _latex_, _mathematica_init_, _repr_, arguments, variables

Inherited from SymbolicExpression: __abs__, __call__, __cmp__, __eq__, __ge__, __gt__, __hash__, __int__, __le__, __long__, __lt__, __ne__, __nonzero__, __pow__, __str__, _add_, _axiom_init_, _div_, _fast_float_, _gap_init_, _gp_init_, _integer_, _kash_init_, _macaulay2_init_, _magma_init_, _maple_init_, _maxima_, _mul_, _neg_, _octave_init_, _pari_init_, _polynomial_, _rational_, _richcmp_, _singular_init_, _sub_, _sys_init_, 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, number_of_arguments, numerator, numerical_approx, partial_fraction, plot, poly, polynomial, power_series, radical_simplify, rational_expand, rational_simplify, real, roots, show, 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]

simplify(self)

source code 

Return the simplified form of this symbolic expression.

NOTE: Expressions always print simplified; a simplified
expression is distinguished because the way it prints agrees
with its underlyilng representation.

OUTPUT:
    symbolic expression -- a simplified symbolic expression

EXAMPLES:
We create the symbolic expression $x - x + 1$, which is of
course equal to $1$.
    sage: Z = x - x + 1

It prints as $1$ but is really a symbolic arithmetic object,
that has the information of the full expression:
    sage: Z
    1
    sage: type(Z)
    <class 'sage.calculus.calculus.SymbolicArithmetic'>

Calling simplify returns a new object $W$ (it does not change $Z$),
which actually simplified:
    sage: W = Z.simplify(); W
    1

Thus $W$ is a single constant:
    sage: type(W)
    <class 'sage.calculus.calculus.SymbolicConstant'>

The \code{_has_been_simplified} method tells whether an object was
constructed by simplifying -- or at least is known to be already
simplified:
    sage: Z._has_been_simplified()
    False
    sage: W._has_been_simplified()
    True

Note that \code{__init__} automatically calls \code{_simp} when a
symbolic expression is created:
    sage: f = x*x*x - (1+1+1)*x*x + 2 + 3 + 5 + 7 + 11; f
    x^3 - 3*x^2 + 28
    sage: x*x*x
    x^3

\code{simplify}, however, can be called manually:
    sage: f
    x^3 - 3*x^2 + 28
    sage: f.simplify()
    x^3 - 3*x^2 + 28

Overrides: SymbolicExpression.simplify
(inherited documentation)

_has_been_simplified(self)

source code 

Return True if this symbolic expression was constructed in
such a way that it is known to already be simplified.

WARNING: An expression that happens to be in a simplified form
need not return True.

EXAMPLES:
This expression starts in simple form:
    sage: f = x^2 + 1; f
    x^2 + 1

But it has not been simplified, i.e., it was constructed
as a simplified expression. 
    sage: f._has_been_simplified()
    False
    sage: g = f.simplify(); g
    x^2 + 1
    sage: g._has_been_simplified()
    True

This function still does not return True, since f itself
isn't constructed as a simplified expression.
    sage: f._has_been_simplified()
    False

Here, though f looks simplified when printed, internally
it is much more complicated and hence not simplified. 
    sage: f = x + 1 - x; f
    1
    sage: f._has_been_simplified()
    False
    sage: type(f)
    <class 'sage.calculus.calculus.SymbolicArithmetic'>
    sage: f._operands
    [x + 1, x]            

Overrides: SymbolicExpression._has_been_simplified
(inherited documentation)

__float__(self)

source code 
Overrides: SymbolicFunctionEvaluation.__float__

_real_double_(self, R)

source code 
Overrides: SymbolicExpression._real_double_

_real_rqdf_(self, R)

source code 
Overrides: SymbolicExpression._real_rqdf_

_complex_double_(self, C)

source code 
Overrides: SymbolicExpression._complex_double_

_mpfr_(self, field)

source code 
Overrides: SymbolicExpression._mpfr_

_complex_mpfr_field_(self, field)

source code 
Overrides: SymbolicExpression._complex_mpfr_field_

_maxima_init_(self)

source code 

Return string that in Maxima evaluates to something
equivalent to \code{self}.

EXAMPLES:
    sage: f = function('Gamma', var('w'), var('theta')); f
    Gamma(w, theta)
    sage: f._maxima_init_()
    "'Gamma(w, theta)"
    sage: maxima(f(sqrt(2), theta+3))
    'Gamma(sqrt(2),theta+3)

Overrides: SymbolicFunctionEvaluation._maxima_init_
(inherited documentation)