-
-
Save anonymous/8293ad8ff6b6300df34be12d6dfbc478 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": 46, | |
"metadata": { | |
"collapsed": false, | |
"deletable": true, | |
"editable": true | |
}, | |
"outputs": [], | |
"source": [ | |
"import sympy\n", | |
"sympy.init_printing()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 48, | |
"metadata": { | |
"collapsed": false, | |
"deletable": true, | |
"editable": true | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"$$f{\\left (x_{0} \\right )} + \\left(x - x_{0}\\right) \\left. \\frac{d}{d \\xi_{1}} f{\\left (\\xi_{1} \\right )} \\right|_{\\substack{ \\xi_{1}=x_{0} }} + \\mathcal{O}\\left(\\left(x - x_{0}\\right)^{2}; x\\rightarrowx_{0}\\right)$$" | |
], | |
"text/plain": [ | |
" ⎛ d ⎞│ ⎛ 2 ⎞\n", | |
"f(x₀) + (x - x₀)⋅⎜───(f(ξ₁))⎟│ + O⎝(x - x₀) ; x → x₀⎠\n", | |
" ⎝dξ₁ ⎠│ξ₁=x₀ " | |
] | |
}, | |
"execution_count": 48, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"x, x0 = sympy.symbols('x x0')\n", | |
"f = sympy.Function('f')\n", | |
"g = sympy.series(f(x), x, x0, 2)\n", | |
"g" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true, | |
"deletable": true, | |
"editable": true | |
}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 2", | |
"language": "python", | |
"name": "python2" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 2 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython2", | |
"version": "2.7.13" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment