The SymPy package adds / for PyObjects and other functions so that working
with SymPy is a bit easier that going through PyCall directly. The package
needed a besselj function though. One is added now, output below. The
problem is that the sympy functions are not generated programmatically,
rather added by hand one by one.
julia> using SymPy
julia> r= Sym("r")
julia> limit(besselj(1, r)/r, r, 0)
1/2
On Monday, August 11, 2014 4:37:49 AM UTC-4, Hans W Borchers wrote:
>
> As far as I see, Sympy *does* know the limit at 0.0:
>
> >>> from sympy import *
> >>> x = symbols('x')
> >>> limit(besselj(1, x)/x, x, 0)
> 1/2
>
> If in Julia you call it like limit(besselj(1, x)/x, x, 0), then Julia
> assumes it to be its own function, not SymPy's.
>
> If on the other hand you call all SymPy functions fully expanded:
>
> julia> using PyCall
>
> julia> @pyimport sympy
>
> julia> x = sympy.symbols("x")
>
> julia> sympy.limit(sympy.besselj(1, x)/x, x, 0.0)
> `/` has no method matching /(::PyObject, ::PyObject)
>
> So the problem seems to be with how PyCall interprets this expression
> before sending it to SymPy.
>
>
> On Monday, August 11, 2014 5:55:56 AM UTC+2, Zahirul ALAM wrote:
>>
>> Is there way of calculating limit of a function?
>>
>> I have tried SymPy Package. But it unfortunately doesnot compute limit
>> for bessel function.
>>
>> r= Sym("r")
>> limit(besselj(1, r)/r, r, 0)
>>
>> returns the following error:
>>
>> `besselj` has no method matching besselj(::Int64, ::Sym)
>> while loading In[27], in expression starting on line 1
>>
>>
>> the it works for cosine, sine,
>> r= Sym("r")
>> limit(sin( r)/r, r, 0)
>>
>> Any idea? is there a built an undocumented Julia function which can
>> calculate limit?
>>
>>
>>
>>