Created
January 2, 2015 03:36
-
-
Save mwiebe/48bed4e5d52335c47e25 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"%matplotlib inline\n", | |
"import sympy\n", | |
"from sympy import symbols, Piecewise, integrate, oo\n", | |
"sympy.init_printing()\n", | |
"x, y, t = symbols(\"x y t\", real=True)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": [ | |
"iVBORw0KGgoAAAANSUhEUgAAAW8AAAESCAYAAAAygFQLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", | |
"AAALEgAACxIB0t1+/AAAD/lJREFUeJzt3X+s3Xddx/Hni3YTQchcZrbR1ZRJwS0IbIRugGjJULui\n", | |
"DExk1h/8MlISy19GhrhIE8QI0Yg4mWUZC2qgf/gDS9wYQ2gAGRuVbWzSulZW025lbIKEHwu0+PaP\n", | |
"ey6cnd17e+7tPef7/dz7fCQn93y/38/5nvcnn3tf93u+v06qCklSWx7XdQGSpMUzvCWpQYa3JDXI\n", | |
"8JakBhnektQgw1uSGmR4S1KD1nZdgFa+JGcAzwc2AAUcBm6tqq93WJbUtHiRjiYlyYuA32MmtO8A\n", | |
"HgACnAtcxEyIv7OqPt1RiVKz3PLWJL0C+N2qOjjXwiRPB94AzBveSd4HvBT4SlX91Dxt3g1cDnwb\n", | |
"eE1V3XGqhUt955a3em2w9f5N4G/mCu8kW4EdVbU1ySXAX1TVpdOuU5o2D1hq4pL83WC/9+z0hiQf\n", | |
"H+e1VfUp4GsLNHkZ8P5B29uAM5KcfSr1Si0wvDUNnwJuS/LSJK8HPgr8+TKtex1wZGj6K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xvSWqQ4S1JDTK8JalBhrckNcjwlqQGGd6S1CDDW5Ia\n", | |
"9P+VNbu3wevYbQAAAABJRU5ErkJggg==\n" | |
], | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x7b974a8>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
}, | |
{ | |
"ename": "AttributeError", | |
"evalue": "'And' object has no attribute 'lts'", | |
"output_type": "error", | |
"traceback": [ | |
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", | |
"\u001b[1;31mAttributeError\u001b[0m Traceback (most recent call last)", | |
"\u001b[1;32m<ipython-input-2-9d90faaebbf5>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[0mB\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mPiecewise\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0msympy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mAbs\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m<\u001b[0m \u001b[1;36m0.5\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m(\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;32mTrue\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2\u001b[0m \u001b[0msympy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mplot\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mB\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m-\u001b[0m\u001b[1;36m1.5\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m1.5\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mB2\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mintegrate\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mB\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msubs\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mt\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m*\u001b[0m \u001b[0mB\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msubs\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mt\u001b[0m \u001b[1;33m-\u001b[0m \u001b[0mx\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mt\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m-\u001b[0m\u001b[0moo\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0moo\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 4\u001b[0m \u001b[0mB2\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\utilities\\decorator.py\u001b[0m in \u001b[0;36mthreaded_func\u001b[1;34m(expr, *args, **kwargs)\u001b[0m\n\u001b[0;32m 33\u001b[0m func(expr.rhs, *args, **kwargs))\n\u001b[0;32m 34\u001b[0m \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 35\u001b[1;33m \u001b[1;32mreturn\u001b[0m \u001b[0mfunc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mexpr\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m*\u001b[0m\u001b[0margs\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 36\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 37\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mthreaded_func\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\integrals\\integrals.py\u001b[0m in \u001b[0;36mintegrate\u001b[1;34m(*args, **kwargs)\u001b[0m\n\u001b[0;32m 1230\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mintegral\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mIntegral\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1231\u001b[0m return integral.doit(deep=False, meijerg=meijerg, conds=conds,\n\u001b[1;32m-> 1232\u001b[1;33m risch=risch, manual=manual)\n\u001b[0m\u001b[0;32m 1233\u001b[0m \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1234\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mintegral\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\integrals\\integrals.py\u001b[0m in \u001b[0;36mdoit\u001b[1;34m(self, **hints)\u001b[0m\n\u001b[0;32m 530\u001b[0m \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 531\u001b[0m \u001b[1;32mtry\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 532\u001b[1;33m \u001b[0mfunction\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mantideriv\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_eval_interval\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0ma\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mb\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 533\u001b[0m \u001b[1;32mexcept\u001b[0m \u001b[0mNotImplementedError\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 534\u001b[0m \u001b[1;31m# This can happen if _eval_interval depends in a\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\functions\\elementary\\piecewise.py\u001b[0m in \u001b[0;36m_eval_interval\u001b[1;34m(self, sym, a, b)\u001b[0m\n\u001b[0;32m 271\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 272\u001b[0m \u001b[1;31m# Determine what intervals the expr,cond pairs affect.\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 273\u001b[1;33m \u001b[0mint_expr\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_sort_expr_cond\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msym\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0ma\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mb\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 274\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 275\u001b[0m \u001b[1;31m# Finally run through the intervals and sum the evaluation.\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\functions\\elementary\\piecewise.py\u001b[0m in \u001b[0;36m_sort_expr_cond\u001b[1;34m(self, sym, a, b, targetcond)\u001b[0m\n\u001b[0;32m 342\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0msym\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[1;32min\u001b[0m \u001b[1;33m[\u001b[0m\u001b[0mcond\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mlts\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mcond\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mgts\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 343\u001b[0m \u001b[0mcond\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0m_solve_inequality\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mcond\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0msym\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 344\u001b[1;33m \u001b[0mlower\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mupper\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcond\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mlts\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mcond\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mgts\u001b[0m \u001b[1;31m# part 1: initialize with givens\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 345\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mcond\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mlts\u001b[0m \u001b[1;33m==\u001b[0m \u001b[0msym\u001b[0m\u001b[1;33m:\u001b[0m \u001b[1;31m# part 1a: expand the side ...\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 346\u001b[0m \u001b[0mlower\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mS\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mNegativeInfinity\u001b[0m \u001b[1;31m# e.g. x <= 0 ---> -oo <= 0\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;31mAttributeError\u001b[0m: 'And' object has no attribute 'lts'" | |
] | |
} | |
], | |
"source": [ | |
"B = Piecewise((1, sympy.Abs(x) < 0.5), (0, True))\n", | |
"sympy.plot(B, (x, -1.5, 1.5))\n", | |
"B2 = integrate(B.subs(x, t) * B.subs(x, t - x), (t, -oo, oo))\n", | |
"B2" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": [ | |
"iVBORw0KGgoAAAANSUhEUgAAAW8AAAESCAYAAAAygFQLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", | |
"AAALEgAACxIB0t1+/AAAEOFJREFUeJzt3WuwXWddx/Hvj6RVrtZOnba00YAWbQehlCEtNw0DaBqU\n", | |
"gjNSq8ilImHGoC8EioWRzDA6gDrWTqUGpjAoA3kBCGFsKEXICAItgaSlNpFEqJP0BhVkKGBJ5e+L\n", | |
"s5DdzTnJztln77We9vuZOZN1efba/3nOzu88Z12ek6pCktSWB/VdgCTp2BnektQgw1uSGmR4S1KD\n", | |
"DG9JapDhLUkNMrwlqUGr+y5A939JTgCeDKwFCrgF+ExVfbPHsqSmxYd0NCtJng68moXQ3g3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6o+uEiTY+rTae42\n", | |
"2QC8Grigqv5niWa7gDOSrE1yPHAhsH2577kCFj33leQhSR7eLT8U+BVgyavsc7DUOboh9Od24MXd\n", | |
"8otZGMncR4/9OUn/bAde1NV2HvDfI6eB5uGoNSY5OUm65XUs3NI7pOCG/vtxIkPpy66Gq4Cbq+qy\n", | |
"JZodW59OcfV0P/CfwO7u663d9kcC/zTS7nwWrqweAP6kh6u8z2fhPNJ3gTuAHeN1Ao9m4ar/HuCm\n", | |
"odY5kP48EfgY8CXgo8AJQ+rPxfoH2ARsGmlzRbf/Bo5wB1JfNQJ/0PXbHuDTwHk91PheFp5q/V73\n", | |
"ubx4aP04SZ1D6MuujqcB3+/q+EFmnj9Nn/qQjiQ1yFkFJalBhrckNcjwlqQGGd6S1CDDW5IaZHhL\n", | |
"UoMMb0lqkOEtSQ0yvCWpB0me1M12+GNJHtr9kYaJZz30CUtJ6kmSNwI/DjwYOFhVb574tYa3JPWj\n", | |
"m2lwFwtzGj25jiGQPW0iSf05CXgoC38a7cHH8kJH3pLUkyTbgfewMBPnqVX1yklfe8Q/xiBJmo0k\n", | |
"LwLuqaptSR4EfDrJ+qraOdHrHXlLUns85y1JDTK8JalBhrckNcjwlqQGGd6S1CDDW5IaZHhLUoMM\n", | |
"b0lq0P8B10mdx6OdrlMAAAAASUVORK5CYII=\n" | |
], | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x84e6e48>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
}, | |
{ | |
"ename": "TypeError", | |
"evalue": "doit() got an unexpected keyword argument 'manual'", | |
"output_type": "error", | |
"traceback": [ | |
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", | |
"\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)", | |
"\u001b[1;32m<ipython-input-3-b80fb89433f4>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[0mB\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0msympy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msign\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m0.5\u001b[0m \u001b[1;33m-\u001b[0m \u001b[0msympy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mAbs\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m+\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m/\u001b[0m \u001b[1;36m2\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2\u001b[0m \u001b[0msympy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mplot\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mB\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m-\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m2\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mB2\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mintegrate\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mB\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msubs\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mt\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m*\u001b[0m \u001b[0mB\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msubs\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mt\u001b[0m \u001b[1;33m-\u001b[0m \u001b[0mx\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mt\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m-\u001b[0m\u001b[0moo\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0moo\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 4\u001b[0m \u001b[0mB2\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\utilities\\decorator.py\u001b[0m in \u001b[0;36mthreaded_func\u001b[1;34m(expr, *args, **kwargs)\u001b[0m\n\u001b[0;32m 33\u001b[0m func(expr.rhs, *args, **kwargs))\n\u001b[0;32m 34\u001b[0m \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 35\u001b[1;33m \u001b[1;32mreturn\u001b[0m \u001b[0mfunc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mexpr\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m*\u001b[0m\u001b[0margs\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 36\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 37\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mthreaded_func\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\integrals\\integrals.py\u001b[0m in \u001b[0;36mintegrate\u001b[1;34m(*args, **kwargs)\u001b[0m\n\u001b[0;32m 1230\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mintegral\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mIntegral\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1231\u001b[0m return integral.doit(deep=False, meijerg=meijerg, conds=conds,\n\u001b[1;32m-> 1232\u001b[1;33m risch=risch, manual=manual)\n\u001b[0m\u001b[0;32m 1233\u001b[0m \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1234\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mintegral\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\integrals\\integrals.py\u001b[0m in \u001b[0;36mdoit\u001b[1;34m(self, **hints)\u001b[0m\n\u001b[0;32m 485\u001b[0m \u001b[0mfunction\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mxab\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 486\u001b[0m \u001b[0mmeijerg\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mmeijerg1\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mrisch\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mrisch\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mmanual\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mmanual\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 487\u001b[1;33m conds=conds)\n\u001b[0m\u001b[0;32m 488\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mantideriv\u001b[0m \u001b[1;32mis\u001b[0m \u001b[1;32mNone\u001b[0m \u001b[1;32mand\u001b[0m \u001b[0mmeijerg1\u001b[0m \u001b[1;32mis\u001b[0m \u001b[1;32mTrue\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 489\u001b[0m \u001b[0mret\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mtry_meijerg\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mfunction\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mxab\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\integrals\\integrals.py\u001b[0m in \u001b[0;36m_eval_integral\u001b[1;34m(self, f, x, meijerg, risch, manual, conds)\u001b[0m\n\u001b[0;32m 893\u001b[0m \u001b[0marg\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdoit\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mmanual\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mFalse\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0marg\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mhas\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mIntegral\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32melse\u001b[0m \u001b[0marg\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 894\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0marg\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mresult\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0margs\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 895\u001b[1;33m ]).expand(multinomial=False,\n\u001b[0m\u001b[0;32m 896\u001b[0m \u001b[0mlog\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mFalse\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 897\u001b[0m \u001b[0mpower_exp\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mFalse\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\integrals\\integrals.py\u001b[0m in \u001b[0;36m<listcomp>\u001b[1;34m(.0)\u001b[0m\n\u001b[0;32m 892\u001b[0m result = result.func(*[\n\u001b[0;32m 893\u001b[0m \u001b[0marg\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdoit\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mmanual\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mFalse\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0marg\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mhas\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mIntegral\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32melse\u001b[0m \u001b[0marg\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 894\u001b[1;33m \u001b[1;32mfor\u001b[0m \u001b[0marg\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mresult\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0margs\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 895\u001b[0m ]).expand(multinomial=False,\n\u001b[0;32m 896\u001b[0m \u001b[0mlog\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mFalse\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\core\\basic.py\u001b[0m in \u001b[0;36mdoit\u001b[1;34m(self, **hints)\u001b[0m\n\u001b[0;32m 1505\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mhints\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'deep'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;32mTrue\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1506\u001b[0m terms = [ term.doit(**hints) if isinstance(term, Basic) else term\n\u001b[1;32m-> 1507\u001b[1;33m for term in self.args ]\n\u001b[0m\u001b[0;32m 1508\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfunc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mterms\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1509\u001b[0m \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\core\\basic.py\u001b[0m in \u001b[0;36m<listcomp>\u001b[1;34m(.0)\u001b[0m\n\u001b[0;32m 1505\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mhints\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'deep'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;32mTrue\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1506\u001b[0m terms = [ term.doit(**hints) if isinstance(term, Basic) else term\n\u001b[1;32m-> 1507\u001b[1;33m for term in self.args ]\n\u001b[0m\u001b[0;32m 1508\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfunc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mterms\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1509\u001b[0m \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\integrals\\integrals.py\u001b[0m in \u001b[0;36mdoit\u001b[1;34m(self, **hints)\u001b[0m\n\u001b[0;32m 399\u001b[0m \u001b[0mfunction\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfunction\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 400\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mdeep\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 401\u001b[1;33m \u001b[0mfunction\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mfunction\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdoit\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m**\u001b[0m\u001b[0mhints\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 402\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mfunction\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mis_zero\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 403\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mS\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mZero\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\core\\basic.py\u001b[0m in \u001b[0;36mdoit\u001b[1;34m(self, **hints)\u001b[0m\n\u001b[0;32m 1505\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mhints\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'deep'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;32mTrue\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1506\u001b[0m terms = [ term.doit(**hints) if isinstance(term, Basic) else term\n\u001b[1;32m-> 1507\u001b[1;33m for term in self.args ]\n\u001b[0m\u001b[0;32m 1508\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfunc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mterms\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1509\u001b[0m \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\core\\basic.py\u001b[0m in \u001b[0;36m<listcomp>\u001b[1;34m(.0)\u001b[0m\n\u001b[0;32m 1505\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mhints\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'deep'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;32mTrue\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1506\u001b[0m terms = [ term.doit(**hints) if isinstance(term, Basic) else term\n\u001b[1;32m-> 1507\u001b[1;33m for term in self.args ]\n\u001b[0m\u001b[0;32m 1508\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfunc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mterms\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1509\u001b[0m \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;31mTypeError\u001b[0m: doit() got an unexpected keyword argument 'manual'" | |
] | |
} | |
], | |
"source": [ | |
"B = (sympy.sign(0.5 - sympy.Abs(x)) + 1) / 2\n", | |
"sympy.plot(B, (x, -2, 2))\n", | |
"B2 = integrate(B.subs(x, t) * B.subs(x, t - x), (t, -oo, oo))\n", | |
"B2" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": [ | |
"iVBORw0KGgoAAAANSUhEUgAAAeEAAAELCAMAAADZS87YAAAASFBMVEX///8AAAAAAAAAAAAAAAAA\n", | |
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACC\n", | |
"gUnDAAAAF3RSTlMAEKvdMu8iRLuJzXZUpYuBZpmT4fOhp2ec7c0AABk4SURBVHgB7V3rorMqDvXa\n", | |
"1uqcac+ZGd//TYeLl5Clgrv0U9zxR6sRQpJVEC3LZNn6lhfl+kk5k34Eqrqu0vdCPFiNQNXXt9WT\n", | |
"ciLBCLAxOS/7e4JeiMmrEeBjctE/VsvKiQQjwMfkvO/lIpwgjqsmw5jc9PVcOH837XsH4PeifeRz\n", | |
"9Zh73JRnm2fVe+/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EntpBBBPlNDysp9a\n", | |
"BBBPlKTmk9hLI+CZS3PqHq0asJ8aEzPApeSKYI91JJy6F+5fkkzMcPfSKengacymEqDuBTuWJhMz\n", | |
"2L2EClI8rdl03AbqXrBnaTIxg91LqOASwvMKAKDuhXqWKBMz1L2Uym0ijNQ9j2upMzE97iV5ehPh\n", | |
"FWLXqqOEdThzfF6a4aa5MvdSrVW/1+pjoCTmer1Qbl4M89AF9DUhN5wgRbyYS682JydCIhAVYcI6\n", | |
"nBBOiokZErHUymwivELdW/NxYnEp1uGEcFJMzDXPUpZvIgzJBrc9pazDCeGkmJjb/qV5tnaYaNoH\n", | |
"ijmn7m37OPXhZJmY2/6lefbRm05GjKcIc+oeKba0S1mHSTIxl5xKXYY0JYrwnGwwyM/kmZhBXqZW\n", | |
"CF5U6ozbM3UvyK/UmZhBTqZWqHVZ/+quFMbt1FwSe90IFIynhOO2W16OkotA2avHTmSDcZuck90k\n", | |
"I1DY12aNtsO4PZ6Q72Qj0JkXo03m83F7OiE7V4kAH7ev4pf4MUWAjduTXHYuEwE2bl/Gr1/lyP8B\n", | |
"znZ034mSy64AAAAASUVORK5CYII=\n" | |
], | |
"text/latex": [ | |
"$$\\begin{cases} \\begin{cases} 0 & \\text{for}\\: - x + 0.5 < -0.5 \\\\0.5 & \\text{for}\\: - x + 0.5 < 0.5 \\\\0 & \\text{otherwise} \\end{cases} & \\text{for}\\: - x - 0.5 < -0.5 \\\\\\begin{cases} 0.5 & \\text{for}\\: - x + 0.5 < -0.5 \\\\1.0 & \\text{for}\\: - x + 0.5 < 0.5 \\\\0.5 & \\text{otherwise} \\end{cases} & \\text{for}\\: - x - 0.5 < 0.5 \\\\\\begin{cases} 0 & \\text{for}\\: - x + 0.5 < -0.5 \\\\0.5 & \\text{for}\\: - x + 0.5 < 0.5 \\\\0 & \\text{otherwise} \\end{cases} & \\text{otherwise} \\end{cases}$$" | |
], | |
"text/plain": [ | |
"\u23a7\u23a7 0 for -x + 0.5 < -0.5 \n", | |
"\u23aa\u23aa \n", | |
"\u23aa\u23a80.5 for -x + 0.5 < 0.5 for -x - 0.5 < -0.5\n", | |
"\u23aa\u23aa \n", | |
"\u23aa\u23a9 0 otherwise \n", | |
"\u23aa \n", | |
"\u23aa\u23a70.5 for -x + 0.5 < -0.5 \n", | |
"\u23aa\u23aa \n", | |
"\u23a8\u23a81.0 for -x + 0.5 < 0.5 for -x - 0.5 < 0.5 \n", | |
"\u23aa\u23aa \n", | |
"\u23aa\u23a90.5 otherwise \n", | |
"\u23aa \n", | |
"\u23aa\u23a7 0 for -x + 0.5 < -0.5 \n", | |
"\u23aa\u23aa \n", | |
"\u23aa\u23a80.5 for -x + 0.5 < 0.5 otherwise \n", | |
"\u23aa\u23aa \n", | |
"\u23a9\u23a9 0 otherwise " | |
] | |
}, | |
"execution_count": 4, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"B = Piecewise((0, x < -0.5), (1, x < 0.5), (0, True))\n", | |
"# sympy.plot(B, (x, -2, 2))\n", | |
"B2 = integrate(B.subs(x, t) * B.subs(x, t - x), (t, -oo, oo))\n", | |
"B2" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"ename": "TypeError", | |
"evalue": "unorderable types: complex() < float()", | |
"output_type": "error", | |
"traceback": [ | |
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", | |
"\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\plotting\\experimental_lambdify.py\u001b[0m in \u001b[0;36m__call__\u001b[1;34m(self, args)\u001b[0m\n\u001b[0;32m 193\u001b[0m \u001b[1;31m#The result can be sympy.Float. Hence wrap it with complex type.\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 194\u001b[1;33m \u001b[0mresult\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcomplex\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mlambda_func\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0margs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 195\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mabs\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mresult\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mimag\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m>\u001b[0m \u001b[1;36m1e-7\u001b[0m \u001b[1;33m*\u001b[0m \u001b[0mabs\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mresult\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32m<string>\u001b[0m in \u001b[0;36m<lambda>\u001b[1;34m(x0)\u001b[0m\n", | |
"\u001b[1;31mTypeError\u001b[0m: unorderable types: complex() < float()", | |
"\nDuring handling of the above exception, another exception occurred:\n", | |
"\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)", | |
"\u001b[1;32m<ipython-input-5-b3d2ee741e18>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0msympy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mplot\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mB\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m-\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m2\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\plotting\\plot.py\u001b[0m in \u001b[0;36mplot\u001b[1;34m(*args, **kwargs)\u001b[0m\n\u001b[0;32m 1278\u001b[0m \u001b[0mplots\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mPlot\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mseries\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1279\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mshow\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1280\u001b[1;33m \u001b[0mplots\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mshow\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 1281\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mplots\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1282\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\plotting\\plot.py\u001b[0m in \u001b[0;36mshow\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 183\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_backend\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mclose\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 184\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_backend\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mbackend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 185\u001b[1;33m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_backend\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mshow\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 186\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 187\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0msave\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mpath\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\plotting\\plot.py\u001b[0m in \u001b[0;36mshow\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 1016\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1017\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0mshow\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1018\u001b[1;33m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mprocess_series\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 1019\u001b[0m \u001b[1;31m#TODO after fixing https://github.com/ipython/ipython/issues/1255\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1020\u001b[0m \u001b[1;31m# you can uncomment the next line and remove the pyplot.show() call\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\plotting\\plot.py\u001b[0m in \u001b[0;36mprocess_series\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 895\u001b[0m \u001b[1;31m# Create the collections\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 896\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0ms\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mis_2Dline\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 897\u001b[1;33m \u001b[0mcollection\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mLineCollection\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0ms\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_segments\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 898\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0max\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0madd_collection\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mcollection\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 899\u001b[0m \u001b[1;32melif\u001b[0m \u001b[0ms\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mis_contour\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\plotting\\plot.py\u001b[0m in \u001b[0;36mget_segments\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 501\u001b[0m \u001b[0mlist_segments\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mp\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mq\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 502\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 503\u001b[1;33m \u001b[0mf_start\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mf\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mstart\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 504\u001b[0m \u001b[0mf_end\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mf\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mend\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 505\u001b[0m \u001b[0msample\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mstart\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mf_start\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m[\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mend\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mf_end\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m0\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32mC:\\Anaconda\\lib\\site-packages\\sympy-0.7.6_git-py3.4.egg\\sympy\\plotting\\experimental_lambdify.py\u001b[0m in \u001b[0;36m__call__\u001b[1;34m(self, args)\u001b[0m\n\u001b[0;32m 226\u001b[0m \u001b[0muse_evalf\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mTrue\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 227\u001b[0m complex_wrap_evalf=True)\n\u001b[1;32m--> 228\u001b[1;33m \u001b[0mresult\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mlambda_func\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0margs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 229\u001b[0m warnings.warn('The evaluation of the expression is'\n\u001b[0;32m 230\u001b[0m \u001b[1;34m' problematic. We are trying a failback method'\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", | |
"\u001b[1;32m<string>\u001b[0m in \u001b[0;36m<lambda>\u001b[1;34m(x0)\u001b[0m\n", | |
"\u001b[1;31mTypeError\u001b[0m: unorderable types: complex() < float()" | |
] | |
}, | |
{ | |
"data": { | |
"image/png": [ | |
"iVBORw0KGgoAAAANSUhEUgAAAXcAAAEACAYAAABI5zaHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", | |
"AAALEgAACxIB0t1+/AAADP1JREFUeJzt3V+InXedx/H3ZyetUNhulUAvkkhdDd26YKlirLqLkRYc\n", | |
"e2HBhS3xz+IfsCxE9s66XtjshS57J1IoIdTilbnQwmaX0iLooJS2NmDTdpuURA0kqRRbaxHpRYLf\n",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LHqurkpk62eLPsxTeAJ6tqb5J3Az9OcmNV/XGTZ7tc\n", | |
"raub8477XB96+gs3y14wfBP1ELBcVZP+s+wv2Sx78QEGz0rA4P7qJ5Ocr6ojixlxIWbZhzPAi1X1\n", | |
"KvBqkp8BNwLd4j7LXnwE+BZAVf0qyW+A6xk8f/NWs+5uzvu2zOsPPSW5ksFDT+PfnEeAfwGY9NBT\n", | |
"A1P3Isk7gQeAz1XVqS2YcVGm7kVV/W1Vvauq3sXgvvu/Ngs7zPb98d/APyRZSnIVgzfPnl3wnIsw\n", | |
"y16cAG4FGN5fvh749UKnvHysu5tzvXIvH3p63Sx7AXwTeDtw7/CK9XxV7dmqmTfLjHvR3ozfHyeS\n", | |
"PAQ8BfwZOFRV7eI+49fEt4H7kxxjcCH6tar6/ZYNvYmS/AD4GLA9yRngbga36DbcTR9ikqSG/N/s\n", | |
"SVJDxl2SGjLuktSQcZekhoy7JDVk3CWpIeMuSQ0Zd0lq6P8BNYdlum/IdxIAAAAASUVORK5CYII=\n" | |
], | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x44ef2e8>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"sympy.plot(B, (x, -2, 2))" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "IPython (Python 3)", | |
"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.4.1" | |
}, | |
"signature": "sha256:1f22e142374500ffe6ba2030144fe1f0468c795e85331203ed815a0e0df7dda5" | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment