2 import iam_sympy_example
4 from sympy
import exp
,log
,Symbol
,Rational
,sin
,limit
, sqrt
,oo
11 return x
**Rational(1,3)
13 def show(computed
, correct
):
14 print "computed:",computed
,"correct:",correct
16 show( limit(sqrt(x
**2-5*x
+6)-x
,x
,oo
) , -Rational(5)/2 )
17 #show( limit(x*(sqrt(x**2+1)-x),x,oo) , Rational(1)/2 )
18 show( limit(x
-sqrt3(x
**3-1),x
,oo
) , Rational(0) )
19 show( limit(log(1+exp(x
))/x
,x
,-oo
) , Rational(0) )
20 show( limit(log(1+exp(x
))/x
,x
,oo
) , Rational(1) )
21 show( limit(sin(3*x
)/x
,x
,0) , Rational(3) )
22 show( limit(sin(5*x
)/sin(2*x
),x
,0) , Rational(5)/2 )
23 #show( limit(((x-1)/(x+1))**x,x,oo) , exp(-2))