Great Video! If you execute the exact same lines in a Jupyter notebook, you automatically get the Latex output, which is super nice. Instead of like "x**2+ x**3" in the console, you get the actual resemblance of math notation like in text books etc.
Great intro to sympy. There is a small typo in the limits example with 50/x. You wanted to show the behaviour for x -> infinity but typed 00 instead of oo.
Sympy is fantastic, I use it a lot, specially for automatic code generation. Every student, no matter the level, should learn it. It could be a bit faster, but I understand they are already working on it.
@@davidr2421 Take a look at: "Björn Dahlgren, Kenneth Lyons, Aaron Meurer, and Jason Moore. Automatic code generation with sympy, 2017". If you google it, it will be the first reference. I used it a lot on my master thesis.
@@joachimgaukel9254 I read the docs. The sympy.liimit(f,x,0) method takes the limit approaching from the positive side. So this is a one-sided limit, not a two-sided limit as one (like me) would have thought.
How do you find those awesome libraries? Intentionally searching from web documentation or you had already a list that you are picking and working on it? I have my respect for you and your channel and you are doing a fantastic job. But I would like to get your mind set as well :)
My guess is that if you work in math you probably already know some popular symbolic math software package (like Maple), so it's just natural to seek the open source alternative on a language that you are already familiar with. At least that's how I discover sympy, lol.
@@valerianmp Exactly. In university I had to learn Maple in a modeling class. As soon as I got home I did an internet search for "Python equivalent of Maple"
the purpose of symbols is if you have multiple symbols you can do it in one line. like your 2 line assignment x = symbols('x) y = symbols('y') should just be x, y = symbols('x y')
Sympy is conceptually awesome but in practice it is barely useable. It fails to compute even fairly simple derivatives of matrix expressions, for example, that Matlab's symbolic toolbox handles in a few minutes.
I love how sympy even has a "feature" to find a Groebner basis. You know... for people who think Python should be used for algorithms that run in doubly exponential time.
Hi NeuralNine. I've searched the internet for this and no answers yet. I was wondering if you know why the pyinstaller would fail to generate the exe file using just a straight forward command like "pyinstaller -F -w filename.py". I'm running this and only the spec file is created, no build or dist folders/files. Appreciate the help Python expert! Thanks! =).
Thanks a lot for your videos. Please how can I display math symbols as integrals, roots using TKinter ? I have an idea to try but I'm stack to it. I don't know exactly how to display such symbols Thanks in advance
I think this works: print(latex(Integral(sqrt(1/x), x))) And with preview instead of print it open the result in a window. You may have to install a library for this one
It was so frustrating when I tried to use it for raw, simplified, Clifford Algebra (ie: Geometric Algebra). Their notion of non-commutativity seems weird. Individual operators don't have this property, but types of objects in expressions DO. ie: "a : real * b : real = b : real * a : real" says that "*" commutes for a pair of reals. But: "a : vec * b: vec" doesn't commute automatically. I was trying to define rules for "e1,e2,e3" in Geometric Algebra. It really seems like it should be straight-forward; but I had to go write rules in straight code manually instead. In Wolfram (and maybe now even Mathematica?), "**" got changed from non-commutative multiply to be exponentiation to follow Python.
While this library is very cool it's not particularly when doing something like a math heavy degree. I learned about it in my first your in undergrad for Physics and haven't used it a single time since. It's cousin numpy though is much more useful.
23:05 if you dont know equations then you cant python. if you know equations you cant do it python its diff thing lol. look at that. nothing even close same lol. put that same you wrote and solve it lol i have know idea what that equation on write it on paper? there is no e on python functions huh
@@dinobotpwnz Irrelevant, red herring, let me ask you: do cars are made because of this application? You got their point wrong. They meant that this specific software is "useless" according to them.
@@FaranAiki Cars are made partly by solving differential equations and any engineer knows it would be a waste of time and money to do that by hand. Whether and how many use this specific application is unknown and irrelevant. Sympy is a project to make the algorithms they use more accessible to people used to Python.
It's not a shitty library LoL 🤣🤦🤦 It's one of the best libraries out there. It works amazingly!!! You just haven't used it. It's been maintained and updated for more than a decade and still it's being maintained.
My favourite piece of this was the "...mumble, mumble, mumble, ACCUMULATED BOUNDS [-2,2], mumble mumble..." when trying to get sympy to evaluate the integral of sin(x) between -oo and oo (which doesn't actually exist, of course). No explanation, just head down and carry on 😂.
Hi, the solve equation method doesn't work when more than 2 expressions contain x. This is my code and it has an error: from sympy import * x = Symbol('x') x_sol1 = solve(Eq(((7*x)/(3*x+3))-(5/(4*x-4)), ((3*x)/(3*x+2)), x)) print(x_sol1) TypeError: Equality.__new__() takes 3 positional arguments but 4 were given
In what way is this revolutionary? Software like mathematica and Maple are doing this since multiple decades, and, last time I compared them with sympy (a few years ago) and they were a lot better, but in a way it would take decades for sympy to catch back. And they also permit to export equations to different languages.
Yeah it seems cool, but if you are doing anything like this you should be using Sage. Sage is way more powerful and intuitive, and allows you to do way more math than this.
I was not aware of this phython library, thanks for showing. I can’t focus on the result sometimes because it is there for such an extreme short time.. to stop all the time the video breaks the whole story
why to use this when there is well-established MATLAB! It has been there for ages and reached extremely high maturity level in all subsidiaries of mathematics; calculus, algebra ..
@@glenn8459 no it actually does not exist because if you approach 0 from the positive direction you get +infinity but if you approach 0 from the negative direction you get -infinity but for example, 50/𝑥^2 does approach +infinity (because no matter which direction you choose you will approach +infinity) for a limit to exist the limit from both directions should be equal same as with the derivative to exist the derivative from both directions should be equal
In the real plane, there are two answers, depending on which direction you approach zero from. In the complex plane, there are an infinity of answers, because there is an infinity of directions from which you can approach zero.
Working with any kind of physics definitely requires a solid understanding of algebra, often trig, and calculus. Complex and imaginary numbers are also very useful in some computations
The community is moving towards calling what you do "software engineering". The true CS theory/research stuff is math moreso than your programming/engineering.