Comments (4)
CC @hanspi42
from sympy.
Another example:
from sympy import symbols, inverse_laplace_transform, expand
s, t = symbols('s t')
Fs = (20000.0*s**2 + 1600.0*s + 30.0)/(100000.0*s**4 + 48000.0*s**3 + 6930.0*s**2 + 281.0*s + 3.0)
Ft = inverse_laplace_transform(Fs, s, t)
print(expand(Ft))
Sympy output:
-7.52218450407113*exp(-0.223493475978327*t)*Heaviside(t) + 22.1739130434783*exp(-0.2*t)*Heaviside(t) + 0.0299800831746754*exp(-0.0395265172332464*t)*Heaviside(t) + 0.100900073070386*exp(-0.016980006788427*t)*Heaviside(t)
WolframAlpha (difference is in coefficient of 2nd exponential):
InverseLaplaceTransform[(20000.0 s^2 + 1600.0 s + 30.)/(100000.0 s^4 + 48000.0 s^3 + 6930.0 s^2 + 281. s + 3.), s, t]
-7.52218/E^(0.223493 t) + 7.3913/E^(0.2 t) + 0.0299801/E^(0.0395265 t) + 0.1009/E^(0.01698 t)
from sympy.
WolframAlpha produces 10 (instead of ~30) for first term.
Yes, that seems correct:
In [8]: apart(nsimplify(Fs), s)
Out[8]:
⎛ 2 ⎞
20⋅⎝10000⋅s + 1800⋅s + 53⎠ 10
- ────────────────────────────── + ──
3 2 s
20000⋅s + 5600⋅s + 266⋅s + 3
from sympy.
Thanks for reporting this!
This is the same as #25352, it has already been fixed in PR #25642, so it will be correct in SymPy 1.12.1.
from sympy.
Related Issues (20)
- derivative answer not correct HOT 3
- Deriving a sum of two matrix norms erroneously returns 0
- Manual Integrate cannot do (1/cos(x)) dx HOT 5
- Accessing Matrix row/col ranges produces incorrect results HOT 4
- inconsistent treatment of hyperbolic functions with simplify HOT 2
- SymPy gives a wrong solution for an ODE of first order HOT 5
- dsolve fails: Initial conditions produced too many solutions for constants
- Conversion from Sage matrix to sympy matrix fails for matrices with rows full of zeros HOT 1
- Visited links are colored purple in the docs
- Calculation of Influence Line Diagrams for Beams with Hinges is not Implemented
- Missing tests for Influence Line Diagrams
- Lack of Good Error Reporting in `solve_for_reaction_loads` in Beam Class
- Sympy Sin wont work HOT 2
- Inconsistent Behavior of xreplace and find_dynamicsymbols in physics.mechanics module HOT 15
- Real-Root Isolation HOT 10
- Version information that is not clear HOT 2
- Why does Sympy seem to treat symbols defined the same way in different manners? HOT 7
- Nonstandard meaning of integral with a single limit HOT 7
- Simplify not applying to Piecewise args
- sympy.Float(0.0).is_integer is True, but sympy.Float(1.0).is_integer is None HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sympy.