| Download
All published worksheets from http://sagenb.org
Project: sagenb.org published worksheets
Views: 168727Image: ubuntu2004
[x == 1]
[x == -1/2*I*sqrt(7) - 1/2, x == 1/2*I*sqrt(7) - 1/2, x == 1]
[d == -sqrt(-a*b - c + sqrt(a)), d == sqrt(-a*b - c + sqrt(a))]
[[x == 1, y == -3, z == 8]]
0.78539816339744839
1.273239544735163*pi
1/2/(x - 1) - 1/2/(x + 1)
1/(x^2 + 1)
1/8*((I - 1)*sqrt(2)*erf((1/2*I - 1/2)*sqrt(2)*x) + (I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x))*sqrt(pi)
could not find class definition
File: /usr/local/sage2/local/lib/python2.6/site-packages/sage/functions/other.py
Source Code (starting at line 26):
class Function_erf(BuiltinFunction): _eval_ = BuiltinFunction._eval_default def __init__(self): r""" The error function, defined as `\text{erf}(x) = \frac{2}{\sqrt{\pi}} \int_0^x e^{-t^2} dt`. Sage currently only implements the error function (via a call to PARI) when the input is real. EXAMPLES:: sage: erf(2) erf(2) sage: erf(2).n() 0.995322265018953 sage: loads(dumps(erf)) erf The following fails because we haven't implemented erf yet for complex values:: sage: complex(erf(3*I)) Traceback (most recent call last): ... TypeError: unable to simplify to complex approximation TESTS: Check if conversion from maxima elements work:: sage: merf = maxima(erf(x)).sage().operator() sage: merf == erf True """ BuiltinFunction.__init__(self, "erf", latex_name=r"\text{erf}") def _evalf_(self, x, parent=None): """ EXAMPLES:: sage: erf(2).n() 0.995322265018953 sage: erf(2).n(150) Traceback (most recent call last): ... NotImplementedError: erf not implemented for precision higher than 53 """ try: prec = parent.prec() except AttributeError: # not a Sage parent prec = 0 if prec > 53: raise NotImplementedError, "erf not implemented for precision higher than 53" return parent(1 - pari(float(x)).erfc()) def _derivative_(self, x, diff_param=None): """ Derivative of erf function EXAMPLES:: sage: erf(x).diff(x) 2*e^(-x^2)/sqrt(pi) TESTS:: Check if #8568 is fixed:: sage: var('c,x') (c, x) sage: derivative(erf(c*x),x) 2*c*e^(-c^2*x^2)/sqrt(pi) sage: erf(c*x).diff(x)._maxima_init_() '((%pi)^(-1/2))*(c)*(exp(((c)^(2))*((x)^(2))*(-1)))*(2)' """ return 2*exp(-x**2)/sqrt(pi)
1/2*sqrt(pi)*erf(x)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_71.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("dCA9IHZhcigndCcpCiB4PWZ1bmN0aW9uKCd4Jyx0KQogREUgPSBkaWZmKHgsdCkgKyB4IC0gMQpkZXNvbHZlKERFLFt4LHRdKQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single')
File "", line 1, in <module>
File "/tmp/tmpDitRAc/___code___.py", line 4
x=function('x',t)
^
IndentationError: unexpected indent