Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168731
Image: ubuntu2004
atan(1) * 4
\newcommand{\Bold}[1]{\mathbf{#1}}\pi
float(atan(1) * 4.0)
\newcommand{\Bold}[1]{\mathbf{#1}}3.14159265359
solve((2*x)^2+x^2==81,x)
\newcommand{\Bold}[1]{\mathbf{#1}}\left[x = -\frac{9}{5} \, \sqrt{5}, x = \frac{9}{5} \, \sqrt{5}\right]
show(solve((2*x)^2+x^2==81,x))
\newcommand{\Bold}[1]{\mathbf{#1}}\left[x = -\frac{9}{5} \, \sqrt{5}, x = \frac{9}{5} \, \sqrt{5}\right]
a=var('a'); b=var('b'); c=var('c') show(solve(a*x^2+b*x+c==0,x))
<html><div class="math">\newcommand{\Bold}[1]{\mathbf{#1}}\left[x = \frac{-b + \sqrt{-4 \, a c + b^{2
2 \, a}, x = \frac{-b - \sqrt{-4 \, a c + b^{2}}}{2 \, a}\right] }}}
maxima('solve(a*x^2+b*x+c=0,x)')
\newcommand{\Bold}[1]{\mathbf{#1}}\left[ x=-{{\sqrt{b^2-4\,a\,c}+b}\over{2\,a}} , x={{\sqrt{b^2-4\,a \,c}-b}\over{2\,a}} \right]
var('x,y,z') equ = [3*x + 7*y == 2, z*x + 3*y == 8] solve(equ,x,y)
\newcommand{\Bold}[1]{\mathbf{#1}}\left[\left[x = \frac{50}{7 \, z - 9}, y = \frac{2 \, {\left(z - 12\right)}}{7 \, z - 9}\right]\right]
f = maxima('1/sqrt(x^2+2*x-1)'); f
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}{{1}\over{\sqrt{x^2+2\,x-1
/span> }}}
type(f)
\newcommand{\Bold}[1]{\mathbf{#1}}\hbox{ [removed] }
f.integrate(x)
\newcommand{\Bold}[1]{\mathbf{#1}}\log \left(2\,\sqrt{x^2+2\,x-1}+2\,x+2\right)
g = 1/sqrt(x^2+4*x-2); g
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{1}{\sqrt{x^{2} + 4 \, x - 2}}
type(g)
\newcommand{\Bold}[1]{\mathbf{#1}}\hbox{ [removed] }
g.integrate(x)
\newcommand{\Bold}[1]{\mathbf{#1}}\log\left(2 \, x + 2 \, \sqrt{x^{2} + 4 \, x - 2} + 4\right)
m = random_matrix(QQ,3,4); m
\newcommand{\Bold}[1]{\mathbf{#1}}\left(2212121112121122\begin{array}{rrrr} -2 & 2 & 1 & 2 \\ \frac{1}{2} & 1 & 1 & -\frac{1}{2} \\ -\frac{1}{2} & -1 & \frac{1}{2} & 2 \end{array}\right)
m.echelon_form()
\newcommand{\Bold}[1]{\mathbf{#1}}\left(10043010560011\begin{array}{rrrr} 1 & 0 & 0 & -\frac{4}{3} \\ 0 & 1 & 0 & -\frac{5}{6} \\ 0 & 0 & 1 & 1 \end{array}\right)
matrix(13, 1, [diff(sin(x)^2 + cos(x), i) for i in range(13)])
\newcommand{\Bold}[1]{\mathbf{#1}}\left(sin(x)2+cos(x)2sin(x)cos(x)sin(x)2sin(x)2+2cos(x)2cos(x)8sin(x)cos(x)+sin(x)8sin(x)28cos(x)2+cos(x)32sin(x)cos(x)sin(x)32sin(x)2+32cos(x)2cos(x)128sin(x)cos(x)+sin(x)128sin(x)2128cos(x)2+cos(x)512sin(x)cos(x)sin(x)512sin(x)2+512cos(x)2cos(x)2048sin(x)cos(x)+sin(x)2048sin(x)22048cos(x)2+cos(x)\begin{array}{r} \sin\left(x\right)^{2} + \cos\left(x\right) \\ 2 \, \sin\left(x\right) \cos\left(x\right) - \sin\left(x\right) \\ -2 \, \sin\left(x\right)^{2} + 2 \, \cos\left(x\right)^{2} - \cos\left(x\right) \\ -8 \, \sin\left(x\right) \cos\left(x\right) + \sin\left(x\right) \\ 8 \, \sin\left(x\right)^{2} - 8 \, \cos\left(x\right)^{2} + \cos\left(x\right) \\ 32 \, \sin\left(x\right) \cos\left(x\right) - \sin\left(x\right) \\ -32 \, \sin\left(x\right)^{2} + 32 \, \cos\left(x\right)^{2} - \cos\left(x\right) \\ -128 \, \sin\left(x\right) \cos\left(x\right) + \sin\left(x\right) \\ 128 \, \sin\left(x\right)^{2} - 128 \, \cos\left(x\right)^{2} + \cos\left(x\right) \\ 512 \, \sin\left(x\right) \cos\left(x\right) - \sin\left(x\right) \\ -512 \, \sin\left(x\right)^{2} + 512 \, \cos\left(x\right)^{2} - \cos\left(x\right) \\ -2048 \, \sin\left(x\right) \cos\left(x\right) + \sin\left(x\right) \\ 2048 \, \sin\left(x\right)^{2} - 2048 \, \cos\left(x\right)^{2} + \cos\left(x\right) \end{array}\right)
factor(2012)
\newcommand{\Bold}[1]{\mathbf{#1}}2^{2} \cdot 503
d = next_prime(1000000000000); d
\newcommand{\Bold}[1]{\mathbf{#1}}1000000000039
factor(d)
\newcommand{\Bold}[1]{\mathbf{#1}}1000000000039
e = next_prime(45217845633476111); e
\newcommand{\Bold}[1]{\mathbf{#1}}45217845633476177
f = (d*e)+1; f
\newcommand{\Bold}[1]{\mathbf{#1}}45217845635239672979705570904
factor(f)
\newcommand{\Bold}[1]{\mathbf{#1}}2^{3} \cdot 3 \cdot 7 \cdot 13 \cdot 2064913 \cdot 10026641206858177387
is_prime(10026641206858177387)
\newcommand{\Bold}[1]{\mathbf{#1}}{\rm True}
factor((2*x)^2+x)
\newcommand{\Bold}[1]{\mathbf{#1}}{\left(4 \, x + 1\right)} x
x, y = var('x, y'); factor(x^3 - sin(y)^3)
\newcommand{\Bold}[1]{\mathbf{#1}}{\left(x - \sin\left(y\right)\right)} {\left(x^{2} + x \sin\left(y\right) + \sin\left(y\right)^{2}\right)}
F.<alpha> = GF(49) x = polygen(F) factor(x^4 + x^3 - 2)
\newcommand{\Bold}[1]{\mathbf{#1}}(x + \alpha + 1) \cdot (x + 6 \alpha + 2) \cdot (x + 6)^{2}
type(F)
\newcommand{\Bold}[1]{\mathbf{#1}}\hbox{ [removed] }
var('x,y,z') solve([3*x + 7*y == 2, z*x + 3*y == 8],x,y)
\newcommand{\Bold}[1]{\mathbf{#1}}\left[\left[x = \frac{50}{7 \, z - 9}, y = \frac{2 \, {\left(z - 12\right)}}{7 \, z - 9}\right]\right]
var('alpha') A = matrix([ [3, 7], [alpha, 3] ]) A
\newcommand{\Bold}[1]{\mathbf{#1}}\left(37α3\begin{array}{rr} 3 & 7 \\ \alpha & 3 \end{array}\right)
v = vector([2,8]) v
\newcommand{\Bold}[1]{\mathbf{#1}}\left(2,8\right)
u = A.solve_right(v) u
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\frac{-14 \, {\left(\alpha - 12\right)}}{3 \, {\left(7 \, \alpha - 9\right)}} + \frac{2}{3},\frac{2 \, {\left(\alpha - 12\right)}}{7 \, \alpha - 9}\right)
integrate(sin(x)*tan(x),x)
\newcommand{\Bold}[1]{\mathbf{#1}}-\frac{1}{2} \, \log\left(\sin\left(x\right) - 1\right) + \frac{1}{2} \, \log\left(\sin\left(x\right) + 1\right) - \sin\left(x\right)
diff(sin(x)*tan(x))
\newcommand{\Bold}[1]{\mathbf{#1}}{\left(\tan\left(x\right)^{2} + 1\right)} \sin\left(x\right) + \cos\left(x\right) \tan\left(x\right)
sin(x)*tan(x).simplify_full()
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{\sin\left(x\right)^{2}}{\cos\left(x\right)}
fn = 1/sqrt(x^2 + 2*x - 1); fn
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{1}{\sqrt{x^{2} + 2 \, x - 1}}
plot(fn, (x, .5 ,2), gridlines=True)
var('x,y') plot3d(sin(x-y)*y*cos(x), (x,-3,3), (y,-3,3), opacity=.75)
gn = (2*x)^2+x^2==81; gn
\newcommand{\Bold}[1]{\mathbf{#1}}5 \, x^{2} = 81
plot(gn, (x, -5 ,5), gridlines=True, fill=True)
plot3d(gn, (x,-5,5), (y,-5,5), opacity=.75)
plot(sin(x), (x, -pi ,pi), gridlines=True, fill=True)
u, v = var('u,v') f_x = cos(u)*(4*sqrt(1-v^2)*sin(abs(u))^abs(u)) f_y = sin(u) *(4*sqrt(1-v^2)*sin(abs(u))^abs(u)) f_z = v parametric_plot3d([f_x, f_y, f_z], (u, -pi, pi), (v, -1, 1), frame=False, color="red")
eqn = (2*x)^2 == -x^2 + 81 eqn
\newcommand{\Bold}[1]{\mathbf{#1}}4 \, x^{2} = -x^{2} + 81
eqn = eqn + x^2; eqn
\newcommand{\Bold}[1]{\mathbf{#1}}5 \, x^{2} = 81
eqn = eqn / 5; eqn
\newcommand{\Bold}[1]{\mathbf{#1}}x^{2} = \left(\frac{81}{5}\right)
eqn = sqrt(eqn); eqn
\newcommand{\Bold}[1]{\mathbf{#1}}\sqrt{x^{2} = \left(\frac{81}{5}\right)}
eqn.simplify_full()
\newcommand{\Bold}[1]{\mathbf{#1}}{\left| x \right|} = \frac{9}{5} \, \sqrt{5}
plot(sin, (0,2*pi), plot_points=2000)
def g(f): return plot(sin(2*x*pi*f),(x,0,2*pi)) @interact def _(f=(.1,1,.1)): show(g(f))
[random() for i in [1 .. 5]]
\newcommand{\Bold}[1]{\mathbf{#1}}\left[0.721797750678, 0.282854097694, 0.192115487542, 0.399790287024, 0.480238455049\right]