Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 12 01:39

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    (compare)

  • Sep 11 12:19

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Implemented leading term and ns… (compare)

  • Sep 10 03:21

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    made changes (compare)

  • Sep 08 06:28

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    added tests for leading terms f… (compare)

  • Sep 08 03:43

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Changed the outputs being retur… (compare)

  • Sep 07 09:34

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Changed leading term being ret… (compare)

  • Sep 07 07:27

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Removed Redundant block from le… (compare)

  • Sep 07 02:44

    anutosh491 on GSoC_Pr4.3_Implementing_some_series_method_for_uppergamma_lowergamma_expint_and_other_errors_functions

    Implemented some series methods… (compare)

  • Sep 06 16:44

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Removed Order term (compare)

  • Sep 06 11:39

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    added test cases for limits and… (compare)

  • Sep 06 10:51

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Implemented leading term and ns… (compare)

  • Sep 06 10:40

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    (compare)

  • Sep 06 04:13

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    This commit does the following … Refactored mrv_leadterm in grun… Fixed errors arising for limits… and 3 more (compare)

  • Sep 06 02:08

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    fix(integrals): handle degenera… functions: Generalised Dirichle… author: update Megan Ly in .mai… and 23 more (compare)

  • Sep 05 14:16

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Changed if condition for bessel… (compare)

  • Sep 05 02:49

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Improved code quality (compare)

  • Sep 03 10:24

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    changed is function to equality… (compare)

  • Sep 03 10:14

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    fixed failing tests (compare)

  • Sep 01 12:23

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Fixed code quality (compare)

  • Sep 01 12:00

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Added case where number of term… (compare)

lesshaste
@lesshaste
@yasphy There are quite a lot of things. It might depend how easy you want it to be
Yashvardhan Prasad
@yasphy
Any example to elaborate??
lesshaste
@lesshaste
@yasphy for example systems of linear diophantine equations.
they have code but it just isn't reviewed and merged
Yashvardhan Prasad
@yasphy
Ok..thanks for the response
Anutosh Bhat
@anutosh491
Hello guys , I wanted to know whether there is a way that I could expand (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 !
Kalevi Suominen
@jksuom
@anutosh491 Can you use the explicit binomial expansion? Something like Sum(binomial(n, k)*x**k, (k, 0, n)) for (1 + x)**n.
Anutosh Bhat
@anutosh491
Yeah @jksuom that works , would surely go for that ! Just wanted to confirm whether we had some method to deal with this . The issue I'm trying to tackle is this
>>> 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
This is somewhat required to solve a somewhat bigger issue i'm trying to approach !
Anutosh Bhat
@anutosh491
works fine numerically but symbolically should return 1/k+1 , also there is somewhat involvement of 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 !
Anutosh Bhat
@anutosh491
 >>> limit((n+1)**k/(n*(-n**k + (n + 1)**k) + (n + 1)**k), n, oo)
1/(k + 1)
Apparently this arrangement of (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)
falematte
@falematte
Hello guys, I have an expression that I am expanding using "series" with respect to the expression epsilon. I would like to tell sympy that some expressions must be considered of order epsilon instead of order 0. Is this possible? How to do this?
Héctor Rodríguez
@Hector_rodi_19_twitter
Does anyone have the algorithm to resolve first degree equations?
Anutosh Bhat
@anutosh491
Hey guys , I am approaching an issue from the series/concrete module which requires a really small contribution of the solverset module which I haven't explored much yet . Hence I wanted to confirm what whether there is any way to solve something like 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 !
ThePauliPrinciple
@ThePauliPrinciple
What assumptions do you have for x?
1 reply
Ashton Bradley
@AshtonSBradley
Hi all... something I can't find in docs: if I get a conditional expression returned, how to I select the expression for the case that applies for my variables?
Screen Shot 2021-10-22 at 9.20.19 PM.png
I only want the "otherwise" result
Andreas Schuldei
@stockh0lm
hi, are user questions ok here?
Judging from scrollback, they are. :-)

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])
Andreas Schuldei
@stockh0lm
formatting broken?
ThePauliPrinciple
@ThePauliPrinciple
Depending on what you "vector" is, it will transform differently under a coordinate transform
e.g. a velocity and a coordinate transform completely differently with a non-linear coordinate transformation
And in the case of a velocity, you could have it transform covariantly or contravariantly
Andreas Schuldei
@stockh0lm
the input vector is a radius, so distance and direction. the output vector is a magnetic field vector.
so it is just the geometic transformation. split up the three spatial components differently, maintain the size
part of the task is to identify the coordinate transformation - the rotation angels and location vector. But that comes later, after having figured out how to write a vector function :-)
Andreas Schuldei
@stockh0lm
I still am unclear as to how to return a vector
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?
ellydo17
@ellydo17
Hello, I am a new member to SymPy. I look forward to contributing to SymPy as a developer. Do we have different channels for SymPy users and developers?
Andreas Schuldei
@stockh0lm
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.
Sean Logan
@fountain23
Hello, I have discovered a bug with sympy.vector.divergence() when used in cylindrical coordinates
divergence( R rhat) gives 2, the correct answer. But divergence( 1 rhat) gives 0. Wrong! The correct answer is 1/R
N = CoordSys3D('N', transformation='cylindrical', vector_names=("r", "phi", "z"), variable_names=("R", "PHI", "Z"))
R = N.R
rhat = N.r
lesshaste
@lesshaste
The channel isn't as active as it should be. You might be better off with the mailing list
Anutosh Bhat
@anutosh491
Should using subs back and forth make any difference mathematically ? This is for cases having log where I have seen this multiple times
>>> (log(0/a)).subs(a, 0)
zoo
>>> (log(b/a)).subs(a, 0).subs(b, 0)
nan
>>> (log(b/a)).subs(b, 0).subs(a, 0)
zoo
Aman Thakur
@jhonsnow456
#22416 I have made my first PR. I need help regarding that it has not been merged
Infinil
@Infinil
hello.. I am very new to open source development.. I wanted to ask if I can directly start contributing my cloning the repository and then commit the changes or I need to fork it first and then start working on it?
1 reply
Aditya Vats
@avats-dev
Can anyone tell me where the code for finding a function's domain or range is implemented? In case it varies for the type of function, I need the one for trigonometric functions.
Anutosh Bhat
@anutosh491
Hello guys , I am working on couple of Pr's extending the functionality of the doit method in the concrete module , I noticed that one inconsistency leads to couple of errors . Product(1, (n, 1, oo)).doit() returns 1 and 1**oo returns NaN. Other integers work as expected . These expressions are equivalent right ??? or am I missing something !
Kalevi Suominen
@jksuom
@anutosh491 The expressions are not equivalent. The infinite product is the limit of finite partial products Product(1, (n, 1, N)) = 1 as N tends to oowhile 1**oo is the limit of f(x)**g(x) as f(x) -> 1 and g(x) -> oo. See the docstring of Pow.
Anutosh Bhat
@anutosh491
Thanks for the help ! Now I realize what information was I ignoring !
Anutosh Bhat
@anutosh491
Hey guys ! I am working on a Pr based on the as_leading_term() method of core/expr.py (specifically on multivariable cases) . I would be glad if someone could clarify whether (1/x + y).as_leading_term(x) and (1/x + y).as_leading_term(y), both should give back 1/x as the ouput !!
miro
@MiroFurtado

:point_up: November 9, 2021 2:19 AM
yes, i believe that 1/x would be the lowest order term of both series expansions (when expanding around x it is the x^-1 term, when expanding around y it is the y^0 term): https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/core/expr.py#L3411-L3445

it's a poorly named function. leading term to me means the part of the polynomial with the highest order, not the lowest order part of a series expansion.

i have a question myself! i have been trying to solve a toy special relativity problem using sympy https://colab.research.google.com/drive/12JptFSkLoyzwjnpFaCaNmA-2jKNsKcCQ .