ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 04 Dec 2021 20:12:17 +0100A parametric plot with branches for which restricting the range with xmin, xmax doesn't workhttps://ask.sagemath.org/question/60087/a-parametric-plot-with-branches-for-which-restricting-the-range-with-xmin-xmax-doesnt-work/Hi
The following plot
var('t')
parametric_plot( (8*(6+t)/(t^2-16), 2*(8+ 3 *t)/(t^2-16)), (t, -6, 6),xmin=-3,xmax=3,detect_poles=True)
has three branches. 1) For some reason, the plot is not correct. Also
var('t')
parametric_plot( (8*(6+t)/(t^2-16), 2*(8+ 3 *t)/(t^2-16)), (t, -6, 6),xmin=-3,xmax=3,ymin=-3,ymax=3)
fails. 2)How to plot the branches in different colors? 3) Can I add a point moved by a cursor when t increases, like with the Mathematica command Manipulate? Or make an animation to show how a point traverses the three branches?florinSat, 04 Dec 2021 20:12:17 +0100https://ask.sagemath.org/question/60087/Formula manipulationhttps://ask.sagemath.org/question/55216/formula-manipulation/Does Sage have anything similar to Mathematica formula manipulation functions listed below?
Extracting Parts of Formulas:
Coefficient ▪ Exponent ▪ Part ▪ Numerator ▪ Denominator
Formula Rearrangement:
Collect ▪ Together ▪ Apart ▪ Cancel
Equation Transformations:
AddSides ▪ SubtractSides ▪ MultiplySides ▪ DivideSides ▪ ApplySides
Algebraic Transformations:
PowerExpand ▪ ComplexExpand ▪ TrigExpand ▪ RootReduce ▪ ComplexityFunctionpauljurczakSun, 10 Jan 2021 06:15:16 +0100https://ask.sagemath.org/question/55216/test value of symbolic expression's operatorhttps://ask.sagemath.org/question/43836/test-value-of-symbolic-expressions-operator/I need to define a boolean function is_pow that takes for argument a symbolic expression expr
an that return True if and only if expr.operator is the builtin function pow.
But I don'n know which the syntax to use:
Of course
def is_pow(expr):
return expr.operator() == <built-in function pow>
doesn't work. Has someone the answer ?
Thanks a lot.WolanFri, 05 Oct 2018 19:24:25 +0200https://ask.sagemath.org/question/43836/manipulation of parameter in a plot 2d functionhttps://ask.sagemath.org/question/37032/manipulation-of-parameter-in-a-plot-2d-function/ In Mathematica is possible to plot a function of variables and parameters, giving the possibility to have a slider to change interactively the parameter values. For example this input *Manipulate[Plot[1-a/x, {x, 0, 10}], {a, 0, 20}]* outputs the plot of the function *1-a/x*, where **x** is the variable, so values are on the x-axis, and **a** is a parameter and it's exact value is set on a slide bar, between 0 and 20, that appears with running.
I tried to do that with Sage, using the @interact possibility but I cannot find a solution for that. Could someone help me? pspWed, 22 Mar 2017 12:42:45 +0100https://ask.sagemath.org/question/37032/Using differential forms---within SageManifoldshttps://ask.sagemath.org/question/34321/using-differential-forms-within-sagemanifolds/ Hi all.
I'm aware of the implementation of `DifferentialForms` within `SageManifolds`, but I'd like to know how could I use this forms with ease.
In the **Sage Reference Manual_Manifolds**, there are examples of `AffineConnection` and the `connection_form`. However, it seems that the last (`connection_form`) does not allow to store the calculations, like for example:
nab = g.connection() ## This works for the usual connection
nab.display()
omega = nab.connection_form() ## DOES NOT work, one needs to specify components
I would like to calculate all the components of the connection form, to be able of compute *covariant exterior derivatives* of other objects.
How can the connection, curvature and torsion forms be stored (as differential forms)?
Thank you, and cheers.DoxWed, 03 Aug 2016 17:57:44 +0200https://ask.sagemath.org/question/34321/Defining and manipulating vector equations with cross and dot productshttps://ask.sagemath.org/question/24421/defining-and-manipulating-vector-equations-with-cross-and-dot-products/Hello, I have been experimenting with Sage to see what it can or can't do. Consider the following simple problem.
Show $[ \mathbf{A} \times (\mathbf{B} \times \mathbf{C}) ] + [ \mathbf{B} \times (\mathbf{C} \times \mathbf{A}) ] + [ \mathbf{C} \times (\mathbf{A} \times \mathbf{B}) ] = 0 $ where $\mathbf{A}, \mathbf{B}, \mathbf{C} \in \mathbb{R}^3$. In Sage I can do this in one line
eqn = A.cross_product(B.cross_product(C)) + B.cross_product(C.cross_product(A)) + C.cross_product(A.cross_product(B))
where A,B and C are elements of $SR^3$. Now I can show component wise `eqn[0].expand()` `eqn[1].expand()` `eqn[2].expand()` that it's zero.
A much simpler way is to use the identity $\mathbf{A} \times ( \mathbf{B} \times \mathbf{C} ) = \mathbf{B}( \mathbf{A} \cdot \mathbf{C} ) - \mathbf{C}( \mathbf{A} \cdot \mathbf{B} )$ and plug it in. Yet this is easier done by hand than by computer.
My question is can Sage do this? Can I define a vector equation in sage, and sub in vector identities to manipulate or simplify the equation?
Thanks
NahsiNTue, 07 Oct 2014 22:58:01 +0200https://ask.sagemath.org/question/24421/