403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.156
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/sympy/series/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/sympy/series/__pycache__/limitseq.cpython-310.pyc
o

�8Va�@s�dZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZdd	lmZmZdd
lmZddlmZddlmZmZdd
lmZmZddlmZddd�Zdd�Zdd�Z dd�Z!ddd�Z"dS)zLimits of sequences�)�Add)�	PoleError)�Pow)�S)�Dummy)�sympify)�	fibonacci)�	factorial�subfactorial)�gamma)�Abs)�Max�Min)�cos�sin)�LimitN�cCs�t|�}|dur%|j}t|�dkr|��}nt|�dkrtjStd|��t|�}|jdus3|jdur7td��t	|d�rF|�
||�}|rF|S|�|||�|S)a�Difference Operator.

    Explanation
    ===========

    Discrete analog of differential operator. Given a sequence x[n],
    returns the sequence x[n + step] - x[n].

    Examples
    ========

    >>> from sympy import difference_delta as dd
    >>> from sympy.abc import n
    >>> dd(n*(n + 1), n)
    2*n + 2
    >>> dd(n*(n + 1), n, 2)
    4*n + 6

    References
    ==========

    .. [1] https://reference.wolfram.com/language/ref/DifferenceDelta.html
    NrrzqSince there is more than one variable in the expression, a variable must be supplied to take the difference of %sFzStep should be a finite number.�_eval_difference_delta)r�free_symbols�len�popr�Zero�
ValueError�	is_number�	is_finite�hasattrr�subs)�expr�n�step�f�result�r"�7/usr/lib/python3/dist-packages/sympy/series/limitseq.py�difference_deltas$
�
r$cCs�t�|jdd��}|d}|g}|dd�D]*}||��}t||�}|dur*dS|jr3|}|g}q|tjtjfvr@|�	|�qt
|�dkrIdS|S)a�Finds the dominant term in a sum, that is a term that dominates
    every other term.

    Explanation
    ===========

    If limit(a/b, n, oo) is oo then a dominates b.
    If limit(a/b, n, oo) is 0 then b dominates a.
    Otherwise, a and b are comparable.

    If there is no unique dominant term, then returns ``None``.

    Examples
    ========

    >>> from sympy import Sum
    >>> from sympy.series.limitseq import dominant
    >>> from sympy.abc import n, k
    >>> dominant(5*n**3 + 4*n**2 + n + 1, n)
    5*n**3
    >>> dominant(2**n + Sum(k, (k, 0, n)), n)
    2**n

    See Also
    ========

    sympy.series.limitseq.dominant
    T)�func���Nr)r�	make_args�expand�	gammasimp�	limit_seq�is_zeror�Infinity�NegativeInfinity�appendr)rr�terms�term0�comp�t�e�lr"r"r#�dominantBs"

�r5c	Cs2zt||tj�jdd�WSttfyYdSw)NF)�deep)rrr,�doit�NotImplementedErrorr)rrr"r"r#�
_limit_infqs
�r9csddlm}t|�D]}|�|�st|��}|dur|S|��\}}|���r.|���s@t|����}|dur=|SdS�fdd�||fD�\}}||��}|�|�set|��}|dure|S|��\}}t|��}|durwdSt|��}|dur�dS||��}q
dS)Nr��Sumc3s�|]
}t|����VqdS�N)r$r()�.0r2�rr"r#�	<genexpr>�s�z_limit_seq.<locals>.<genexpr>)	�sympy.concrete.summationsr;�range�hasr9�as_numer_denomr7r)r5)rr�trialsr;�ir!�num�denr"r>r#�
_limit_seqxs6





�rH�cs�ddlm}ddlm}�dur&|j}t|�dkr|���n|s"|Std���|jvr-|S|�t	t
j�}|�tt
t�}tdddd	�}tdddd
�}tdddd�}dd
�|�t�D�}	t�fdd
�|	D��sk|�tt�r�t|��|i�|��}
|
dur�t|��|i�|��}|
|kr�|
jr�|jr�|t|
|�t|
|��SdSnt|��|i�|��}
|
dur�|
S|jrˇ�fdd�|jD�}tdd
�|D��r�dSt|�S|�|�s�tt|��|i��|��}
|
dur�|
jr�t
j SdSdSdS)a�Finds the limit of a sequence as index ``n`` tends to infinity.

    Parameters
    ==========

    expr : Expr
        SymPy expression for the ``n-th`` term of the sequence
    n : Symbol, optional
        The index of the sequence, an integer that tends to positive
        infinity. If None, inferred from the expression unless it has
        multiple symbols.
    trials: int, optional
        The algorithm is highly recursive. ``trials`` is a safeguard from
        infinite recursion in case the limit is not easily computed by the
        algorithm. Try increasing ``trials`` if the algorithm returns ``None``.

    Admissible Terms
    ================

    The algorithm is designed for sequences built from rational functions,
    indefinite sums, and indefinite products over an indeterminate n. Terms of
    alternating sign are also allowed, but more complex oscillatory behavior is
    not supported.

    Examples
    ========

    >>> from sympy import limit_seq, Sum, binomial
    >>> from sympy.abc import n, k, m
    >>> limit_seq((5*n**3 + 3*n**2 + 4) / (3*n**3 + 4*n - 5), n)
    5/3
    >>> limit_seq(binomial(2*n, n) / Sum(binomial(2*k, k), (k, 1, n)), n)
    3/4
    >>> limit_seq(Sum(k**2 * Sum(2**m/m, (m, 1, k)), (k, 1, n)) / (2**n*n), n)
    4

    See Also
    ========

    sympy.series.limitseq.dominant

    References
    ==========

    .. [1] Computing Limits of Sequences - Manuel Kauers
    rr:)�AccumulationBoundsNrzAExpression has more than one variable. Please specify a variable.rT)�integer�positive)�oddrL)�evenrLcss�|]}|��VqdSr<)�as_base_exp)r=�pr"r"r#r?���zlimit_seq.<locals>.<genexpr>c3s$�|]
\}}|jo
|���VqdSr<)�is_negativerB)r=�br3r>r"r#r?�s�"csg|]}t|����qSr")r*)r=�term�rrDr"r#�
<listcomp>�szlimit_seq.<locals>.<listcomp>css�|]}|duVqdSr<r")r=r!r"r"r#r?�rQ)!r@r;�sympy.calculus.utilrJrrrr�rewriterr�GoldenRatior	r
rr�atomsr�anyrBrrrH�xreplace�
is_comparablerr
�is_Add�argsrrr+r)rrrDr;rJ�free�n_�n1�n2�powers�L1�L2�limits�limr"rUr#r*�sT0


��
�r*)Nr)NrI)#�__doc__�sympy.core.addr�sympy.core.functionr�sympy.core.powerr�sympy.core.singletonr�sympy.core.symbolr�sympy.core.sympifyr�%sympy.functions.combinatorial.numbersr�(sympy.functions.combinatorial.factorialsr	r
�'sympy.functions.special.gamma_functionsr�$sympy.functions.elementary.complexesr�(sympy.functions.elementary.miscellaneousr
r�(sympy.functions.elementary.trigonometricrr�sympy.series.limitsrr$r5r9rHr*r"r"r"r#�<module>s&
0/%

Youez - 2016 - github.com/yon3zu
LinuXploit