Sharedmidterm3.sagewsOpen in CoCalc
Author: Jim Fowler
Views : 2
derivative(x,x)
1
x = 12 y = -12
x/y
-1
y/x
-1
x/y == y/x x^2 == y^2 x = +/- y
True True
Error in lines 3-3 Traceback (most recent call last): File "/projects/sage/sage-6.9/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 905, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "<string>", line 1 x = +/- y ^ SyntaxError: invalid syntax
y = var('y') factor(2*y^2 + y - 1)
(2*y - 1)*(y + 1)
t=var('t') plot(cos(t)+cos(t)*sin(t),t,-5,5)
n(3*sqrt(3)/4)
1.29903810567666
t = var('t') f = cos(t)+cos(t)*sin(t) solve(derivative(f,t)==0,t)
[sin(t) == -1/2*sqrt(4*cos(t)^2 + 1) - 1/2, sin(t) == 1/2*sqrt(4*cos(t)^2 + 1) - 1/2]
x = var('x') y = var('y') integrate(integrate(e^(x^2),y,x,1),x,0,1)
-1/2*I*sqrt(pi)*erf(I) - 1/2*e + 1/2
integrate(e^(x^2),y,x,1)
-(x - 1)*e^(x^2)
integrate(1*e^(x^2),x,0,1)
-1/2*I*sqrt(pi)*erf(I)
integrate(integrate(e^(x^2),y,0,x),x,0,1)
1/2*e - 1/2
plot(4-x^2,x,0,2)
integrate(integrate(x^2,y,0,4-x^2),x,0,2)
64/15
x = var('x')
y = var('y') z = var('z') rho = sqrt(x^2+y^2+z^2) expand(rho^4) %typeset_mode True
x4+2x2y2+y4+2x2z2+2y2z2+z4\displaystyle x^{4} + 2 \, x^{2} y^{2} + y^{4} + 2 \, x^{2} z^{2} + 2 \, y^{2} z^{2} + z^{4}
5b89100a-2789-49aa-b459-8c8201f79192 integrate(integrate(cos(x*y),y,0,sin(x)),x,0,1) integrate(integrate(cos(x*y),x,arcsin(y),1),y,0,sin(1))
Error in lines 1-1 Traceback (most recent call last): File "/projects/sage/sage-6.9/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 905, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "/projects/sage/sage-6.9/local/lib/python2.7/site-packages/sage/misc/functional.py", line 663, in integral return x.integral(*args, **kwds) File "sage/symbolic/expression.pyx", line 11269, in sage.symbolic.expression.Expression.integral (/projects/sage/sage-6.9/src/build/cythonized/sage/symbolic/expression.cpp:59975) return integral(self, *args, **kwds) File "/projects/sage/sage-6.9/local/lib/python2.7/site-packages/sage/symbolic/integration/integral.py", line 761, in integrate return definite_integral(expression, v, a, b, hold=hold) File "sage/symbolic/function.pyx", line 994, in sage.symbolic.function.BuiltinFunction.__call__ (/projects/sage/sage-6.9/src/build/cythonized/sage/symbolic/function.cpp:11377) res = super(BuiltinFunction, self).__call__( File "sage/symbolic/function.pyx", line 502, in sage.symbolic.function.Function.__call__ (/projects/sage/sage-6.9/src/build/cythonized/sage/symbolic/function.cpp:7144) res = g_function_evalv(self._serial, vec, hold) File "sage/symbolic/function.pyx", line 1065, in sage.symbolic.function.BuiltinFunction._evalf_or_eval_ (/projects/sage/sage-6.9/src/build/cythonized/sage/symbolic/function.cpp:12106) return self._eval0_(*args) File "/projects/sage/sage-6.9/local/lib/python2.7/site-packages/sage/symbolic/integration/integral.py", line 176, in _eval_ return integrator(*args) File "/projects/sage/sage-6.9/local/lib/python2.7/site-packages/sage/symbolic/integration/external.py", line 23, in maxima_integrator result = maxima.sr_integral(expression, v, a, b) File "/projects/sage/sage-6.9/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py", line 784, in sr_integral self._missing_assumption(s) File "/projects/sage/sage-6.9/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py", line 993, in _missing_assumption raise ValueError(outstr) ValueError: Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(sin(x)>0)', see `assume?` for more details) Is sin(x) positive, negative or zero?
theta = var('theta') r = var('r') integrate(integrate(integrate(r,z,0,9-r^2),r,0,3),theta,0,2*pi)
812π\displaystyle \frac{81}{2} \, \pi
x = var('x') y = var('y') integrate(integrate(2*sin(x^2),y,0,x),x,0,pi)
cos(π2)+1\displaystyle -\cos\left(\pi^{2}\right) + 1
integrate(2*sin(x^2),y,0,x)
2xsin(x2)\displaystyle 2 \, x \sin\left(x^{2}\right)
x = var('x') y = var('y') z = var('z') integrate(integrate(integrate(x,z,0,1-x-y),y,0,1-x),x,0,1)
124\displaystyle \frac{1}{24}
r = var('r') theta = var('theta') x = r*cos(theta) y = r*sin(theta) integrate(integrate((x+y)*r,r,0,1),theta,0,pi/2)
23\displaystyle \frac{2}{3}
integrate(integrate((x)*r,r,0,1),theta,0,pi/2)
13\displaystyle \frac{1}{3}
x = var('x') y = var('y') expand((x+I*y)^8)
x8+8ix7y28x6y256ix5y3+70x4y4+56ix3y528x2y68ixy7+y8\displaystyle x^{8} + 8 i \, x^{7} y - 28 \, x^{6} y^{2} - 56 i \, x^{5} y^{3} + 70 \, x^{4} y^{4} + 56 i \, x^{3} y^{5} - 28 \, x^{2} y^{6} - 8 i \, x y^{7} + y^{8}
x = r*cos(theta) y = r*sin(theta) expand((x+I*y)^8)
r8cos(θ)8+8ir8cos(θ)7sin(θ)28r8cos(θ)6sin(θ)256ir8cos(θ)5sin(θ)3+70r8cos(θ)4sin(θ)4+56ir8cos(θ)3sin(θ)528r8cos(θ)2sin(θ)68ir8cos(θ)sin(θ)7+r8sin(θ)8\displaystyle r^{8} \cos\left(\theta\right)^{8} + 8 i \, r^{8} \cos\left(\theta\right)^{7} \sin\left(\theta\right) - 28 \, r^{8} \cos\left(\theta\right)^{6} \sin\left(\theta\right)^{2} - 56 i \, r^{8} \cos\left(\theta\right)^{5} \sin\left(\theta\right)^{3} + 70 \, r^{8} \cos\left(\theta\right)^{4} \sin\left(\theta\right)^{4} + 56 i \, r^{8} \cos\left(\theta\right)^{3} \sin\left(\theta\right)^{5} - 28 \, r^{8} \cos\left(\theta\right)^{2} \sin\left(\theta\right)^{6} - 8 i \, r^{8} \cos\left(\theta\right) \sin\left(\theta\right)^{7} + r^{8} \sin\left(\theta\right)^{8}
(x+I*y)^8==(r*e^(I*theta))^8
(rcos(θ)+irsin(θ))8=r8e(8iθ)\displaystyle {\left(r \cos\left(\theta\right) + i \, r \sin\left(\theta\right)\right)}^{8} = r^{8} e^{\left(8 i \, \theta\right)}
integrate(integrate(r^8 * e^(8*I*theta)*r, r,0,1),theta,0,2*pi)
0\displaystyle 0
integrate(e^(8*I*theta),theta,0,2*pi)
0\displaystyle 0
557a0a2b-640a-4d24-8fce-90ad569e8e94 e2ba7585-d478-405e-8a53-36832eebc13di x = r*cos(theta) y = r*sin(theta) expand((x+I*y)^4)
r4cos(θ)4+4ir4cos(θ)3sin(θ)6r4cos(θ)2sin(θ)24ir4cos(θ)sin(θ)3+r4sin(θ)4\displaystyle r^{4} \cos\left(\theta\right)^{4} + 4 i \, r^{4} \cos\left(\theta\right)^{3} \sin\left(\theta\right) - 6 \, r^{4} \cos\left(\theta\right)^{2} \sin\left(\theta\right)^{2} - 4 i \, r^{4} \cos\left(\theta\right) \sin\left(\theta\right)^{3} + r^{4} \sin\left(\theta\right)^{4}
11836161-5ad2-4d28-859b-85883465fab6 8cc492c9-41e1-4a28-aa45-76403bbb7bde fb8bcefb-794f-443d-9441-a3a2a41c6417 cos(2*theta) == cos(theta)^2 - sin(theta)^2
cos(2θ)=cos(θ)2sin(θ)2\displaystyle \cos\left(2 \, \theta\right) = \cos\left(\theta\right)^{2} - \sin\left(\theta\right)^{2}
K.<x> = SR['x'] Q.<i,j,k> = QuaternionAlgebra(Frac(K),-1,-1)
Q
Quaternion Algebra (-1, -1) with base ring Fraction Field of Univariate Polynomial Ring in x over Rational Field
AR = (1/sqrt(2) + i/sqrt(2)) AY = j
AR * AR * AR * AR
-1
(AR*AR*AR)*AY*A
k
AX = k AX*AY*AX*AY
-1