# HG changeset patch
# User KarlDieter Crisman <kcrisman@gmail.com>
# Date 1274975156 14400
# Node ID a4a7a2386364dbced964bb66ecb68449c824e6d8
# Parent d3bb1a7a0ac49eccad3ea4053f938a3518c403ed
Trac 8568  implement derivative for erf and ensure only legal symbolic derivatives are converted to Maxima
diff git a/sage/functions/other.py b/sage/functions/other.py
a

b


79  79  raise NotImplementedError, "erf not implemented for precision higher than 53" 
80  80  return parent(1  pari(float(x)).erfc()) 
81  81  
 82  def _derivative_(self, x, diff_param=None): 
 83  """ 
 84  Derivative of erf function 
 85  
 86  EXAMPLES:: 
 87  
 88  sage: erf(x).diff(x) 
 89  2*e^(x^2)/sqrt(pi) 
 90  
 91  TESTS:: 
 92  
 93  Check if #8568 is fixed:: 
 94  
 95  sage: var('c,x') 
 96  (c, x) 
 97  sage: derivative(erf(c*x),x) 
 98  2*c*e^(c^2*x^2)/sqrt(pi) 
 99  sage: erf(c*x).diff(x)._maxima_init_() 
 100  '((%pi)^(1/2))*(c)*(exp(((c)^(2))*((x)^(2))*(1)))*(2)' 
 101  """ 
 102  return 2*exp(x**2)/sqrt(pi) 
 103  
82  104  erf = Function_erf() 
83  105  
84  106  class Function_abs(GinacFunction): 