Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168693
Image: ubuntu2004
'Limity'
'Limity'
b = var('b') lim(b*sin(x)/x, x = 0) #vypocet limity
b
lim(tan(x)/2, x = pi/2) #limita v danem bode neni definovana
und
lim(tan(x)/2, x = pi/2, dir = 'plus') #zprava ovsem je
-Infinity
lim(tan(x)/2, x = pi/2, dir = 'minus') #a zleva take
+Infinity
'Derivace'
'Derivace'
diff(cos(x^4), x) #jednoducha derivace
-4*x^3*sin(x^4)
diff(cos(x^4), x, 4) #derivace 4. radu
256*x^12*cos(x^4) + 1152*x^8*sin(x^4) - 816*x^4*cos(x^4) - 24*sin(x^4)
y = var('y') f = cos(x^y); f
cos(x^y)
diff(f) #je nutne vybrat promennou
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/sage/sagenb/sage_notebook/worksheets/nelson23/15/code/14.py", line 6, in <module> exec compile(ur'diff(f) #je nutne vybrat promennou' + '\n', '', 'single') File "/home/sage/sage_install/sage/local/lib/python2.5/site-packages/Jinja-1.2-py2.5-linux-x86_64.egg/", line 1, in <module> File "/home/sage/sage_install/sage/local/lib/python2.5/site-packages/sage/calculus/functional.py", line 130, in derivative return f.derivative(*args, **kwds) File "expression.pyx", line 2086, in sage.symbolic.expression.Expression.derivative (sage/symbolic/expression.cpp:11235) File "derivative.pyx", line 213, in sage.misc.derivative.multi_derivative (sage/misc/derivative.c:2058) File "expression.pyx", line 2130, in sage.symbolic.expression.Expression._derivative (sage/symbolic/expression.cpp:11428) ValueError: No differentiation variable specified.
diff(f, x) #parc. derivace podle x
-y*x^(y - 1)*sin(x^y)
diff(f, x, 2) #parc. der. 2. radu
-y^2*(x^(y - 1))^2*cos(x^y) - (y - 1)*y*x^(y - 2)*sin(x^y)
diff(f, x, 2, y) #parc. der. 3. radu, 2x podle x, 1x podle y
x^y*y^2*(x^(y - 1))^2*log(x)*sin(x^y) - (y - 1)*x^y*y*x^(y - 2)*log(x)*cos(x^y) - 2*y^2*(x^(y - 1))^2*log(x)*cos(x^y) - (y - 1)*y*x^(y - 2)*log(x)*sin(x^y) - 2*y*(x^(y - 1))^2*cos(x^y) - (y - 1)*x^(y - 2)*sin(x^y) - y*x^(y - 2)*sin(x^y)
taylor(2*sin(x)/x, x, 0, 4) #tayloruv polynom stupne 4 v bode 0
1/60*x^4 - 1/3*x^2 + 2
'Integraly'
'Integraly'
integral(4*x*sin(x^2), x) #jednoduchy integral
-2*cos(x^2)
y = var('y') g = y*x^2 + x**5*y*5 + x*log(x)^(2) g
5*x^5*y + x^2*y + x*log(x)^2
integral(g, x)
5/6*x^6*y + 1/3*x^3*y + 1/4*(2*log(x)^2 - 2*log(x) + 1)*x^2
integral(g, y)
5/2*x^5*y^2 + 1/2*x^2*y^2 + x*y*log(x)^2
h = 4*x*sin(x^2) integral(h, x, 0, 5) #urcity integral od 0 do 5
-2*cos(25) + 2
integral_numerical(h, 0, 5) #integral pocitany numericky
(0.017594376273053942, 3.5467137744586723e-13)
'Diferencialni rovnice'
'Diferencialni rovnice'
#ukazky reseni dif. rovnic y = function('y', x) desolve(diff(y, x) + y - 1, [y, x])
(c + e^x)*e^(-x)
y = function('y', x) desolve(diff(y, x) - cos(x) + y, [y, x], ics = [0, 1])
1/2*(e^x*sin(x) + e^x*cos(x) + 1)*e^(-x)
lim(3*(x**2)/x, x = 0)
0