Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SymPy examples.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# SymPy Examples"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This example is related to the article [*Computer Algebra with Jupyter and SymPy*](https://jaantollander.com/2019-11-16-computer-algebra.html). It contains a showcase of the essential features of SymPy. The Sympy webpage contains the full list of [features](https://www.sympy.org/en/features.html) and [documentation](https://docs.sympy.org/latest/index.html)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Imports and Printing"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Import SymPy and initialize the printing of SymPy expressions with MathJax."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"from sympy import *\n",
"init_printing(\"mathjax\") # sympy expression printing"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Import SymEngine and initialize the printing of SymEngine expressions with MathJax. SymEngine is a fast symbolic manipulation library written in C++ instead of Python. SymEngine has Python wrappers that integrate with Sympy, although Symengine does not yet support all of SymPy's functionality. We can override some of the SymPy functions with SymEngine variants for improved performance. It is wise to import only computationally critical functions."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"#from symengine import * # overrides some sympy functions\n",
"#init_printing(\"mathjax\") # symengine expression printing"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Define Symbols and Functions"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`symbols`, `Symbol`, `Function`, `sympify`, `S`"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"x = symbols(\"x\")\n",
"a,b,c = symbols(\"a,b,c\", real=True)\n",
"i,j,n = symbols(\"i,j,n\", integer=True)\n",
"f = symbols(\"f\", cls=Function)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAADEAAAAUCAYAAAAk/dWZAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABnUlEQVRIDdWX61HCQBSFF8YCGEtICT46wA60Be0Aa5AO1BIsQUoQOyAdKHQQv2/HdZL8CCRIJrkzh927m5s9h7uvhKIoQkIIIQP3yR9iKT95lrnVBbyXO4daR8RbWUhZxLrcURdA3y3Yglm977/9fWPJAazTuGc4YTKZmKIPGnP9ZLT78Cv4BudA/yTWZix47nh+BRbUlzETsNqAyjxLKlNJ/wIUoI9M7B1LHmArvylqXMyKqWTBtiEbfHfwy+E/n1Jxrq+GTLiBm7zvFHEDXNRjNJfBlSKcTi7cMZq8Z4pw13F+jdFcx5kiRm+KiCkZqRJnUa4IU6IzRssgvVPEJ7g8RgF79QwUoO9dTt7xeJhT2aSTuV7S9wy8cHlv8sSWqH7ltovvdic6n+jEHjRW4sjzcrk4+NqRAptKXujB2Xh9aYpv0+c4IP75TiftCTzG2nE/1xDp6/ryAFUzF6IIBn6hnjGnVdfJXBcEfnUKbhn0O9Yc3ssYmlKIo4DOH0XEVtZIeu8pSnnKN73776PIBjtAb2QSiTal/ORZjvkB8A8tkPeOqQsAAAAASUVORK5CYII=\n",
"text/latex": [
"$\\displaystyle \\left( 1, \\ 1\\right)$"
],
"text/plain": [
"(1, 1)"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sympify(1), S(1)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAAcAAAAOCAYAAADjXQYbAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAnklEQVQYGX2QURHCQAxEcx0EVEOxgAQkFAtIqIdWQi0UB0hgkFAsIOF4m8kd/aBkZptNdm9ue5Zzti3MbAF37RrIr5LBkhx7tXfS/X/FgywppZZ2BUewctVEN09KG+PuM/wtLjSc6lg8gOoCXs7i0xYns6IPda7ErA/xa96IT8RFM+WGEkhpte1D9IDlP0+yI9wi4Kq5Ph9Lf/Awzeof6UJo7lefkfsAAAAASUVORK5CYII=\n",
"text/latex": [
"$\\displaystyle i$"
],
"text/plain": [
""
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"I # imaginary unit"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Notations"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`Rational`, `Sum`, `Product`, `I`"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAAsAAAArCAYAAACuAHIQAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABM0lEQVQ4Ee2V4VHCQBCFcw4FMJYQO6AG7IAatAOpgRIYSsAOrEE7wBJMCfH7wm0Ml+jkD38cduZxe+9eNsft3ia1bVvNtbtSmFLagAYsy7WFRF444H6BezASwlWV2xgC6kUaLIe8/mgbiH61m3h4NNc7jT57vG4PjqABZvA9z58ik0lnrl1vz7fIwxwkJrOz8u8z2LUvj4cWVjNs9TF9bUsJf5xdfnM929uOUeSZ27kM1sGH2Bsy6m1w3pqmFEuegowRziBGX8lFPX9C1FM9Gf7HIsrUiOoEjNxtsb/dpRjBOgt3sfaX2KgXJzRZSOzdHmKgZ8ew+IMxNzl+JkbCThD7ccQ2YF9wZrOW6yMTcQX5CHnx6hyAgZLwCYQ+/QZeJbNZAn7mTMhDxynGbII6U+gz+w1oEw0oh1QE2wAAAABJRU5ErkJggg==\n",
"text/latex": [
"$\\displaystyle \\frac{1}{2}$"
],
"text/plain": [
"1/2"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Rational(1, 2)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAADIAAAA6CAYAAADybArcAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAEkklEQVRoBe2ai1EbM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FVoCImEcNFJRM+v5VgHhmMaHUBVVzKzn+xLLKl0Onl3C2Ep47mKXKPHC6lmcVvWm6YB4gQSDa8dQ4sGEcBbitzImqLgzjVfVWS3tX8wsMU4IC1ROJWZ9qkTeRpjw8JN2W6d16rcFgqUHBGT5/KvcX2RUpVY/UlVqBeZL5reCjI2wfAOykWnOELK0Ijr8XGKKHE7xOVByoXiGTr26bjeM4nFurXsHAMSDf+3oMssN4vtVVbVaAoRjxMlW9SFAX9pa/eZj+FFha2n2CBjZEkeawdFfpBanLgBRAz9gfla6Eiiee2Z0VpmYaY9yBxEUdt+tO5j0bXZApCyKAoJVIS5yIGD6v6yOAyJl7V/9sDRFTC+TsEkKW4vtJMGsyJnKhNwuEs7YWt80Jv5NZZM4tgIQD8L9eCLl+fHEASmwtfAl9UmKxpcrDrZ7eLD6Prl4cObYovbwDd+qb2N/AXNR3z3kmRxOAAAAAElFTkSuQmCC\n",
"text/latex": [
"$\\displaystyle \\sum_{i=1}^{n} x^{i}$"
],
"text/plain": [
" n \n",
" ___ \n",
"\n",
" ╲ i\n",
" ╱ x \n",
"\n",
" ‾‾‾ \n",
"i = 1 "
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Sum(x**i, (i, 1, n))"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAFkAAAA6CAYAAADba/VbAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAFaUlEQVR4Ae2ci1HcMBCGcxkKIKSDowMeFeTSAUwqIHRAhgoY6ABSAYEOuA4gdACpIOQ6IP8nJI98ls/22L7TYe2MsKyXV79Wq9VKx+j19fVDFY1Go+8qs6vwW+FBYaIAbav+8Vs0/S1DYNQA5Gc1cqdwrDpXNCjw/+mxq3fyEpUgUAmygByr7osC0gzA264t5TENPilt5tLSs4jARjEpn+KkVIDuK+fS5eodlTFLADtEyp8fy7MKOYA69VIPFf/FuwD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mZqIB2UrwsaTALHKRg1jKnuWfn31kMzIKdeE4towt24Jwn+/kqT4U+I9GkjvpYaSNhEB2W0dY9uNVXdj3CmBXovwTgYDEm8dYAUAxOUjwA5uFiQIrvynvnkoDSOphgvl1iGOs49wp1HP1h/J017Rq3YUTKNkPcwQeGwg3ALwuonQXbhE6Ka89AiGd3L7V1EIOgQRyDo5+XhLI/eCaazUHshYyHNBBt2OuVo0XtbOjUHYKXaOF91NkfsfX2lsFuIIHP8SWQrKVBUJvv0gV2NjI5zL7sn/doPdBUk5dDBKBJXTaqAtJHTs6pvm+JC9z0S3h+4P4hNPJHBByS4bLyxyZzOi94vhFx8QrqPTydkW9QWRvCEhABGCkOfdbjyTV3cjAhoA0zmWB/Z5OJrpBp6NWnE7G1EKSDwU2txXN5Y0G6uJadWqd4nbE91o143QyAD8KKK5CcSnPgKz3tosgtvLgybk6keSfCqgOFrHsfKopQhokdDzH+wwccY7i74cs6f8BnUqLzanaMyQAAAAASUVORK5CYII=\n",
"text/latex": [
"$\\displaystyle \\prod_{i=1}^{n} \\left(i + x\\right)$"
],
"text/plain": [
" n \n",
"─┬─┬─ \n",
" │ │ i + x\n",
" │ │ \n",
"i = 1 "
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Product(x+i, (i, 1, n))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Evaluate Expressions Numerically"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`N`"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAABIAAAAUCAYAAACAl21KAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABOElEQVQ4EZ2Ti1HDMBBEZYYCMpRgOkgNKYG0AB2QoYSUQFpwCdQAHUAHgDsw+4RWIzLGlnIzp9Pv1nurc5imKdR6CGErH1LsFe9x8qtB4uUQdkpUVvbBJK612Wp7JXzgAhmdfAnQKIA3AzheArTvug6tsFv5ITJzjTVRSQi8813NEfuFdZPYBnAUCMwQv7/SUG0qaZBvigREx/omRkr4JqlgRKkw2jQxUsJJ/iW3PWhyEvDYgd5iKu2Y7lMirXBg/Qco1f+k/U8OZTzvUZetRdycHWCUWNH+7/JzDQBa1dIgiIaQd07SHOrP8q33lqI723XfqLxHJWP8R79dG5crA1+RMeQ/eenL/52Vz78u6AIpA1HGrBWlzp7nzVQauryWtLW22PkVy/Pzee6j9GX6hhaIDHWZTq6yH5Xwt1KSY61wAAAAAElFTkSuQmCC\n",
"text/latex": [
"$\\displaystyle e^{5}$"
],
"text/plain": [
" 5\n",
""
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"exp(5)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAADYAAAAPCAYAAACvMDy4AAAACXBIWXMAAA7EAAAOxAGVKw4bAAACPklEQVRIDd2W/U0bMRiHOcQAEWyQbtCKDegGIDaADVoxAt2AMgGEDZINqrIBsEGbDcLzXO3Il7MdX//E0nu2f36//drnbrPZHPxv67ruM7LX6LhOdYDPmF8F7ITe+QK+VcAmdSU7VSUGFgnGc+gvNItYrYfvBVru8oDdZbAF+Pku3jIv2Ymy6oUGfh+F7N6z8Ac6hszu3obcN5jkf02ZwTXyO8XC+Du9wT1l1opQxY5+Fv0+JOo1dAFZTr+KFpIFjM2ZrqFBUIHllP4ijNPOxDUlLQrV7Ozz+zAqmdh7rn4WZJbgZzi1hNJAbsBvCzIluGanJNPjR9XVzCLOeincZZZ6iIBX8Fhufd0zthI+QS+VZPSy6WefnZQ3N560YxhzB7xYciW41c+6pfgjACbhDHoM871dq52aokmBoegGp6PDRb045m55Dr9CJsHfwhu4Aba0Jjs1Rc2BBWcfaspcg89SvXTXoBVkGXojutsL1tNzBzRsrXaGUuNZU2DBmVOcfB6rGCFeEAaybci5y18ggyru2kQ7W/25QevloTNzDPsfSpsltg64vwpvyuwZNCnwean47yu1JjshUSUd/3CY0peHP13fWK0vD//2g5cHc7F5qjeO5S2tRZ5cH3QO7KR8rI/8bipFBEstd168EUdnid3y7Olcf6Myn0EbKPdK2bWXs7PLM5wbOc0r2TIz2wIac36VZiaOwT1HZl9eacDL3BIVU6+8/ZUf5WMP7lvTx/G2atJxkK3ZKfrdqegjtncNi/SnqMPVcwAAAABJRU5ErkJggg==\n",
"text/latex": [
"$\\displaystyle 148.41$"
],
"text/plain": [
"148.41"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"N(_, 5)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Manipulate Expressions"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`expand`, `collect`, `factor`, `simplify`, `.subs`, `.doit`"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAJ4AAAAUCAYAAAB8roTFAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAEWElEQVRoBe2ai1EVMRSGuXcsgMEKxA5UKhA6AK1A6ADGChjsAKxAtAOhAoEOwApUOsD/yz1Zsg92s7vZxYubmZBsnidfTk4e3Nnd3d2Kd7PZbF3xTaWd+LT/PRSTXTE4E5ObtiwmngtilQxRPFM+lO67/57CBRdj81Vs1tswoXxqnmpvlTbl/8hft5HnsctK3hzDmYFdkVZeKnNH361Xtuo9aSc2TPi52LyOHeiQPK3tG8mzEyvPY5crMpwjkBLZTi6WRekk77b8/lgwxeVWfZ3F9jkCz1eS50vf8Y/JscjwmQl/oHCr70CeeP1Dje+n/KeIcQ7GU8qyaf2fRcjxrxXJGM41EM4inPOmLbZmmmzF3gQTX1l6BJ4YCLZZrPBSuZAhFm9bftDVY5OBFQAW56Vr+Y/yLx4DoORBBo4XuA15ZGMBsoU9l/8luaosG5w4V9XxGponFu9KY/BHjZf65lL4TeFoLgFDd0valeDudps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"(-a + x)⋅(-b + x)"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(x-a)*(x-b)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAKAAAAAWCAYAAABHXJdFAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADwUlEQVRoBe2aj3HTMBjFk14HCGUCkg3CdQO6QYAJaDdIjwm4skFhghY2aJmgNBuQDbh6g/B+ij7jOGliObYSiL47Wf+l970+S7Ka7mw26yRLDLTNQLfbvdIcPYW+wlThUtrLukmAoiJZqwx48V1Lawivo/w3RX3lXycBtkp9GhwGJLhfis4KAhwq/6gwONIjWWIgBgNsvWaZT/SPrSTFiYG2GNDKNyiNzQqI/Uwr4JyI9IzLAB8k7iMkWIDaz3sKdwpPfm+PC/0/me1QeZTfiO9eq+Jn/pTBAlTHTOFMffmimTBIsnAGDpFHie9cTPXk+4UxFixA66iYffymkE/JegzshEeJYaQwrgc5vJfmeqNeAxMfeYVhLQH6wUBxHw4l9TAGDoVHhCaf2XoflEb4I6UvFaZ1v4LdFsw2okGS1WfgUHj8IYr4LwgX0LmhnwUBSpl91aJMhEUHLhA/KrwqiY3ldKL2toTzmX2nNt8VR7WqmNUOfziDYKcK+Im/vJ0vFX4LvzsYKx3LNvK4p7i5XK7Mp3h98SyhquwQZJDxpMC/SKyM22pl53nfjonpQB0HSkVOrCTyvsU+baU1XwjmK8OhfgiRl2vs8ZN+tPoYsebbyKNv0wpujc026PwP9bdJXCY0yEB850Uwyl8rsLK5dsQygJNw4rM6X5aTZeVtxcyvUBUz548cr9Lkcx+UxqfYL89GHj3OVnB7n+sKsDE+jwUEcwMqvnW5vw9WGERYNM4tEwkrs0K/HFt2Kfb1dg5Yql9RwNgfNMe6a54QzJ+KeDU2fnEX5XxQvPHo0IIPVXhsAjc84W/ZeIFP5Nf7coXyU3HydkW5FW2NywayFZCVpLzSAZBVYigwxRWQrZdfNhTLcJC2o2J5m2nNVRlzGYfHWuvtL49VNy8MwTw2iVtj1d6Cyz5vg+vIv9mIrbzauLdGk5XLObRDXtHsbYlyLVMDc45VfcGPRcE6n2rlM4jHPcK94My2uIr3gA8LI3c63FY78WkS7m74YjRzv+sio3LE+07hQmLNKItolTB7/ODEll4s1Y+9H/MW8Z5redxX3E3iOvKiQWi5wDQBX4nkjaBTtbM056W8rdLc7dyq/oviKBaCWb4gODA64Snm7JWb6vEl82Pm5RESa3ncV9xN43I/SNWgrA5fFVhRuBO7UWA14wBLGR8dbsvybSnn6oL7P64voolP8zmrirnUjr5g5QVz2CnYIf5neWwbt8a3L/+gu8+mcaVfRKPAA7S6AmyaqiTAphn9R8bzK9mJVn87Wu0E+R8pb/5KkVIungAAAABJRU5ErkJggg==\n",
"text/latex": [
"$\\displaystyle a b - a x - b x + x^{2}$"
],
"text/plain": [
" 2\n",
"a⋅b - a⋅x - b⋅x + x "
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"expand(_)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAKgAAAAZCAYAAACl3WVkAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAFFUlEQVR4Ae2ajVEUMRTHuRsLAK1A6ACkA+0AtAKxAxgrYLADtQLQDoAKRDoQK1DpAP+/8LKTW7O5u93sl7NvJpfv95WXl5fszR4eHjYmmDTQtwZms9mZeNhU2la6UzqRbd7PJgOVKiboVQNmnB9lixjmhupflG2rvjcZaK9LMxFHAzLIH8peBQa6q/p3pZ25fiaYNDAEDXC0e7i3wvYT3zLlkwb60oA8506JNh4UuMnqQeWqt5WOHnGP+xc5kGfcUoyWey5M7pKUzUBtMQl0P4VqUfum0qXSHyVijVGAyXEmnnszUtEepe6aLLBkxjivpP8P4Ml2SRJigtpDIXY3MZCHYP136j8M24dcxkDE37V43uuTzzHqro6+JCen7570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H2z5jeK7pzDhFz8fTXj6aoM8mdPzQkOJJMhKiLLuEgSYr2LpU6q60btBeS64Us8JdKwbNzVMnnzpTihh6nxSOd+WpLboBh85/Xf7qGmhdelXz5lUda7azy6O3wTXxDHE4sfiyp7Yh8t2UJ07M1NNbU/wrzc/iQaGkHccXJS4+VbHqSgwNaZAdV73/3W5IOumal1weFL7/R0/Dxco/iXW9NhM9aSCbB0WbFq/xr59OL0FtrKRk4RLFx4v/5kRoQ09t4/wL26wJvkW3ol4AAAAASUVORK5CYII=\n",
"text/latex": [
"$\\displaystyle a \\left(b - x\\right) - b x + x^{2}$"
],
"text/plain": [
" 2\n",
"a⋅(b - x) - b⋅x + x "
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"collect(_, a)"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAJ4AAAAUCAYAAAB8roTFAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAEWElEQVRoBe2ai1EVMRSGuXcsgMEKxA5UKhA6AK1A6ADGChjsAKxAtAOhAoEOwApUOsD/yz1Zsg92s7vZxYubmZBsnidfTk4e3Nnd3d2Kd7PZbF3xTaWd+LT/PRSTXTE4E5ObtiwmngtilQxRPFM+lO67/57CBRdj81Vs1tswoXxqnmpvlTbl/8hft5HnsctK3hzDmYFdkVZeKnNH361Xtuo9aSc2TPi52LyOHeiQPK3tG8mzEyvPY5crMpwjkBLZTi6WRekk77b8/lgwxeVWfZ3F9jkCz1eS50vf8Y/JscjwmQl/oHCr70CeeP1Dje+n/KeIcQ7GU8qyaf2fRcjxrxXJGM41EM4inPOmLbZmmmzF3gQTX1l6BJ4YCLZZrPBSuZAhFm9bftDVY5OBFQAW56Vr+Y/yLx4DoORBBo4XuA15ZGMBsoU9l/8luaosG5w4V9XxGponFu9KY/BHjZf65lL4TeFoLgFDd0valeDudps6FAlAcQvLboWKc5FRV936VF0md79LfdVD6Y58XcVRQBaCa8/ilz4/DK1sZZ4vpzLcOgfhqXaRnfcv+K3SJ6E8kYyvl6UpVJ1OHK3PXgy5XLDSf8snd7YquEYfCEK4lV8orc5qJJclaBBLy1nDOywGDPzbJdbvodsinJjoOjcYT3Xqz3dvxfMWIXyo6B7fI7neDNlq1+TdIIpCm+KcK70Jtq9KOx8E48oSjqzuqS9gIQCPC2mlT/VPfQ87zEeeNeW/DxMt3vTMcBhMFlVonwdix0Bh3ZbF4kGx6tyQPDnfXXlZEcLmqE4eyqTm2JshivegswFGv11VNPROadmkkm+gmLxGi6f+sT4lpzbYIthaqs5hpfJhQjhpls65rrKfsF6KeAKebyQHu0XoSMP9WATlv6k5pmA4l5gx20d5NA0ppmBYJm/9fA1nwSR8Md3njxZKRpQO17gIFsXc7hAeGSw5FwzC03pAXs53ofPHgtgxhHV7x7syRPEAyfYwlCuuRM4iTumwXPJNW1dSuaxPFgSutAiUvy/v8xel7v8iq9uS75NKsaF5ZopvcrKr7FVYoZJgqRJSMETxUII+22nleAwEbWeKJYG5QfLt4W2onI9XtpMyUf2jaFx2nMIpzD2aK98pVs0kwqnJsgzCU/3iOH9mPBVnLKeS11+M9DmsS8VwJjGZhGMJz+0uqZOQWI7P8lg93sf4Nw8Wg8MuaRyUmyZSxfJO7XY64xXkoVEmjMXA2N0WVjeJqk+Z8PKkz7xTmaF5wo7nHydznbx5ycpfXTimYuh+JKDGGMiWBjGa9SljiE/pAiy+9eqS6hNLw0Nt4wJdFp5jcwwZzg0zq2iUm131tLZOxUrWPXu0bjCiAmfTxicga2dZeI7NMWMY/iyKF3cOqUth9SIUJVkRrVSODG1/FjXxDGagyNBbPIpk2hiUn6ILAhzi/bNFLJOJZ55UjmFm8Shje/D00/cAmJhw+Zh++h4waRutYvgXEdD9SOTL7jUAAAAASUVORK5CYII=\n",
"text/latex": [
"$\\displaystyle \\left(- a + x\\right) \\left(- b + x\\right)$"
],
"text/plain": [
"(-a + x)⋅(-b + x)"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"factor(_)"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAJkAAAAUCAYAAACecp+8AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAEGElEQVRoBe2ai3ETMRCGcYYCMqECQgdhqICkAwcqIOkgGSpgoINABYR0gFMBiTuIqQBwB+b/ztob3cN3uvPJ59fOyDrppNWvX6vVwzeYzWbPTAaDwbGeT5X31fJ2MRYPF+r3SDxMmvZ/1zks5Q4jc4aGgf209K7H4uKHwnETHijfNYfSd4hOhX8KT03w9FVWODPcDQCCyAIfFZ0r3Xj2Jgq27Ed8MLj34uN1aNdicuh0T4TnPBRPX+Xy3B0ARJksDw+bYmDCO1S4ikmiuJhK/yi0nRVweCI835ftcx/cPXegrxWfLduBLaz/SX36rfAloG/ROJRhnLr2RwE41qVIyt2BOsA+gn3ZfpnMDY/zZhNvkHMl5skVcIgDYKnEu26E+NzhyYYKUWeIGwRmOiSx13lS+Kjwsk/ihOuzMPxRMOFEObaEi+GGfVAVR7E5xJONhde2CK+U5pB2p7gXachdcnK5EODklNl1LAYgiJNRelLTM4cMNdWuTdVlUK+WqI/3xtCHpkPPYHq0tMXKY79ayLf3xBJOf1E4lF4mJY2A79C1Z3kppz6eqmfpWDl3bPwh/K9C5yJrhwyOs9fquL8cPyivyjN0jiWnkAG7EybfE4CPfURe4IZ+VEk0DtWo7cfeCu8UEBbr8ZL0iqUxdyyXRwoJ+DxYZyT3yq8j2aqi54NIsCWH5Yi6t1bAxRB3k8srJJ1LNpL99+g80vv3fqZ7rjzmqw7tUj9jUMK86GoA48OIqiQmh+zHxp5hcRsA/kpZN+5Yyrjl73y5lF50Zy54lYYg3P9J2zZVt7XLV90Cpioc4FRQkcX8OJ2xOMRz3PjtK83Eg8N0ufffVz1TR6HVVkP1WnHHchmyHKhYM3GzDYMyr2YKEs8kIvL59j5aXIGpqk28lL/Ul5WNwqFrCCPH0Hwxr7uyLccy3GFkEAiRseRXTjH7iMTABJxL1bqlKFe9fVKGPXW12fQXBDyFzPlSafVKXidZsTlMjdwN9ju1eun1ZxGuzvK9thpzh5Ex4MF/nYSidqDQnRqRCOKkRtpIe6Ny9hyqetly/PmfuXhm4BTYq5VhgZs6jxGFQ9dRDicph3rmIHUr3vr4iKEVdwMBTjbhAs3dS6fiZt03KcWbvVDgbxG8AgcC8tjQ1g2gimVFevE4HN9DbuKzlZVSfdpHbFZyNVCqS2VZqvzDTFLR/1GZ2ByCF6yMEdcprQ2sD+6SP8jVMB04E/iymaxX6yXLEhXaG7WDB+HgUjsBN4XDPrg7cIQzU7iR3xTB+/l3XLFws3+svWpxjW8Khyvnzv/Uh1trNpMb4c1iWZXp1YznZNz0U589hyItz515MrhtMmspv+3CBtuuCkL7uudwzlSGu9ST8U4WyB5k//n1/vPruam0+JUNFT5d/w/9mjbyizbuSAAAAABJRU5ErkJggg==\n",
"text/latex": [
"$\\displaystyle \\left(- a + c\\right) \\left(- b + c\\right)$"
],
"text/plain": [
"(-a + c)⋅(-b + c)"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"_.subs(x, c)"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAHgAAAAUCAYAAABGUvnzAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADuUlEQVRoBe2ajXXTMBDH6zwGaGECygZ8TEC7QWAD2g3oYwIebECZgLYbECagzQYNEwDdIPx/imQUSbZsk7ixH/eeIun0df876XxWXCyXyz1HRVEcqnwk3rnjDS0XhhPJPBOGRRfZh6yDJHYMbI2Mcb+6+pBz4bhUOmyLgTGhDlTfh6f0W+m27Zx995eMa9iNcRFCdKPUWil9A2iynnBglJsmff0+dTqwbZd+/10sh9gnYuzZo30tgTu5NebYJRKOO8kzE663TeVqoIOnmutL0/nuq1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ain": [
"(a - c)⋅(b - c)"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"simplify(_)"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAADIAAAA6CAYAAADybArcAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAEkklEQVRoBe2ai1EbMRCGcYYCwOkAOoChgkAHMOkAOiAlZEgHhAoS6IB0kEAH0EGCOyD/J2s1in3nk86S7zLDzgjp9NjdX4/dlczk9fV1K4Umk8m5+h0qPSj9UjpWgvbF42JeHPAvQFKSVAQIyoP83Mao/KK0Z99D5RMEd5FWY099/igB5kJj9m2M2mCwq7qZ1Q2Rb6cIlZLP9JPSR8qubYy+WaHZ0CDQ550plZij+I+o75nK3/kWqIOofuPFpK3lFWV7PWn2J6allH9SmYO+o/Sstkdr23SesyIAuVtQkG12ojQdEgQ6Ja8IncdMOSsyZhzZh320YN5WZGxL87YiY1sR9CGaJV6qmS7lZ5KC05x+0vlS6ZoxeOlTpVslo8Mc5ybvjleHpko4TRJOknDG2ojHdvVdlHxYBO9nN0viDhBbEcKQIrMnnkTLhDHwPi3Ft4lPUDgSiNDbps5968SPUOah7/iUcTEQoldbFfJweUph1NXHgzno6pfSLl5sW85HmPAABAYitkIMpujNT7yLHHrxuVLi/KHrjtN9cQbUcO870KnYeVmU0/dbOmFMAIGRCvr9syIO2bwT93BbGWfe+gquNU76MeFhhZeAeDDsQQNCXtXi5IKVPmFbqezOXWOIIsZcZ78oGd1E/sLqhsyZ6EfpOVP+EUVWXqykPF7f7uIM5F2rCvmJwthAPHJ8UuI8IP+90m/Jd5Pr+96ojkcRtv7cIarQtsVYwvi8XLX1XadeMpATeKtsjtSdAX3jVFf6oUYAsVJigHWIz8tx3F6iLP7OnBov/43MuWmd67DSFXQCgbkIz2xgWCEnwASvmy/y0zdb+j6HbxIQD8ZiJgCFbZAjLLWv+CMjmNaUcTlAOHgIAFDRFYkVFW8LlbLCmUbzK2ZNxFnB3J1IMHkxkhU69ZYInphWJjg89qntMmqneZni2Wgra5Q5yKxZauMX10e8ndPVtwuRrI++2QmdAexKPyIG9qbL4TsT88WXRrqsRX6m8Qk/PaOvyjG/vPgjl9WhbjUZ8qZcI82PZB28Jl6161auiGaLGeFxmlf3UVMrEIFgr04FolpYUnJmGq2WQOBpOWQfSgoTXyxfFVoCImEcNFJRM+v5VgHhmMaHUBVVzKzn+xLLKl0Onl3C2Ep47mKXKPHC6lmcVvWm6YB4gQSDa8dQ4sGEcBbitzImqLgzjVfVWS3tX8wsMU4IC1ROJWZ9qkTeRpjw8JN2W6d16rcFgqUHBGT5/KvcX2RUpVY/UlVqBeZL5reCjI2wfAOykWnOELK0Ijr8XGKKHE7xOVByoXiGTr26bjeM4nFurXsHAMSDf+3oMssN4vtVVbVaAoRjxMlW9SFAX9pa/eZj+FFha2n2CBjZEkeawdFfpBanLgBRAz9gfla6Eiiee2Z0VpmYaY9yBxEUdt+tO5j0bXZApCyKAoJVIS5yIGD6v6yOAyJl7V/9sDRFTC+TsEkKW4vtJMGsyJnKhNwuEs7YWt80Jv5NZZM4tgIQD8L9eCLl+fHEASmwtfAl9UmKxpcrDrZ7eLD6Prl4cObYovbwDd+qb2N/AXNR3z3kmRxOAAAAAElFTkSuQmCC\n",
"text/latex": [
"$\\displaystyle \\sum_{i=1}^{n} x^{i}$"
],
"text/plain": [
" n \n",
" ___ \n",
"\n",
" ╲ i\n",
" ╱ x \n",
"\n",
" ‾‾‾ \n",
"i = 1 "
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Sum(x**i, (i, 1, n))"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAALkAAAA/CAYAAAC8RGmZAAAACXBIWXMAAA7EAAAOxAGVKw4bAAALr0lEQVR4Ae2dj3XUOBDGSV4KgNBB6ACOCi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cr7EKtWzX2SrEwWeOIOoa+i3JMAOYIqMTtRgtP1ryX0/fVaLNmy7ktOx4TtMDg1UCkPFyF1WToNUQK+4JfTYZJH+C+7Gqlqkz9uTjOP6xBO1bEo90p8cnXitEINAAYNKn4ofuxVZI1VDDHmtCvVZflnk4d1BzgAkucUAJ+VEcvJNeWnSvDBoECAB385xKRjv3eUf6Z8+idyc1eJfvmoBl740fDAXeBIZMcstS5rhLU2+a2gLS8n77PYngnGpAfY8GO1IjITJkqn3Kqg+nUSsxCyUe7C+yf1mqu9Ur/swhF+0JLblEb8GHD8QfihXAbpodKoV3/V3mlGGthaSy6A40MCZiwQVuxM5w90jnVKfdgZDZeLOkQDWwtyKWNdr+gO0bO32aAGciDH18GnwwfaOMn64saYH1mSp3pFV1abXbcR92KbFMvz445oIAdy27ETTkrBshG1CLBsbHKbm6JMmiAAnJ192KRw3ZgAxfZeOH8N7GduIezQVYYFvWka7S8LyGt59femFeH9rUYDrV8GwVpAYbMGyHEBBllR+PQhQKl6hKaOlTinv9ZXQZXfSeKHm8VDiHMlViIerBBlIRwWNqM6Ou2IBrIg5/4FFiIRgO5GQ4n07eQaWJUGcu6K8ccC4steCPDBt7UCP7oG5qKBIsjZrCnxIIWXbQD6Jnz0uejS5ZyoBoruSiqzAI7bwr9Z4bGqk2tgNhr4D6BpucBjImW5AAAAAElFTkSuQmCC\n",
"text/latex": [
"$\\displaystyle \\begin{cases} n & \\text{for}\\: x = 1 \\\\\\frac{x - x^{n + 1}}{1 - x} & \\text{otherwise} \\end{cases}$"
],
"text/plain": [
"⎧ n for x = 1\n",
"\n",
"⎪ n + 1 \n",
"⎨x - x \n",
"⎪────────── otherwise\n",
"⎪ 1 - x \n",
""
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"_.doit()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Define Equations"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`Eq`"
]
},
{
"cell_type": "code",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IbcmQovl6ri703bWrtJZBKBJ4YBnCJ2e7grqL1V/QxbVS1s4A9Y4zHgPhBjoQbRxy3JFe0Cbqj07WF/rHFz8YlWDlsXtap5s4Wi78xZ+DUDf4caPD+Cnmqjy7Xw/gDjHugHzqLNh8JNtpm7H9rVYYf+FN2LeCdeiXAylxB4pIBpYZzYAxbH8bzVOI8IU2cY2l0UYbAs4d6xdWR4/OjEJcphjvHugn7P6SOM4KegA4Us6GyR9L8mK9nN/jZxZjPJuz97H51JFnmr3WhHwO5bORHCf6OPDGTXjhYmAAAAAElFTkSuQmCC\n",
"text/latex": [
"$\\displaystyle a x^{2} + b x = c$"
],
"text/plain": [
" 2 \n",
"a⋅x + b⋅x = c"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Eq(a*x**2+b*x, c)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Solve Equations"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`solve`"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAHEAAAAWCAYAAAD3j3MyAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADr0lEQVRoBe2Zj1EUMRSHuRsLAKzAowOECtQOTkuQDmCswIEOwApQOxArUK4DrwOQDvD7cslO2GUcbm+zLHpvJpfk5d/vvZe8vOyNbm9vN0rTaDQ6Zo1N0oQ0Jx2x7g35mjrQwKi0EaMBT1lH421Q/0I2of6yA/zrKdDAuActTGtrfKS+izE9lWvqQAN9GFGYucGSG815HYjy/07xrLTouM2d2hq7sf6zxl9XW2qgr5OYwzPIWQc2uUZWLBcPbHJ8KUrldB7k/L7KrG+EbGC1R7q+x0v0BaXTdXo7iSjwPcg3H8uAao21b0hvKBopz+T9C9SLETHga5S1kwxonZTuxqX0yLgp6XCpQc3Orn3eZJfjdIT7XoDFjRiN5T34Iwrik+OIFN6N96IqyASDG0q6WGRP/7d4dIqKvpPSXVRpTNdWVfotBHf6iOt3Lu0dI7JLJ6zgKVHBKv4X6QPpRS40/WzzjpP2SY5xrG7qOemK/ifk3kNb5gMiT+IMGZJL9gn0DZxfE8Zl5Etj+srBple7yta7UMkhwVS43yQ/iSXeJXWqi7o5pAGPE4+yxtTYh7Hd8mVq7zpnbt1xWGvZuRkndoVQLoMssooX5I71zuVj3ta4I04PibqdJrkpK8dlOIlx5xl6+37L7yof5NeknDyZfjpL5E52gbPI8FQONfJzo0qvkPPGgjnyW/TZI/ahyqfBzsBbeQzq2uo8vBMR4pSKJ2orCUfZj9Va3o/XwTVGnjs4KCDWndw3l3dNZ8Tauo2k9HxeT9M2Kd9sqX0OjrepUs+jnHv0qT6+w3M+PdAJ/CPr5K3lK4i7YZ9KPgBbVgjvheBGI0/hbNzN+fVy7NPKvdXnekid9Vq7Jca64dyUuZxuFOWs3FSt3baV5XP+tvMwrmGfHOM47kQNVneB4RTQuc6n64IYm956TyVcF6+GzCmd3IYMQ5DvL/apZBhXJd5xWdmid0QwIBP5wPbe08Va1uhSw9C0HWbti17D+q3ccMT5DngHbNbgQuENSr6EC4xebQ0S7zh20ljBSPaiQf9rPQm8T785fI1mABSMR37nHqTdMX7aCgqhPDQyKKjkpKwsn8EbgrIByye+uq43wWssM0+BjSfrE8nT6DvPT1IaInxpIZ8h6AWD8n6wQ0SqwY1Qg5tKCrGxBIHBu8XnQBVsPXSdiF+Z3NUBc463pHyr4FY+xotbSifSACzooNd/MRYYVvtdVRmrrd5+dEncT9GIeoNtdmFy9e012+NIjFgM9x+M0GTVx5SzrwAAAABJRU5ErkJggg==\n",
"text/latex": [
"$\\displaystyle a x^{2} + b x + c$"
],
"text/plain": [
" 2 \n",
"a⋅x + b⋅x + c"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a*x**2 + b*x + c "
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoA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BPaRgHU98ao5hpwQqAwvCvpRRre9DS50/0rvGOX3IR/f8KbPY8bvJrAvBKzreVbKBjkRVynoC7qSMX4+0OXPKsNQt6GJ4DUT2vC9ygPAXFQvAet6vrVxyCIBWykoP+U97RpjlWFsSYQk8I77v9zDO8aA98spdjKBKglY1/Muiz3klXyloNxRwa/y+p4xRrqb/upmtE/9xhij5B0D3qvmrAnUQcC6nn8d7CGvYByMKBfrPmifODEJb5gH3zyQkX5NgY5heKPHTP5ZyEfv2M9mAJRTtQSs62WWxj+dXsFZSspta/Ge435PX2SQTylUPYz079rwkr/X9k4b8WSMOGUXqutYskA41UnAup53XcSXxy2c2SDn5ezeTcAETGCUQDTIjiGPonIFEzABEyhDwAa5DGePYgImYAKjBGyQRxG5ggmYgAmUIWCDXIazRzEBEzCBUQI2yKOIXMEETMAEyhCwQS7D2aOYgAmYwCgBG+RRRK5gAiZgAmUI2CCX4exRTMAETGCUgA3yKCJXMAETMIEyBFqDrF+KXPa2oT/vLCOVRzEBEzCBAyUgO3ves7WXmiqPVzjip9PsNI+CpKCTvvn5Ch0a3jUBEzCBBARkjLG3jQHudXfxHwmDeNEosTz/AAAAAElFTkSuQmCC\n",
"text/latex": [
"$\\displaystyle \\left[ \\frac{- b + \\sqrt{- 4 a c + b^{2}}}{2 a}, \\ - \\frac{b + \\sqrt{- 4 a c + b^{2}}}{2 a}\\right]$"
],
"text/plain": [
"⎡ _____________ ⎛ _____________⎞ ⎤\n",
"⎢ ╱ 2 ⎜ ╱ 2 ⎟ ⎥\n",
"⎢-b + ╲╱ -4⋅a⋅c + b -⎝b + ╲╱ -4⋅a⋅c + b ⎠ ⎥\n",
"⎢─────────────────────, ────────────────────────⎥\n",
"⎣ 2⋅a 2⋅a ⎦"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"solve(_, x)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Solve Systems of Equations"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
"z = symbols(\"z_{0:2}\")"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA1kAAAA/CAYAAAASRALpAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAVa0lEQVR4Ae2djZXURhZGBx8HAN4IdsgA1hGsyQDWEYzJAB9H4AMZeDcCGzLAjsBABrARLCYD9vs0qkGtkVqqH3VLpVvnqFstVZWq7qvXT0/1ozsXFxffaXutrR/eff78+WH/4NjvO3fuPNC559p+UbpXY/E4DgEIQAACdRKQHbhUzV5q+1F24Pct1BLbtQUpUUYIQAACyxHIsV1Kax/KvlQ/PPm6c+RJZ9+7n3q/R3/qAs900g6WjeomDOtoZTgBAQhAAAJJBORYfZA9sA14re9/6/fTpIxOlAjbdSLQXAYCEIDAiglk2q6mg6lXPT9svLijrenJ0gW8Hx1kpH5Roh+0vVAeP0ZnQAIIQAACEKiKgOzCY1XIRiZqRMQpIWC7Tkmba0EAAhBYP4FStkv5/KXaXn2VU2VlYgfNDtYrHKwckqSFAAQgUA8B2QMPGfdDtwetM7OqymG7ViUOCgMBCEBgFQRK267kniwZqbsi8l9t/r6ngs0eXrgKkhRiFgHJ2XMs3s+KXHEkte+knt6Kkey2aujEtejn6IRYvVVsz9d9qPjv1tBosF1rkMLyZUBPrxnP0dPlpcEV1kAAnZivE7m2S+mbnqzunKzYNvAvJbCD5XH3OFix9LYT32NNH0nGUXPt1MCczu3DTtoHbZ4ITzsRCMLmCaAT80X4s6J62OBP2vrzfufnUjYmtqssz7Xmhp6uVTKU61wE0In55IvYrhwnKxjMZnLX/HITcysE2qcel4kOlleZtHN1oXzcRv7QNnu1SqcjQGBtBNCJOInoP+CVmDmR52itJWC71iKJhcqBni4Elmw3SwCdiBNdKduVMyfLPRQOH6+/+KyQgOdU2JuPDf0bKufhuRmhzcTmR3wIrIUAOhEviaYHW/rvnu01hPA/hO1agzSWKQN6ug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: - \\frac{a}{2} - \\frac{\\sqrt{a^{2} + 4 b}}{2}, \\ z_{1} : - \\frac{a}{2} + \\frac{\\sqrt{a^{2} + 4 b}}{2}\\right\\}, \\ \\left\\{ z_{0} : - \\frac{a}{2} + \\frac{\\sqrt{a^{2} + 4 b}}{2}, \\ z_{1} : - \\frac{a}{2} - \\frac{\\sqrt{a^{2} + 4 b}}{2}\\right\\}\\right]$"
],
"text/plain": [
"⎡⎧ __________ __________⎫ ⎧ __\n",
"⎢⎪ ╱ 2 ╱ 2 ⎪ ⎪ ╱ \n",
"⎢⎨ a ╲╱ a + 4⋅b a ╲╱ a + 4⋅b ⎬ ⎨ a ╲╱ a\n",
"⎢⎪z_{0}: - ─ - ─────────────, z_{1}: - ─ + ─────────────⎪, ⎪z_{0}: - ─ + ─────\n",
"⎣⎩ 2 2 2 2 ⎭ ⎩ 2 \n",
"\n",
"________ __________⎫⎤\n",
"2 ╱ 2 ⎪⎥\n",
" + 4⋅b a ╲╱ a + 4⋅b ⎬⎥\n",
"────────, z_{1}: - ─ - ─────────────⎪⎥\n",
" 2 2 2 ⎭⎦"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"solve([z[0] + z[1] + a, z[0] * z[1] + b], z, dict=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Solve Recurrence Relations"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`rsolve`"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$\n",
"\\begin{aligned}\n",
"y_0&=1, \\\\\n",
"y_1&=4, \\\\\n",
"y_n &= 2y_{n-1} + 5y_{n-2}\n",
"\\end{aligned}\n",
"$$"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAbYAAAA/CAYAAACMwe3UAAAACXBIWXMAAA7EAAAOxAGVKw4bAAATMUlEQVR4Ae2dj7XctBLGk3tSQAgVvN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WWcqYENjaV5Re2d725bqxzA2Fa/8meWHM834YQUN1zrkb6y3kaCdTGsv0ffei7eiDQN/kAAAAASUVORK5CYII=\n",
"text/latex": [
"$\\displaystyle \\left(\\frac{1}{2} - \\frac{\\sqrt{6}}{4}\\right) \\left(1 - \\sqrt{6}\\right)^{n} + \\left(\\frac{1}{2} + \\frac{\\sqrt{6}}{4}\\right) \\left(1 + \\sqrt{6}\\right)^{n}$"
],
"text/plain": [
"⎛1 √6⎞ n ⎛1 √6⎞ n\n",
"⎜─ - ──⎟⋅(1 - √6) + ⎜─ + ──⎟⋅(1 + √6) \n",
"⎝2 4 ⎠ ⎝2 4 ⎠ "
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"y = Function('y')\n",
"f = y(n) - 2*y(n-1) - 5*y(n-2)\n",
"rsolve(f, y(n), [1, 4])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Differential Calculus"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`limit`, `series`, `diff`, `integrate`, `Derivative`, `Integral`"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAAwAAAArCAYAAABM3GlpAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABH0lEQVRIDe2V7xHBQBDFnVGAoQM6MKMDOlCDEqKG6AAlKIEODB0ogeggfu/cZpILM/LBF5Odebm93Xd/N7fr8jzvNJHuO7JzbgEy0I/9PTME547+HQxAjey52lIMHAnQXvux7+2W/EwfPu2ADxdTMf/+lipRZu0N2IMMKNLn0F9axJ2UJvL7M7QrfBMPB6lR5NpIf3Ot//DzxfVhGQ4+pV2BEZiAIbjx/tc+a9BR8UgtM6Br4BUkIUlIP3s9GFIMRfFAV78oKOgLMCoPKMhhAuWjg/QYPg4YHxDKon0fygbTa4GjOIosOb6a6tcPgKQya1VzJgqrXoyKLzF/F0UE5VNPpJ0bUS1+Xe3Dtq0nqplVn09AsgW61jHQ4bWabF6efVGdE1QqEeIAAAAASUVORK5CYII=\n",
"text/latex": [
"$\\displaystyle \\frac{1}{x}$"
],
"text/plain": [
"1\n",
"\n",
"x"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"diff(log(x))"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXMAAAA8CAYAAACUw1qfAAAACXBIWXMAAA7EAAAOxAGVKw4bAAASYElEQVR4Ae2djbHdNBOG782kgEuogKSDBCoIdACkAqADmFSQSToIVEBIB5AKIOkAvgoI6SDf++hqPbIt2zr+O7bP7oyP/6TV7itptVrLPtcfP368cnIEHAFH4Pr6+ntQkE342dE4LwKqixtJ8Ivq4ptSSe6WJvR0joAjcFwEZDx+lHZPZDweHVfL/WimevigOnmp7W1pnVwr4X40dEkdAUdgdgRkML4U09+0fYYRmb0AZzgagTjIfqF6GfTQ74wuxTM6Ao7A7hGQsWA6jyF/vJYhx0Bp+zi07R7chgJj9FadvBCb+8obQmANlrVTD7PU4PATR+DiEPhFGv8ho/FuDc1llJgFfKryrtcobytlTNQbr/xv8XjVN+B6mGUrte1yOAIrIyDj8FBFvtX2QEbin77ilfa57uPF39dG2p/6DIvuZ0l8fteNbyxv5Puvrj3Qdk/bd3ZPx4ehqXorP7MnHk53hls8zHKY5uKKnIKAOgdT16LpvtKFkMAp/HeSFq/8tQxEiSF/qXQ/aPtKeTC6b07VUTh+rTy/i0eIy+v8pc7/1vkLeOv4vbZgtLQ/DM2k9zMB8rV4MaBmyY15Fha/eAEI4Gm+kxFhdlq0HQkTGQU8bDzznwr0wginhGF5GHmk14eOGQyIAaeER27ELIEwzNFost7CjTAYW2fs3GPmR2s2rs8gAtEI3VcH+WMw8XETYMT/EQa9XnmivoVXuBQ8a+3Ta0nS9qEwxwjVvG6VjTeeEssiD1UnM+vNTAYnpDkgBgzdmAcY/OfCEMC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Xl5q37Jy/O1DrcM28AH71v3gJ9rWOe1kNMH/mLs4dqxC+44OQIXCgCreWH6ifhz7mFB6/5+6z1TA3DH4A2gFfDZM1s11ue/rpyAy8/vTwE1EeIi6cru/DK+Z6Rr2Q5Y3P4Pw3mnSUtO4+QAAAAAElFTkSuQmCC\n",
"text/latex": [
"$\\displaystyle \\frac{\\log{\\left(x^{2} + x + 1 \\right)}}{2} + \\frac{\\sqrt{3} \\operatorname{atan}{\\left(\\frac{2 \\sqrt{3} x}{3} + \\frac{\\sqrt{3}}{3} \\right)}}{3}$"
],
"text/plain": [
" ⎛2⋅√3⋅x √3⎞\n",
" ⎛ 2 ⎞ √3⋅atan⎜────── + ──⎟\n",
"log⎝x + x + 1⎠ ⎝ 3 3 ⎠\n",
"─────────────── + ────────────────────\n",
" 2 3 "
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"integrate((x**2-1)/(x**3-1))"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAIAAAAAvCAYAAAArdMLwAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAITUlEQVR4Ae2cjZXUNhCA73gUAKSDo4P8VBDoAB4VBDqARwV50EFIB4EOoIMAHQAVEK4D8n06SUi27F371rfL4nlPJ3k0Go1mRtJI9t7p169fTy4Dp6enZ7S/R3q2LR/6PN2WdqVbVgPXdsBew7/XqNumHfS5stiRBi7lAHH2n2H4NzuSZ2VzxRq4lAMg6xPSn1cs8w/ZnZON9HDq4G0TJ2qzqct2s2ITEqY3oHlH+9slbezsUYH7mfJf0L0qcN9FkbEo+1OScc4bxqDDXzlEnarDu2Xn2+oaupe0e0L7j2X7UAZ5MifR+C/SvbItzypKQTNPaUh62cMS/72UkVtH/0J6uS+Z6fsdya221OvWuqZtmqy5feLVQ6SKsTwy/NClAf+YpLG7jiGuR99tf6jPyP6atBcHoF+X/WpSqSdgkq6hN1h/3NX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cpg5w4QZ7eXQ70ABpwfQBoceoewQtQAOnO7vF0aH9zQjz93qredOwCDMHDxa9izAUldAdbr4Kgc9GRs5D+Z6M58nWJxWOQYiNTuYe71/gpWhwjAs7GBv7HrrQ6R5IfK4iTxNvAV5XQ/4gRxhfS3BOkUtZheJl0FKwWCGqgooPu4wrqsa1ANm8/40OnZT0ne/ukE0q4vg1BCAnTkLaB6aoGfrI3+K55Wo6m4yQ4wtYOV/rA18D//g2/rvUKBXwAAAABJRU5ErkJggg==\n",
"text/latex": [
"$\\displaystyle \\frac{\\sqrt{3} \\pi}{18} + \\frac{\\log{\\left(3 \\right)}}{2}$"
],
"text/plain": [
"√3⋅π log(3)\n",
"──── + ──────\n",
" 18 2 "
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"integrate((x**2-1)/(x**3-1), (x, 0, 1))"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAANAAAAAwCAYAAABg4PT2AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAJ3UlEQVR4Ae2djXHUOhDHSYYCQl4HoQNIKkjSAR8VAB3ApIIM6QCoAEIHQAUP6ACogJAO8v4/ndZP9tl3vovtuxXaGUXWhyXtalfaXcmXnZubmzs5ws7Ozmvh9VvhvsK+wjPheq3YPQi3B0LiTOFcAZxOFO4Iv7fEBaajwE6OAiQGeyMSfjOGiukDpU+nI+14PQkfBOZT0sNH4fY4SZfHiShwd6J+NtENO4/BNz08t0QmMQLzkyDhyWJn9TgvWQqQGOpFYzIeKv25kec9eS08v3tHwvv4sxSgdFKk7uwp/UThOM3P4PmxcMMWAthtX5WdKNBi0j9Z2kBGQTHYSz0/VXgv5rqwfO+x8DoQDth0YVdVGvX0sdJZ2Hie5idrAbKJEIPhVMjGiWB4WSz82Imw8+5LiLCLCkxEgd2J+tl0N7i0T8RojzY9kCH6Fx6XCqimBiY07EwFJqRAdgIEYyn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95SPoPC1ZW1+lIdg8Q4XLhWFK/21nSrmI5itbTfb9JoWftCi2nmnwEP9sbMH2tNfcGMrwyNgG/S59uERN8aMqxbHDjvWImAhaQPbubrK297xlvdMAz6batBx9+H/0VY2KF44rwBj8EspbOVcrcGBgPHMajy5Yal+BwXh0KV6gS/AR10mXKiDXWDOh65yt/mi0bVocK7ApedKjR8DIfUBHef+iZlLAUoYB1odinjmqcIG4l+bYDvgms8KhBeLBhN5EZnHhMN2mxRfEyq8ktkC8yy6MO/Ye2MunPDY3F1HlwKUcAOr8YckzSPpdyJodRm2Ue45iecJFaJaMCIythN5xm3tsSNEa7/c80X10brD7fZ8f6uqCRlbcfHA2bONEZcuDHVoGTnEWhAQHhaFdBW0XaYNxf2YiWpbYCQKuBSgSAuM7KbwpGQy9SbNc/ks4cFbhzeutgomi4cJS4ofiwjQ51OCWc3yd2UKeBYgPCGLhCQLxpHw4I6ufoeMGVYe3jnDHb3fhIViAxOqMe0C6+uvjT0L0LlmLdyHaswe3ivc2+4ZR0KCjcehXW3nUR5CZcBZSJu6Ch34LYJFu7S1UeI1KeD9JgLMgx0UjGoxHCvxLwUXXjiNF9WMGwNtNxHYYbhVkRrI4MfOwkEeLvsAaofDPe7IhboJHY6Vx05dYCQKuBYgaCJmgQFNhYG5+Jx3q5lGY8YhwFhxSzN2xovKWf28rergDGEHagMWjVSAaIMDRXMYHOl56+nQhpi3PPcC5I3gZbx5UeA/DJEkB1WP/kwAAAAASUVORK5CYII=\n",
"text/latex": [
"$\\displaystyle x - \\frac{x^{3}}{6} + \\frac{x^{5}}{120} + O\\left(x^{6}\\right)$"
],
"text/plain": [
" 3 5 \n",
" x x ⎛ 6⎞\n",
"x - ── + ─── + O⎝x ⎠\n",
" 6 120 "
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"series(sin(x), x)"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAAgAAAAPCAYAAADZCo4zAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAX0lEQVQYGWP8//8/Az7AhCzJyMgYAsTvgVgAJs4C5cwGCrwDYiEghkuCFYGsgGGgQBkQg+wUgImhWAHWgUaMKoAECCMoxIDBPRPIBQWzCxCDgvocEN8D4t1gBUAGTgAAQFIgDGUiF8EAAAAASUVORK5CYII=\n",
"text/latex": [
"$\\displaystyle 1$"
],
"text/plain": [
"1"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"limit(sin(x)/x, x, 0)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Solve Differential Equations"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`dsolve`"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [],
"source": [
"f = Function(\"f\")"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAASEAAAAvCAYAAACsYHzfAAAACXBIWXMAAA7EAAAOxAGVKw4bAAALDklEQVR4Ae2di5HUOBCG2S0CWLgIbsmARwRABsBFAGQARQRbXAZABMeRARDBAhkcGbCQAfd/Wskry5ZfY83YM91VGtt6tFu/pHarLXmOfv/+fc3IEDAElo/A0dHRa0l5onCq8F3hpcbvLx1XTUemhFbdfib8gSDgFdAbjVeUzzVd/6vDqa7vrB2C47VXwOQ3BA4EgUdJPc90fVvKCKto1WRKaNXNZ8IfGAKxwgnTsDhulXBcX6XUJrQhcGAIaNp1K6nybX/9JYlf3eXWLCGZjZiOHxV+KrxZHVImsCGwJQQGjhWc1OaYntImApjXcY+l2T9MKW9lDIFDQSA3VhTv3pJpDD3fByy2ZgkBlsB74EH7tA/gWR0MgVII5MaK4p/pnif7ooDAb6tKSPd7qPBdAAanGjIYGQKGQBOBxljxiulWUEBcKwTfUJPDSmK2rYSwhMwKWknnMDF3ikBtrHhlwzTsXOePCD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TJwPiUbtXKeAkSGwZgSSMWBjJWnM/wHSLqxWd4V5YQAAAABJRU5ErkJggg==\n",
"text/latex": [
"$\\displaystyle a \\frac{d}{d x} f{\\left(x \\right)} + b f{\\left(x \\right)} + c + \\frac{d^{2}}{d x^{2}} f{\\left(x \\right)}$"
],
"text/plain": [
" 2 \n",
" d d \n",
"a⋅──(f(x)) + b⋅f(x) + c + ───(f(x))\n",
" dx 2 \n",
" dx "
]
},
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"diff(f(x), x, 2) + a*diff(f(x), x) + b*f(x) + c"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAasAAAAvCAYAAABdR+UXAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAOYklEQVR4Ae2di7XUNhCGc++hAAIVBDogpAKggyRUAHQAhwo4pAOgggQ6CFQASQchFYTcDsj/aSVHsuW317Z2R+d4besxGv0aaTSSrL34+vXrN+ZOB4GLi4tbKs191evr0kol3p+K55eF8P1EfL4Xzp8L4Xf3bJYquya364jWtXWysVzWQMA39lfqQB+skd+SeYj3+6J3U7xf9NFV3DuK89DH4/nJFkpDfLzV9WyLvPswKi1cODLIKk52xbfJ7UrCdqGGtlJWls2xEVDD+UN5/FRi5ynef/e8X/XhRFyV0Slk31nQyd3uS7d0uPK+LpoflPf3S9M+N3rCskjZRRZVV7Q5k9sjC+3lkekb+ZUQUKN5rKw+qdEUNy0l3n8U7yig3gbv4bwRwfpJz7dEA8WxqvP8vlfeTF+am4hAqbJrcjuxwqcmU4P7xq7yMVD9/6XrVol1Kb5RVJPkUGlRdH9NTR+ngw9d14Ofnpni+VfXneBXvxOfOHV/ex9en8JvddlVni/n1pFomNxObLdTsDfLShJXutMIj/l+OvsSrSoswrdT6kDlRlE81zV7jc6P7u/GfAjP97zr/mfsHz8rDGvws9Kj2MyNRGBD2Z1liXt5MbkdWd9zopuymoPeftJ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= C_{1} e^{\\frac{x \\left(- a - \\sqrt{a^{2} - 4 b}\\right)}{2}} + C_{2} e^{\\frac{x \\left(- a + \\sqrt{a^{2} - 4 b}\\right)}{2}} - \\frac{c}{b}$"
],
"text/plain": [
" ⎛ __________⎞ ⎛ __________⎞ \n",
" ⎜ ╱ 2 ⎟ ⎜ ╱ 2 ⎟ \n",
" x⋅⎝-a - ╲╱ a - 4⋅b ⎠ x⋅⎝-a + ╲╱ a - 4⋅b ⎠ \n",
" ────────────────────── ────────────────────── \n",
" 2 2 c\n",
"f(x) = C₁⋅ℯ + C₂⋅ℯ - ─\n",
" b"
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dsolve(_)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"@webio": {
"lastCommId": null,
"lastKernelId": null
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.