New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sympy hangs on fairly simple expression #7129
Comments
Sorry, I'm missing a factor of 2 in the exponent of the function. It still doesn't work though.
|
Original comment: http://code.google.com/p/sympy/issues/detail?id=4030#c2 |
I am getting this NotImplementedError: unknown boundedness for [zoo*alpha] |
I tried a simpler example such as In exponential.py a condition checks if arg0 belongs in [-oo, oo]. However value of arg0 is Should a separate function be made to check if a given expression is in indeterminate form? |
This is an interesting use-case for my work at #2508 . One could make |
Just came across this issue now, this issue was fixed by a pr of mine earlier this year #22870 and the methodology falls around this line of thought as expalined by avichaldayal
I feel the implementation in the pr would suffice for solving this and related issues but not sure if the following approach has been explored yet.
` |
So now we have: In [3]: f
Out[3]:
2 - α
⎛ 2 ⎞
⎝a⋅x + b⋅x⎠
In [4]: f.series(x)
Out[4]:
2 - α
⎛ 2 ⎞
⎝a⋅x + b⋅x⎠ Is that the best that can be done here? For particular values of alpha we have: In [5]: f.subs(alpha, 1).series(x)
Out[5]:
2
a⋅x + b⋅x
In [6]: f.subs(alpha, 2).series(x)
Out[6]: 1
In [7]: f.subs(alpha, 3).series(x)
Out[7]:
2 3 2 4 3 5 4 6 5
1 a a ⋅x a ⋅x a ⋅x a ⋅x a ⋅x ⎛ 6⎞
─── - ── + ──── - ───── + ───── - ───── + ───── + O⎝x ⎠
b⋅x 2 3 4 5 6 7
b b b b b b
In [8]: f.subs(alpha, Rational(1, 2)).series(x)
Out[8]:
5/2 2 7/2 3 9/2 4 11/2
3/2 3/2 3⋅a⋅√b⋅x 3⋅a ⋅x a ⋅x 3⋅a ⋅x ⎛ 6⎞
b ⋅x + ─────────── + ───────── - ─────── + ────────── + O⎝x ⎠
2 8⋅√b 3/2 5/2
16⋅b 128⋅b |
I have been coming across more of these issues recently . Though I was thinking it's best to generalize such expressions to
But now I think , maybe we can try out series for these expressions and it helps overall . It won't involve a lot of changes to return something like the following
Though my only concern then would be the
Everything looks fine .... .But in cases where the coefficient would have
We miss out on the last term if coefficient doesn't have powers of x it look good though
|
Hi,
I'm trying to use sympy to create a symbolic Taylor series of a fairly simple expression:
returns 'nan'
[Wolfram alpha manages fine: ](http://www.wolframalpha.com/input/?i=taylor+series+%28a+x^2+%2B+bx%29^%282+-+2alpha%29 Help?)
Original issue for #7129: http://code.google.com/p/sympy/issues/detail?id=4030
Original author: https://code.google.com/u/101140808581050767033/
The text was updated successfully, but these errors were encountered: