Re: [sympy] Re: Left hand limits and Right hand limits

2016-08-15 Thread Aaron Meurer
There is a special toolkit, sympy.physics.mechanics (and for beam bending specifically, the new sympy.physics.continuum_mechanics). This trick seems mostly harmless, since SymPy treats DiracDelta outside of integration symbolically (i.e., DiracDelta(x) = 0 if x != 0 and oo if x = 0). As I noted

Re: [sympy] Re: Left hand limits and Right hand limits

2016-08-14 Thread Richard Fateman
I am not familiar with this trick, but just because engineers in some area hack together some method that is mathematically dubious, doesn't mean it should be introduced as a default in sympy. (Maybe it should, maybe it is harmless?) An example that also involves context that sympy would not

Re: [sympy] Re: Left hand limits and Right hand limits

2016-08-14 Thread SAMPAD SAHA
In Mechanics, while solving beam bending problems, we need to find out the reaction force at first. There is a trick I have learned from Jason. Suppose there is beam of length l, then we at first find the load distribution using variables multiplied by dirac deltas in place of reaction forces.

[sympy] Re: Left hand limits and Right hand limits

2016-08-14 Thread Aaron Meurer
I agree that DiracDelta doesn't make sense except under an integral sign. But as a function that is 0 everywhere except for one point, in a limit, it can be replaced with 0, which is what SymPy's limit() appears to be doing. I am curious how you are ending up with an expression with a DiracDelta

[sympy] Re: Left hand limits and Right hand limits

2016-08-13 Thread Richard Fateman
Since DiracDelta is a distribution, not a function, and presumably the limit program is oriented toward finding limits of analytic functions, it would be fairly reasonable for the limit program to not work on this kind of expression. The mathematical context in which DiracDelta is understood and

[sympy] Re: Left hand limits and Right hand limits

2016-08-13 Thread Aaron Meurer
Use limit(expr, x, '-') or limit(expr, x, 30, '+'). Aaron Meurer On Sat, Aug 13, 2016 at 8:25 AM, SAMPAD SAHA wrote: > Suppose I want to find the value of f(x) for > f(x) = DiracDelta(x - 30) + Heaviside(x) at x = 30+ in sympy. How can we > do this? > > Regards > Sampad