A computer algebra system written in pure Python http://sympy.org/ . To get started to with contributing https://github.com/sympy/sympy/wiki/Introduction-to-contributing
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Fixed limits where expressions … (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Removed simplify call for sign(… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Added tests for all asymptotic… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Refactored limits for dealing w… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Fixed errors arising for limits… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
added bottom_up simplification … (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
added testing for changes adde… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
removed condition from leading … (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
minor changes (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Fixed failing test (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Fixed code quality failure (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
included exp forms for bessel f… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Minor change (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Refactored mrv_leadterm in grun… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Added e.is_negative case for be… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
hanled e.is_negative case for b… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Replacing exp rewrite with trig… (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Minor changes (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
added support when exponent of … (compare)
anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions
Fixed leading term method for b… (compare)
Last year expansion was causing slowdowns in the .equals
method. In sympy/sympy#19673 we had
In [10]: e1 = 100*(x**3 + 1)**99
In [11]: e2 = 300*x**2*(x**3 + 1)**99
In [12]: %time e1.equals(e2)
CPU times: user 1.13 s, sys: 9.37 ms, total: 1.14 s
Wall time: 1.15 s
Out[12]: False
It seems like the .equals
method has gotten faster. Anyone know what's changed?
(1+x)**n
as a binomial expansion , not sure I could find one . I ask this because I'm working on an issue which involves something like (1+x)**n- x**n
, now the issue works perfectly when we use numbers like (1+x)**3 - x**3
and we could solve this through gammasimp()
giving 3*x**2 + 3*x + 1
but symbolically not sure how we could approach it . Maybe if we could expand the (1+x)**n
as a binomial expansion and cancel out the first term which would always be x**n
then the maybe the issue wouldn't be that tough to solve . Currently gammasimp() isn't of much help ! and returns back the same expression !
>>> k, n = symbols('k, n', positive=True, integer=True) >>> from sympy import oo
>>> limit((n+1)**k/((n+1)**(k+1) - (n)**(k+1)), n, oo)
oo
>>> limit((n+1)**2/((n+1)**(3) - (n)**(3)), n, oo)
1/3
>>> limit((n+1)**2/((n+1)**(3) - (n)**(3)).gammasimp(), n, oo)
1/3
>>> limit((n+1)**k/((n+1)**(k+1) - (n)**(k+1)).gammasimp(), n, oo)
0
gammasimp()
there, so have to get that case correctly too ! Never thought a gammasimp()
would alter limits from oo
to 0
but it does .Maybe if I find it too buggy and some more places where it the (n+1)**k - n**k
combo goes wrong , i'll raise this !
(n+1)**k -(n)**k
gives the correct answer . I am not sure why this may be happening but obviously it feels a bit strange if different arrangements of the same expression can lead to different answers! The gammasimp of that expression which returns 0 is (-n*n**k + n*(n + 1)**k + (n + 1)**k)
x = sin(x)
or x = log(x)
,x = e**x
. First one should return 0 in the Real domain and the other 2 should return an empty set . solveset()
method returns something like ConditionSet(x, Eq(x - sin(x), 0), Complexes)
, ConditionSet(x, Eq(x - exp(x), 0), Complexes)
which is not wrong but not what I would like and solvify
returns Not implemented for these !
I need to create a vector function in sympy with actual vectors, that can be transformed between coordinate systems.
I saw this https://stackoverflow.com/questions/46993819/how-to-create-a-vector-function-in-sympy which uses Matrix() as a workaround.
I need to transform my input and output vector from one coordinate system to another (and back). How are vector functions done in that case?
def B_el(r_vec):
r1 = r_vec.i
r2 = r_vec.j
u = sin(r1)+cos(r2)
v = -cos(r1)+sin(r2)
return Matrix([u, v, 0])
What would i need to change in order to return a vector, which can be transformed into a different (also resting) coordinate system, differing in axis rotations and a location shift?def B_el(r_vec): r1 = r_vec.i r2 = r_vec.j u = sin(r1)+cos(r2) v = -cos(r1)+sin(r2) return Matrix([u, v, 0])
Traceback (most recent call last):
File "C:/Users/Andreas Schuldei/PycharmProjects/lissajous-achse/hgü-kabel-detektion-symbolic.py", line 109, in <module>
result = solve(equations, (CM0, theta_i, theta_j, theta_k, i, a, B_earth))
File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\solvers\solvers.py", line 1096, in solve
solution = _solve_system(f, symbols, **flags)
File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\solvers\solvers.py", line 1730, in _solve_system
i, d = _invert(g, *symbols)
File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\solvers\solvers.py", line 3118, in _invert
rhs -= indep
File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\numbers.py", line 2194, in __sub__
return Rational.__sub__(self, other)
File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\decorators.py", line 89, in __sympifyit_wrapper
return func(a, b)
File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\numbers.py", line 1725, in __sub__
return Number.__sub__(self, other)
File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\decorators.py", line 89, in __sympifyit_wrapper
return func(a, b)
File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\numbers.py", line 733, in __sub__
return AtomicExpr.__sub__(self, other)
File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\decorators.py", line 251, in _func
return func(self, other)
File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\decorators.py", line 126, in binary_op_wrapper
return f(self)
File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\decorators.py", line 127, in binary_op_wrapper
return func(self, other)
File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\vector\basisdependent.py", line 352, in __rsub__
raise TypeError("Invalid argument types for subtraction")
TypeError: Invalid argument types for subtraction
How can I inspect the individual equations in the list equations to narrow this down? The equations are relatively long, and I have no clue how to find this.