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.Mon, 08 Jul 2019 09:43:12 +0200absolute value for the ln functionhttps://ask.sagemath.org/question/47095/absolute-value-for-the-ln-function/I tried to execute this but could not figure out the absolute value sign correctly
c = var('c')
c=-0.999
N=(sqrt(1-c^2)/Pi)*[2.239539+(c/sqrt(1-c^2))*ln|(0.9*sqrt(1-c^2)-c*0.435889)/(0.9*sqrt(1-c^2)+c*0.435889)|+(1.8*sqrt(0.19)/(0.81-c^2)];N
I need help on the correct symbol for the absolute value for the ln function. Also, how am I to vary the value of c. I know is should use the command `for`. Example `for c=0.999, 0.901, -0.999`, then yield the value of `N`.ShaMon, 08 Jul 2019 09:43:12 +0200https://ask.sagemath.org/question/47095/Absolute value of a polynomialhttps://ask.sagemath.org/question/38128/absolute-value-of-a-polynomial/ How can I generate a random polynomial with two variables x, y of fix degree which is not of type : `<type 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular'` ?
I would like to compute the absolute value of this polynomial, but when I generate it using :
`R = ZZ['x','y'];
F = R.random_element(4, 1000)`
for example, I get : `TypeError: bad operand type for abs(): 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular'`
What would be a good alternative to get |F(x,y)| ? Thanks
Sasha-dptThu, 29 Jun 2017 20:23:21 +0200https://ask.sagemath.org/question/38128/solving equation involving absolute valueshttps://ask.sagemath.org/question/26295/solving-equation-involving-absolute-values/ Hello
I am newbie to sagemath. I have windows 8 and sage version is 6.4.1. I am running it inside virtualbox.
I was reading some thing about solving equations on sage website at
http://www.sagemath.org/doc/reference/calculus/sage/symbolic/relation.html
At one point author is trying to demonstrate the use of optional keywords for the "solve"
He is solving equation
solve(abs(1-abs(1-x)) == 10, x)
When evaluated this gives
[abs(abs(x - 1) - 1) == 10]
But when the input is modified a little as
solve(abs(1-abs(1-x)) == 10, x, to_poly_solve=True)
sage gives correct result as [x == -10, x == 12]
So why does it not work in the first case ? I didn't understand this use of keyword to_poly_solve.
I tried to post this question on sage-support but for some reason my posted question doesn't seem to appear there.
Please help
sundarsundarTue, 24 Mar 2015 06:13:43 +0100https://ask.sagemath.org/question/26295/