{ "metadata": { "name": "plot_advanced" }, "nbformat": 2, "worksheets": [ { "cells": [ { "cell_type": "markdown", "source": [ "## Unevaluated Integrals" ] }, { "cell_type": "code", "collapsed": true, "input": [ "from sympy.plotting import plot" ], "language": "python", "outputs": [], "prompt_number": 1 }, { "cell_type": "code", "collapsed": true, "input": [ "i = Integral(log((sin(x)**2+1)*sqrt(x**2+1)),(x,0,y))" ], "language": "python", "outputs": [], "prompt_number": 2 }, { "cell_type": "code", "collapsed": false, "input": [ "i" ], "language": "python", "outputs": [], "prompt_number": 3 }, { "cell_type": "code", "collapsed": false, "input": [ "i.evalf(subs={y:1})" ], "language": "python", "outputs": [], "prompt_number": 4 }, { "cell_type": "code", "collapsed": false, "input": [ "plot(i,(y, 1, 5))" ], "language": "python", "outputs": [], "prompt_number": 5 }, { "cell_type": "markdown", "source": [ "## Infinite Sums" ] }, { "cell_type": "code", "collapsed": true, "input": [ "s = summation(1/x**y,(x,1,oo))" ], "language": "python", "outputs": [], "prompt_number": 6 }, { "cell_type": "code", "collapsed": false, "input": [ "s" ], "language": "python", "outputs": [], "prompt_number": 7 }, { "cell_type": "code", "collapsed": false, "input": [ "plot(s, (y, 2, 10))" ], "language": "python", "outputs": [], "prompt_number": 9 }, { "cell_type": "markdown", "source": [ "## Finite sums" ] }, { "cell_type": "code", "collapsed": false, "input": [ "p = plot(summation(1/x,(x,1,y)), (y, 2, 10))" ], "language": "python", "outputs": [], "prompt_number": 10 }, { "cell_type": "code", "collapsed": false, "input": [ "p[0].only_integers = True", "", "p[0].steps = True", "", "p.show()" ], "language": "python", "outputs": [], "prompt_number": 11 } ] } ] }