Author: Jim Fowler
Views : 7

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

$\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)

$\displaystyle \frac{81}{2} \, \pi$
x = var('x')
y = var('y')
integrate(integrate(2*sin(x^2),y,0,x),x,0,pi)

$\displaystyle -\cos\left(\pi^{2}\right) + 1$
integrate(2*sin(x^2),y,0,x)

$\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)

$\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)

$\displaystyle \frac{2}{3}$
integrate(integrate((x)*r,r,0,1),theta,0,pi/2)

$\displaystyle \frac{1}{3}$
x = var('x')
y = var('y')
expand((x+I*y)^8)

$\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)

$\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

$\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)

$\displaystyle 0$

integrate(e^(8*I*theta),theta,0,2*pi)

$\displaystyle 0$


︠e2ba7585-d478-405e-8a53-36832eebc13di︠
x = r*cos(theta)
y = r*sin(theta)
expand((x+I*y)^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}$


︠8cc492c9-41e1-4a28-aa45-76403bbb7bde︠
︠fb8bcefb-794f-443d-9441-a3a2a41c6417︠

cos(2*theta) == cos(theta)^2 - sin(theta)^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