This video is the most helpful video ever when it comes to symbolic manipulation using Python!! Thank you so much!!!
@yem.t.39303 жыл бұрын
Perfect, comprehensive, very informative and concise, Thank you v. much sir!!!
@adaml9294 жыл бұрын
Thank you so much for this! quarantine classes expected me to already to know how to do this when I have used python in only one previous class. This helped SO much.
@apm4 жыл бұрын
Glad it helped! It can be hard to remember your introductory class, especially if you don't use Python on a regular basis.
@rohitsrao5 жыл бұрын
Thanks for the video. Clear concise explanation and covered major basic functionality!
@CrypticBTR5 жыл бұрын
fantastic tutorial. Good work!
@falolayusuf96846 жыл бұрын
Thanks so much for this video. It really helped for my coursework.
@kqnrqdtqqtttel17784 жыл бұрын
27:17 is not invertible because the determinate = 0, so that will result in a 1/0 in the formula
@apm4 жыл бұрын
You are correct. The answer from Sympy is correct for my incorrect matrix. When I fixed my matrix, I received the solution that I expected.
@aqueeqazam3 жыл бұрын
Highly informative.
@soumakbhattacharjee38663 жыл бұрын
This is very useful. Thank you very much. Is this notebook available online and open access?
@apm3 жыл бұрын
Yes, the notebooks are available here: github.com/APMonitor/learn_python
@dhimanbhowmick95583 жыл бұрын
Great tutorial, thanks, it is very helpful.
@bharatarse15033 жыл бұрын
Amazing thanks for sharing..
@muntoonxt5 жыл бұрын
If you use sp.display (instead of sp.pprint), it will print out a LaTeX formatted version.
@apm5 жыл бұрын
Thanks for the tip!
@junyang17105 жыл бұрын
module 'sympy' has no attribute 'display'
@invittimarcelo5 жыл бұрын
Amazing tutorial. Thank you and congratulations!
@apm5 жыл бұрын
Thanks, Marcelo!
@2fbDJLL5 жыл бұрын
Could you please share the HW document for practice in your video description? Thanks
@apm5 жыл бұрын
Sure, it is HW17 here: github.com/APMonitor/learn_python
@giannismaris134 жыл бұрын
what an amazing work.
@abdulrahimshihabuddin11193 жыл бұрын
Is there any way to equate symbolic derivatives to zero and solve it ? Say for example, I have dy/dx=0 and dy/dx would be in terms of x . Is it possible to obtain solutions of x from this equation
@apm3 жыл бұрын
Yes, you can use the evalf() method in an fsolve function call.
@gt95387 жыл бұрын
fair play man. well presented.
@vitorfranca804 жыл бұрын
Fantastic! Tks for this tutorial
@adekunleajibode2144 жыл бұрын
This is a good tutorial. But please if I have two long mathematical formulas and wish to turn them to only one, is it possible with sympy? I mean to shuffle the formulas and construct new formula from the combination?
@apm4 жыл бұрын
Yes, that is possible. If you have one function named x and another named y then you can define a new function such as z = x+y or z=x*y. You can then simplify with z.simplify()
@adekunleajibode2144 жыл бұрын
@@apm Thanks so much boss. I actually combined like five formulas, the Simplified output is damn too long. Meanwhile, is there any machine learning technique that can achieve better performance than this? Though, the expression of A+B is shorter than A*B
@apm4 жыл бұрын
@@adekunleajibode214 I'm not aware of a machine learning method that will combine equations. However, you can use machine learning to create a new regression model from data sampled from your correlations. More information on machine learning is available from the short course: apmonitor.github.io/data_science
@afifakhanak4 жыл бұрын
How can we use symbolic manipulator for cryogenic liquid in a cylindrical tank equation solution? Can u help!
@apm4 жыл бұрын
Here is more information on symbolic solutions in Python: github.com/APMonitor/data_science/blob/master/10.%20Solve_Equations.ipynb
@pedroalexanderhernandezriv99124 жыл бұрын
gracias profe por tu tiempo
@apm4 жыл бұрын
de nada
@mahathik85924 жыл бұрын
how to find unknown value x by making determinant equal to zero in last example ?
@apm4 жыл бұрын
You could use the Sympy determinant function for a matrix such as M.det(). You could then solve for when the determinant is equal to zero with the solve function as shown here: github.com/APMonitor/data_science/blob/master/10.%20Solve_Equations.ipynb
@rvilleg958 жыл бұрын
How would it be if I wanted to iterate or solve an integral to a certaing value? example, I want to know the upper limit of (some random x) function until the area of the curve is 25 (for example)
@apm8 жыл бұрын
Here is some example code: import sympy as sp from scipy.optimize import fsolve sp.init_printing() x = sp.Symbol('x') f = sp.integrate(x**2,x) sp.pprint(f) def myIntegral(y): g = f.subs(x,y).evalf() return g def myResidual(y): # put your objective here (what you want the integral to equal) diff = 25.0 - myIntegral(y) return diff guess = 1 z = fsolve(myResidual,guess) print('Integral at ' + str(z[0]) + ' is ' + str(myIntegral(z)))
@rvilleg958 жыл бұрын
man yo should write a book or something. This was a project of mine the last semester and the code, even if it was short, wasnt THAT short haha. Thanks. Really enjoy your videos
@JulioBarrancoGalaviz5 жыл бұрын
Great tutorial!
@jstello6 жыл бұрын
wonderful stuff!! can you please explain how you got TeX font into Markdown? Thank you!
@apm6 жыл бұрын
Markdown supports TeX. You just need to use $ $ if it is inline. Here are a few examples: jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/Typesetting%20Equations.html
@Nogh_art5 жыл бұрын
Hi ! thank you for this video ! Very very helpful ! But I have one little question. When using sp.simplify (), (visual studio) it dosen't print the code. And simplify is in violet just like sp. Is it normal ? Maybe someone had the same problem ?
@apm5 жыл бұрын
You may need to run sp.init_printing() or else use sp.pprint() to print the expression. Let me know if this helps. I haven't used it in visual studio before so your insights will be valuable.
@Nogh_art5 жыл бұрын
@@apm Hi ^^, thank you for answering so quickly ! I do run the sp.init_printing () If I can contact you in private I could send you a screenshot ? If I use only the sp.pprint () it dosen't expand or simplify the result ^^'
@apm5 жыл бұрын
@@Nogh_art unfortunately, I can't help with specific / private requests for support but you may be able to get it from StackOverflow. Also, try including the simplify inside the pprint such as: sym.pprint(f.simplify())
@Nogh_art5 жыл бұрын
@@apm Hi ^^ ! first of all, that last line worked ! I wasn't thinking about a private request, I though that I might not be the only one having this problem ^^' Thank you so much for your help !
@apm5 жыл бұрын
@@Nogh_art No problem - I just get so many requests from individuals who want help with their specific problem. If I can reply on a public forum then at least it is there for others as well. I think your comment will help others too!
@maranac104 жыл бұрын
Great work.
@Irina-fc3pb4 жыл бұрын
amazing,thank you
@ef74966 жыл бұрын
how I can get the homework problem plz ???
@apm6 жыл бұрын
All of the homework problems and solutions are posted to apmonitor.com/che263/index.php/Main/CourseHomework
@ef74966 жыл бұрын
Thank you so much sir
@hmblackfox18606 жыл бұрын
thank you so much
@abdallahjafaradi94636 жыл бұрын
Can you please tell me how can I install Sympy into python?
@apm6 жыл бұрын
You can install it with "pip install sympy". It is also included in the Anaconda distribution. Here is a tutorial: kzbin.info/www/bejne/mIm6nayFgr6jiKc
@abdallahjafaradi94636 жыл бұрын
Thank you very much. I used pip method and it worked. I have another question, is it possible to use sympy inside PyQt ?
@josephbargo50245 жыл бұрын
@22.15 This is fixed now btw
@amirhosseinhamedanizad11536 жыл бұрын
TypeError: 'module' object is not callable ????
@apm6 жыл бұрын
You need to run this in a Jupyter notebook. There are example notebook files at apmonitor.com/che263
@SpaceGhostNick7 жыл бұрын
cant we just do this by hand with a ti-89?
@apm7 жыл бұрын
Yes, a lot of the functionality with SymPy is also available on a TI-89 calculator or similar graphing calculator. The advantage of Python is that it can run on a PC versus limited to a stand-alone calculator. SymPy is one of many packages in a feature rich programming language that can do much more than symbolic math. Sometimes the symbolic math part is only a small part of the overall larger calculation or data manipulation that would be impossible with a graphing calculator.
@theultimatereductionist75927 жыл бұрын
I'll take Sympy seriously when it can manipulate (take determinants, inverses) of matrices whose entries are indeterminate variables (i.e. NOT numbers), and (super-grand challenge) take the matrix size, N, as a variable itself. i.e. construct/fill a matrix of size, N, whose value I can specify at run time, with letters a(i,j) i, j = 1 through N
@selrahcnamtrah6 жыл бұрын
27:50
@Bbdu75yg4 жыл бұрын
Nice!
@MarkMcDaniel5 жыл бұрын
Dude, you need to get a better microphone. Lots of static noise coming through.
@apm5 жыл бұрын
Yup, I got a new microphone. Check out my later videos.