|
101 | 101 | "cell_id": 15467993639628642890, |
102 | 102 | "cell_origin": "client", |
103 | 103 | "cell_type": "input", |
104 | | - "source": "def integrate(ex1, *args):\n ret = $@(ex1)$\n sb = SympyBridge(ret)\n iranges = []\n for arg in args:\n if isinstance(arg, tuple):\n # print(arg)\n sbtmp = SympyBridge(arg[0])\n tpl = (sbtmp.to_sympy(), arg[1], arg[2])\n iranges.append(tpl)\n # print(iranges)\n sb.from_sympy( str(sympy.integrate( sb.to_sympy(), *iranges) ) )\n else:\n sbtmp = SympyBridge(arg)\n sb.from_sympy( str(sympy.integrate( sb.to_sympy(), sbtmp.to_sympy() ) ))\n return ret" |
| 104 | + "source": "def integrate(ex1, *args):\n ret = $@(ex1)$\n sb = SympyBridge(ret)\n iranges = []\n for arg in args:\n if isinstance(arg, tuple):\n # print(arg)\n tmp0 = SympyBridge(arg[0]).to_sympy()\n tmp1 = SympyBridge(arg[1]).to_sympy() if isinstance(arg[1], Ex) else arg[1]\n tmp2 = SympyBridge(arg[2]).to_sympy() if isinstance(arg[2], Ex) else arg[2]\n tpl = ( tmp0, tmp1, tmp2 )\n iranges.append(tpl)\n else:\n tmp = SympyBridge(arg).to_sympy()\n iranges.append( tmp )\n \n # print(sb.to_sympy())\n # print(iranges)\n sb.from_sympy( str(sympy.integrate( sb.to_sympy(), *iranges) ) )\n return ret" |
105 | 105 | }, |
106 | 106 | { |
107 | 107 | "cell_id": 3801120048138997797, |
|
124 | 124 | "cell_type": "input", |
125 | 125 | "cells": [ |
126 | 126 | { |
127 | | - "cell_id": 17063052500213847361, |
| 127 | + "cell_id": 13720722688581652399, |
128 | 128 | "cell_origin": "server", |
129 | 129 | "cell_type": "latex_view", |
130 | 130 | "cells": [ |
131 | 131 | { |
132 | | - "cell_id": 7172967486322218859, |
| 132 | + "cell_id": 8372911878813724282, |
133 | 133 | "cell_origin": "server", |
134 | 134 | "cell_type": "input_form", |
135 | | - "source": " 27/2 " |
| 135 | + "source": " 9/2 " |
136 | 136 | } |
137 | 137 | ], |
138 | | - "source": "\\begin{dmath*}{}\\frac{27}{2}\\end{dmath*}" |
| 138 | + "source": "\\begin{dmath*}{}\\frac{9}{2}\\end{dmath*}" |
139 | 139 | } |
140 | 140 | ], |
141 | 141 | "ignore_on_import": true, |
|
162 | 162 | "cell_type": "input", |
163 | 163 | "cells": [ |
164 | 164 | { |
165 | | - "cell_id": 5978718279542050921, |
| 165 | + "cell_id": 7232070191902961908, |
166 | 166 | "cell_origin": "server", |
167 | 167 | "cell_type": "latex_view", |
168 | 168 | "cells": [ |
169 | 169 | { |
170 | | - "cell_id": 4267217324248610000, |
| 170 | + "cell_id": 17231141432298576435, |
171 | 171 | "cell_origin": "server", |
172 | 172 | "cell_type": "input_form", |
173 | 173 | "source": " 1/3 (x)**3 y" |
|
199 | 199 | "cell_type": "input", |
200 | 200 | "cells": [ |
201 | 201 | { |
202 | | - "cell_id": 9023252122610197719, |
| 202 | + "cell_id": 5833311602414970559, |
203 | 203 | "cell_origin": "server", |
204 | 204 | "cell_type": "latex_view", |
205 | 205 | "cells": [ |
206 | 206 | { |
207 | | - "cell_id": 2730904024514227788, |
| 207 | + "cell_id": 13975661933126978867, |
208 | 208 | "cell_origin": "server", |
209 | 209 | "cell_type": "input_form", |
210 | 210 | "source": " 1/4 (y)**2" |
|
0 commit comments